@@ -2,44 +2,47 @@ \section{Standard Module \sectcode{ic}}
22\label {module-ic }
33\bimodindex {ic}
44
5- \setindexsubitem {(in module ic)}
65
7- This module provides access to macintosh Internet Config package,
6+ This module provides access to Macintosh Internet Config package,
87which stores preferences for Internet programs such as mail address,
98default homepage, etc. Also, Internet Config contains an elaborate set
109of mappings from Macintosh creator/type codes to foreign filename
1110extensions plus information on how to transfer files (binary, ascii,
12- etc).
11+ etc).
1312
14- There is a low-level companion module \code {icglue} which provides the
15- basic ic access functionality. This low-level module is not
13+ There is a low-level companion module
14+ \module {icglue}\refbimodindex {icglue} which provides the basic
15+ Internet Config access functionality. This low-level module is not
1616documented, but the docstrings of the routines document the parameters
17- and the routine names are the same as for the Pascal or C API to
18- Internet Config, so the standard IC programmers documentation can be
17+ and the routine names are the same as for the Pascal or \C {} API to
18+ Internet Config, so the standard IC programmers' documentation can be
1919used if this module is needed.
2020
21- The \code {ic} module defines the \code {error} exception and symbolic
22- names for all error codes IC can produce, see the source for details.
21+ The \module {ic} module defines the \exception {error} exception and
22+ symbolic names for all error codes Internet Config can produce; see
23+ the source for details.
2324
24- The \code {ic} module defines the following functions:
25+ \begin {excdesc }{error}
26+ Exception raised on errors in the \module {ic} module.
27+ \end {excdesc }
2528
26- \begin {funcdesc }{IC}{\optional {signature, ic}}
29+
30+ The \module {ic} module defines the following functions:
31+
32+ \begin {funcdesc }{IC}{\optional {signature\optional {, ic}}}
2733Create an internet config object. The signature is a 4-char creator
2834code of the current application (default \code {'Pyth'}) which may
2935influence some of ICs settings. The optional \var {ic} argument is a
30- low-level \code {icinstance} created beforehand, this may be useful if
31- you want to get preferences from a different config file, etc.
36+ low-level \code {icglue.icinstance} created beforehand, this may be
37+ useful if you want to get preferences from a different config file,
38+ etc.
3239\end {funcdesc }
3340
34- \begin {funcdesc }{launchurl}{url \optional {, hint}}
35- \end {funcdesc }
36- \begin {funcdesc }{parseurl}{data \optional {, start, end, hint}}
37- \end {funcdesc }
38- \begin {funcdesc }{mapfile}{file}
39- \end {funcdesc }
40- \begin {funcdesc }{maptypecreator}{type, creator \optional {, filename}}
41- \end {funcdesc }
42- \begin {funcdesc }{settypecreator}{file}
41+ \begin {funcdesc }{launchurl}{url\optional {, hint}}
42+ \funcline {parseurl}{data\optional {, start\optional {, end\optional {, hint}}}}
43+ \funcline {mapfile}{file}
44+ \funcline {maptypecreator}{type, creator\optional {, filename}}
45+ \funcline {settypecreator}{file}
4346These functions are `` shortcuts'' to the methods of the same name,
4447described below.
4548\end {funcdesc }
@@ -48,45 +51,45 @@ \section{Standard Module \sectcode{ic}}
4851\subsection {IC objects }
4952
5053IC objects have a mapping interface, hence to obtain the mail address
51- you simply get \code {ic ['MailAddress']}. Assignment also works, and
52- changes the option in the configuration file.
54+ you simply get \code {\var {ic} ['MailAddress']}. Assignment also works,
55+ and changes the option in the configuration file.
5356
5457The module knows about various datatypes, and converts the internal IC
5558representation to a `` logical'' python datastructure. Running the
56- \code {ic} module standalone will run a test program that lists all
59+ \module {ic} module standalone will run a test program that lists all
5760keys and values in your IC database, this will have to server as
5861documentation.
5962
6063If the module does not know how to represent the data it returns an
61- instance of the \var {ICOpaqueData} type, with the raw data in its
64+ instance of the \code {ICOpaqueData} type, with the raw data in its
6265\var {data} attribute. Objects of this type are also acceptable values
6366for assignment.
6467
6568Besides the dictionary interface IC objects have the following methods:
6669
67- \setindexsubitem {(IC object attribute)}
70+ \setindexsubitem {(IC attribute)}
6871
69- \begin {funcdesc }{launchurl}{url \optional {, hint}}
72+ \begin {funcdesc }{launchurl}{url\optional {, hint}}
7073Parse the given URL, lauch the correct application and pass it the
7174URL. The optional \var {hint} can be a scheme name such as
72- \code {mailto:}, in which case incomplete URLs are completed with this
73- scheme (otherwise incomplete URLs are invalid).
75+ \code {' mailto:' }, in which case incomplete URLs are completed with this
76+ scheme. If \var {hint} is not provided, incomplete URLs are invalid.
7477\end {funcdesc }
7578
76- \begin {funcdesc }{parseurl}{data \optional {, start, end, hint}}
79+ \begin {funcdesc }{parseurl}{data\optional {, start\optional { , end\optional { , hint}} }}
7780Find an URL somewhere in \var {data} and return start position, end
7881position and the URL. The optional \var {start} and \var {end} can be
7982used to limit the search, so for instance if a user clicks in a long
8083textfield you can pass the whole textfield and the click-position in
8184\var {start} and this routine will return the whole URL in which the
82- user clicked. \var {Hint} is again an optional scheme used to complete
85+ user clicked. \var {Hint} is again an optional scheme used to complete
8386incomplete URLs.
8487\end {funcdesc }
8588
8689\begin {funcdesc }{mapfile}{file}
8790Return the mapping entry for the given \var {file}, which can be passed
88- as either a filename or an \var { FSSpec} object, and which need not
89- exist.
91+ as either a filename or an \code {macfs. FSSpec} object, and which need
92+ not exist.
9093
9194The mapping entry is returned as a tuple \code {(}\var {version},
9295\var {type}, \var {creator}, \var {postcreator}, \var {flags},
@@ -103,7 +106,7 @@ \subsection{IC objects}
103106file and \var {entryname} is the name of this entry.
104107\end {funcdesc }
105108
106- \begin {funcdesc }{maptypecreator}{type, creator \optional {, filename}}
109+ \begin {funcdesc }{maptypecreator}{type, creator\optional {, filename}}
107110Return the mapping entry for files with given 4-char \var {type} and
108111\var {creator} codes. The optional \var {filename} may be specified to
109112further help finding the correct entry (if the creator code is
@@ -114,7 +117,7 @@ \subsection{IC objects}
114117
115118\begin {funcdesc }{settypecreator}{file}
116119Given an existing \var {file}, specified either as a filename or as an
117- \var { FSSpec} record, set its creator and type correctly based on its
118- extension. The finder is told about the change, so the finder icon
119- will be updated quickly.
120+ \code {macfs. FSSpec} record, set its creator and type correctly based
121+ on its extension. The finder is told about the change, so the finder
122+ icon will be updated quickly.
120123\end {funcdesc }
0 commit comments