# 2.5 `ic` -- Access to Internet Config

Availability: Macintosh.

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.). Since MacOS 9, this module is a control panel named Internet.

There is a low-level companion module `icglue` which provides the basic Internet Config 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 Internet Config can produce; see the source for details.

exception `error`
  Exception raised on errors in the `ic` module.

The `ic` module defines the following class and function:

class `IC`([signature[, ic]])
  Create an Internet Config object. The signature is a 4-character creator code of the current application (default `'Pyth'`) which may influence some of ICs settings. The optional ic argument is a low-level `icglue.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.

Subsections

- 2.5.1 IC Objects