eric6/Documentation/Source/eric6.Globals.E5ConfigParser.html

branch
maintenance
changeset 7286
7eb04391adf7
parent 7226
babe80d84a3e
parent 7285
1ff497f33f31
child 7287
1c17f2191bdd
equal deleted inserted replaced
7226:babe80d84a3e 7286:7eb04391adf7
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.Globals.E5ConfigParser</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.Globals.E5ConfigParser</h1>
23 <p>
24 Module implementing a ConfigParser wrapper for Python 2 to provide the
25 dictionary like interface of the Python 3 variant.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#E5ConfigParser">E5ConfigParser</a></td>
35 <td>Class implementing a wrapper of the ConfigParser class implementing dictionary like special methods and some enhancements from Python 3.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="E5ConfigParser" ID="E5ConfigParser"></a>
44 <h2>E5ConfigParser</h2>
45 <p>
46 Class implementing a wrapper of the ConfigParser class implementing
47 dictionary like special methods and some enhancements from Python 3.
48 </p>
49 <h3>Derived from</h3>
50 SafeConfigParser
51 <h3>Class Attributes</h3>
52 <table>
53 <tr><td>OPTCRE</td></tr><tr><td>OPTCRE_NV</td></tr><tr><td>_OPT_NV_TMPL</td></tr><tr><td>_OPT_TMPL</td></tr>
54 </table>
55 <h3>Class Methods</h3>
56 <table>
57 <tr><td>None</td></tr>
58 </table>
59 <h3>Methods</h3>
60 <table>
61 <tr>
62 <td><a href="#E5ConfigParser.__init__">E5ConfigParser</a></td>
63 <td>Constructor</td>
64 </tr><tr>
65 <td><a href="#E5ConfigParser.__contains__">__contains__</a></td>
66 <td>Special method to test, if a section is contained in the config.</td>
67 </tr><tr>
68 <td><a href="#E5ConfigParser.__delitem__">__delitem__</a></td>
69 <td>Special method to delete a section.</td>
70 </tr><tr>
71 <td><a href="#E5ConfigParser.__getitem__">__getitem__</a></td>
72 <td>Special method to get a section.</td>
73 </tr><tr>
74 <td><a href="#E5ConfigParser.__iter__">__iter__</a></td>
75 <td>Special method to return an iterator of the section names starting with the default section.</td>
76 </tr><tr>
77 <td><a href="#E5ConfigParser.__len__">__len__</a></td>
78 <td>Special method get the number of sections of the config.</td>
79 </tr><tr>
80 <td><a href="#E5ConfigParser.__setitem__">__setitem__</a></td>
81 <td>Special method to set the values of a section.</td>
82 </tr>
83 </table>
84 <h3>Static Methods</h3>
85 <table>
86 <tr><td>None</td></tr>
87 </table>
88 <a NAME="E5ConfigParser.__init__" ID="E5ConfigParser.__init__"></a>
89 <h4>E5ConfigParser (Constructor)</h4>
90 <b>E5ConfigParser</b>(<i>defaults=None, dict_type=_default_dict, allow_no_value=False, delimiters=('=', ':')</i>)
91 <p>
92 Constructor
93 </p><a NAME="E5ConfigParser.__contains__" ID="E5ConfigParser.__contains__"></a>
94 <h4>E5ConfigParser.__contains__</h4>
95 <b>__contains__</b>(<i>key</i>)
96 <p>
97 Special method to test, if a section is contained in the config.
98 </p><dl>
99 <dt><i>key</i> (str)</dt>
100 <dd>
101 name of the section
102 </dd>
103 </dl><dl>
104 <dt>Returns:</dt>
105 <dd>
106 flag indicating containment
107 </dd>
108 </dl><dl>
109 <dt>Return Type:</dt>
110 <dd>
111 bool
112 </dd>
113 </dl><a NAME="E5ConfigParser.__delitem__" ID="E5ConfigParser.__delitem__"></a>
114 <h4>E5ConfigParser.__delitem__</h4>
115 <b>__delitem__</b>(<i>key</i>)
116 <p>
117 Special method to delete a section.
118 </p><dl>
119 <dt><i>key</i> (str)</dt>
120 <dd>
121 name of the section
122 </dd>
123 </dl><dl>
124 <dt>Raises <b>KeyError</b>:</dt>
125 <dd>
126 raised to indicate a non-existent section
127 </dd><dt>Raises <b>ValueError</b>:</dt>
128 <dd>
129 raised to indicate non-removal of the
130 default section
131 </dd>
132 </dl><a NAME="E5ConfigParser.__getitem__" ID="E5ConfigParser.__getitem__"></a>
133 <h4>E5ConfigParser.__getitem__</h4>
134 <b>__getitem__</b>(<i>key</i>)
135 <p>
136 Special method to get a section.
137 </p><dl>
138 <dt><i>key</i> (str)</dt>
139 <dd>
140 name of the section
141 </dd>
142 </dl><dl>
143 <dt>Returns:</dt>
144 <dd>
145 section for the given key
146 </dd>
147 </dl><dl>
148 <dt>Return Type:</dt>
149 <dd>
150 dict
151 </dd>
152 </dl><dl>
153 <dt>Raises <b>KeyError</b>:</dt>
154 <dd>
155 raised if a non-existent key is given
156 </dd>
157 </dl><a NAME="E5ConfigParser.__iter__" ID="E5ConfigParser.__iter__"></a>
158 <h4>E5ConfigParser.__iter__</h4>
159 <b>__iter__</b>(<i></i>)
160 <p>
161 Special method to return an iterator of the section names starting
162 with the default section.
163 </p><dl>
164 <dt>Returns:</dt>
165 <dd>
166 iterator of the section names contained in the config
167 </dd>
168 </dl><dl>
169 <dt>Return Type:</dt>
170 <dd>
171 iterator of str
172 </dd>
173 </dl><a NAME="E5ConfigParser.__len__" ID="E5ConfigParser.__len__"></a>
174 <h4>E5ConfigParser.__len__</h4>
175 <b>__len__</b>(<i></i>)
176 <p>
177 Special method get the number of sections of the config.
178 </p><dl>
179 <dt>Returns:</dt>
180 <dd>
181 number of sections
182 </dd>
183 </dl><dl>
184 <dt>Return Type:</dt>
185 <dd>
186 int
187 </dd>
188 </dl><a NAME="E5ConfigParser.__setitem__" ID="E5ConfigParser.__setitem__"></a>
189 <h4>E5ConfigParser.__setitem__</h4>
190 <b>__setitem__</b>(<i>key, values</i>)
191 <p>
192 Special method to set the values of a section.
193 </p><dl>
194 <dt><i>key</i> (str)</dt>
195 <dd>
196 name of the section
197 </dd><dt><i>values</i> (dict)</dt>
198 <dd>
199 value for the section
200 </dd>
201 </dl>
202 <div align="right"><a href="#top">Up</a></div>
203 <hr />
204 </body></html>

eric ide

mercurial