IC objects have a mapping interface, hence to obtain the mail address
you simply get ic['MailAddress']
. Assignment also works, and
changes the option in the configuration file.
The module knows about various datatypes, and converts the internal IC
representation to a ``logical'' python datastructure. Running the
ic
module standalone will run a test program that lists all
keys and values in your IC database, this will have to server as
documentation.
If the module does not know how to represent the data it returns an instance of the ICOpaqueData type, with the raw data in its data attribute. Objects of this type are also acceptable values for assignment.
Besides the dictionary interface IC objects have the following methods:
mailto:
, in which case incomplete URLs are completed with this
scheme (otherwise incomplete URLs are invalid).
The mapping entry is returned as a tuple (
version,
type, creator, postcreator, flags,
extension, appname, postappname, mimetype,
entryname)
, where version is the entry version
number, type is the 4-char filetype, creator is the 4-char
creator type, postcreator is the 4-char creator code of an
optional application to post-process the file after downloading,
flags are various bits specifying whether to transfer in binary
or ascii and such, extension is the filename extension for this
file type, appname is the printable name of the application to
which this file belongs, postappname is the name of the
postprocessing application, mimetype is the MIME type of this
file and entryname is the name of this entry.
'????'
, for instance).
The mapping entry is returned in the same format as for mapfile.