15.7 Standard Module ic

 

This module provides access to macintosh Internet Config package, which stores preferences for Internet programs such as mail address, default homepage, etc. Also, Internet Config contains an elaborate set of mappings from Macintosh creator/type codes to foreign filename extensions plus information on how to transfer files (binary, ascii, etc).

There is a low-level companion module icglue which provides the basic ic access functionality. This low-level module is not documented, but the docstrings of the routines document the parameters and the routine names are the same as for the Pascal or C API to Internet Config, so the standard IC programmers documentation can be used if this module is needed.

The ic module defines the error exception and symbolic names for all error codes IC can produce, see the source for details.

The ic module defines the following functions:

IC ([signature, ic])
Create an internet config object. The signature is a 4-char creator code of the current application (default 'Pyth') which may influence some of ICs settings. The optional ic argument is a low-level icinstance created beforehand, this may be useful if you want to get preferences from a different config file, etc.

launchurl (url [, hint])

parseurl (data [, start, end, hint])

mapfile (file)

maptypecreator (type, creator [, filename])

settypecreator (file)
These functions are ``shortcuts'' to the methods of the same name, described below.





guido@CNRI.Reston.Va.US