Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 | <html> | |
3 | <head> | |
4 | <link rel="STYLESHEET" href="mac.css" type='text/css' /> | |
5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> | |
6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> | |
7 | <link rel="first" href="mac.html" title='Macintosh Library Modules' /> | |
8 | <link rel='contents' href='contents.html' title="Contents" /> | |
9 | <link rel='index' href='genindex.html' title='Index' /> | |
10 | <link rel='last' href='about.html' title='About this document...' /> | |
11 | <link rel='help' href='about.html' title='About this document...' /> | |
12 | <link rel="next" href="module-MacOS.html" /> | |
13 | <link rel="prev" href="module-macfs.html" /> | |
14 | <link rel="parent" href="macpython-modules.html" /> | |
15 | <link rel="next" href="node21.html" /> | |
16 | <meta name='aesop' content='information' /> | |
17 | <title>2.3 ic -- Access to Internet Config</title> | |
18 | </head> | |
19 | <body> | |
20 | <DIV CLASS="navigation"> | |
21 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> | |
22 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> | |
23 | <tr> | |
24 | <td class='online-navigation'><a rel="prev" title="2.2.3 FInfo Objects" | |
25 | href="finfo-objects.html"><img src='../icons/previous.png' | |
26 | border='0' height='32' alt='Previous Page' width='32' /></A></td> | |
27 | <td class='online-navigation'><a rel="parent" title="2. MacPython Modules" | |
28 | href="macpython-modules.html"><img src='../icons/up.png' | |
29 | border='0' height='32' alt='Up One Level' width='32' /></A></td> | |
30 | <td class='online-navigation'><a rel="next" title="2.3.1 IC Objects" | |
31 | href="node21.html"><img src='../icons/next.png' | |
32 | border='0' height='32' alt='Next Page' width='32' /></A></td> | |
33 | <td align="center" width="100%">Macintosh Library Modules</td> | |
34 | <td class='online-navigation'><a rel="contents" title="Table of Contents" | |
35 | href="contents.html"><img src='../icons/contents.png' | |
36 | border='0' height='32' alt='Contents' width='32' /></A></td> | |
37 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' | |
38 | border='0' height='32' alt='Module Index' width='32' /></a></td> | |
39 | <td class='online-navigation'><a rel="index" title="Index" | |
40 | href="genindex.html"><img src='../icons/index.png' | |
41 | border='0' height='32' alt='Index' width='32' /></A></td> | |
42 | </tr></table> | |
43 | <div class='online-navigation'> | |
44 | <b class="navlabel">Previous:</b> | |
45 | <a class="sectref" rel="prev" href="finfo-objects.html">2.2.3 FInfo Objects</A> | |
46 | <b class="navlabel">Up:</b> | |
47 | <a class="sectref" rel="parent" href="macpython-modules.html">2. MacPython Modules</A> | |
48 | <b class="navlabel">Next:</b> | |
49 | <a class="sectref" rel="next" href="node21.html">2.3.1 IC Objects</A> | |
50 | </div> | |
51 | <hr /></div> | |
52 | </DIV> | |
53 | <!--End of Navigation Panel--> | |
54 | ||
55 | <H1><A NAME="SECTION004300000000000000000"> | |
56 | 2.3 <tt class="module">ic</tt> -- | |
57 | Access to Internet Config</A> | |
58 | </H1> | |
59 | ||
60 | <P> | |
61 | <A NAME="module-ic"></A> | |
62 | <p class="availability">Availability: <span | |
63 | class="platform">Macintosh</span>.</p> | |
64 | ||
65 | <P> | |
66 | This module provides access to various internet-related preferences | |
67 | set through <b class="program">System Preferences</b> or the <b class="program">Finder</b>. | |
68 | ||
69 | <P> | |
70 | There is a low-level companion module | |
71 | <tt class="module">icglue</tt><a id='l2h-46' xml:id='l2h-46'></a> which provides the basic | |
72 | Internet Config access functionality. This low-level module is not | |
73 | documented, but the docstrings of the routines document the parameters | |
74 | and the routine names are the same as for the Pascal or C API to | |
75 | Internet Config, so the standard IC programmers' documentation can be | |
76 | used if this module is needed. | |
77 | ||
78 | <P> | |
79 | The <tt class="module">ic</tt> module defines the <tt class="exception">error</tt> exception and | |
80 | symbolic names for all error codes Internet Config can produce; see | |
81 | the source for details. | |
82 | ||
83 | <P> | |
84 | <dl><dt><b><span class="typelabel">exception</span> <tt id='l2h-39' xml:id='l2h-39' class="exception">error</tt></b></dt> | |
85 | <dd> | |
86 | Exception raised on errors in the <tt class="module">ic</tt> module. | |
87 | </dd></dl> | |
88 | ||
89 | <P> | |
90 | The <tt class="module">ic</tt> module defines the following class and function: | |
91 | ||
92 | <P> | |
93 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
94 | <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-40' xml:id='l2h-40' class="class">IC</tt></b>(</nobr></td> | |
95 | <td><var></var><big>[</big><var>signature</var><big>[</big><var>, ic</var><big>]</big><var></var><big>]</big><var></var>)</td></tr></table></dt> | |
96 | <dd> | |
97 | Create an Internet Config object. The signature is a 4-character creator | |
98 | code of the current application (default <code>'Pyth'</code>) which may | |
99 | influence some of ICs settings. The optional <var>ic</var> argument is a | |
100 | low-level <code>icglue.icinstance</code> created beforehand, this may be | |
101 | useful if you want to get preferences from a different config file, | |
102 | etc. | |
103 | </dl> | |
104 | ||
105 | <P> | |
106 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
107 | <td><nobr><b><tt id='l2h-41' xml:id='l2h-41' class="function">launchurl</tt></b>(</nobr></td> | |
108 | <td><var>url</var><big>[</big><var>, hint</var><big>]</big><var></var>)</td></tr></table></dt> | |
109 | <dd> | |
110 | <dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
111 | <td><nobr><b><tt class="function">parseurl</tt></b>(</nobr></td> | |
112 | <td><var>data</var><big>[</big><var>, start</var><big>[</big><var>, end</var><big>[</big><var>, hint</var><big>]</big><var></var><big>]</big><var></var><big>]</big><var></var>)</td></tr></table></dt> | |
113 | <dd><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
114 | <td><nobr><b><tt class="function">mapfile</tt></b>(</nobr></td> | |
115 | <td><var>file</var>)</td></tr></table></dt> | |
116 | <dd><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
117 | <td><nobr><b><tt class="function">maptypecreator</tt></b>(</nobr></td> | |
118 | <td><var>type, creator</var><big>[</big><var>, filename</var><big>]</big><var></var>)</td></tr></table></dt> | |
119 | <dd><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
120 | <td><nobr><b><tt class="function">settypecreator</tt></b>(</nobr></td> | |
121 | <td><var>file</var>)</td></tr></table></dt> | |
122 | <dd>These functions are ``shortcuts'' to the methods of the same name, | |
123 | described below. | |
124 | </dl> | |
125 | ||
126 | <P> | |
127 | ||
128 | <p><br /></p><hr class='online-navigation' /> | |
129 | <div class='online-navigation'> | |
130 | <!--Table of Child-Links--> | |
131 | <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> | |
132 | ||
133 | <UL CLASS="ChildLinks"> | |
134 | <LI><A href="node21.html">2.3.1 IC Objects</a> | |
135 | </ul> | |
136 | <!--End of Table of Child-Links--> | |
137 | </div> | |
138 | ||
139 | <DIV CLASS="navigation"> | |
140 | <div class='online-navigation'> | |
141 | <p></p><hr /> | |
142 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> | |
143 | <tr> | |
144 | <td class='online-navigation'><a rel="prev" title="2.2.3 FInfo Objects" | |
145 | href="finfo-objects.html"><img src='../icons/previous.png' | |
146 | border='0' height='32' alt='Previous Page' width='32' /></A></td> | |
147 | <td class='online-navigation'><a rel="parent" title="2. MacPython Modules" | |
148 | href="macpython-modules.html"><img src='../icons/up.png' | |
149 | border='0' height='32' alt='Up One Level' width='32' /></A></td> | |
150 | <td class='online-navigation'><a rel="next" title="2.3.1 IC Objects" | |
151 | href="node21.html"><img src='../icons/next.png' | |
152 | border='0' height='32' alt='Next Page' width='32' /></A></td> | |
153 | <td align="center" width="100%">Macintosh Library Modules</td> | |
154 | <td class='online-navigation'><a rel="contents" title="Table of Contents" | |
155 | href="contents.html"><img src='../icons/contents.png' | |
156 | border='0' height='32' alt='Contents' width='32' /></A></td> | |
157 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' | |
158 | border='0' height='32' alt='Module Index' width='32' /></a></td> | |
159 | <td class='online-navigation'><a rel="index" title="Index" | |
160 | href="genindex.html"><img src='../icons/index.png' | |
161 | border='0' height='32' alt='Index' width='32' /></A></td> | |
162 | </tr></table> | |
163 | <div class='online-navigation'> | |
164 | <b class="navlabel">Previous:</b> | |
165 | <a class="sectref" rel="prev" href="finfo-objects.html">2.2.3 FInfo Objects</A> | |
166 | <b class="navlabel">Up:</b> | |
167 | <a class="sectref" rel="parent" href="macpython-modules.html">2. MacPython Modules</A> | |
168 | <b class="navlabel">Next:</b> | |
169 | <a class="sectref" rel="next" href="node21.html">2.3.1 IC Objects</A> | |
170 | </div> | |
171 | </div> | |
172 | <hr /> | |
173 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> | |
174 | </DIV> | |
175 | <!--End of Navigation Panel--> | |
176 | <ADDRESS> | |
177 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. | |
178 | </ADDRESS> | |
179 | </BODY> | |
180 | </HTML> |