This file is indexed.

/usr/share/doc/python-plastex-doc/html/sect0028.html is in python-plastex-doc 0.9.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="plasTeX" />
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<title>plasTeX — A Python Framework for Processing LaTeX Documents: Configuration Option Types</title>

<link href="module-plasTeX-DOM.html" title="plasTeX.DOM — The plasDocument Object Model (DOM)" rel="next" />
<link href="sect0027.html" title="ConfigSection Objects" rel="prev" />
<link href="module-plasTeX-ConfigManager.html" title="plasTeX.ConfigManager — plasConfiguration" rel="up" />
<link rel="stylesheet" href="styles/styles.css" />
</head>
<body>

<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sect0027.html" title="ConfigSection Objects"><img alt="Previous: ConfigSection Objects" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>

<td><a href="module-plasTeX-ConfigManager.html" title="plasTeX.ConfigManager — plasTeX Configuration"><img alt="Up: plasTeX.ConfigManager — plasTeX Configuration" border="0" src="icons/up.gif" width="32" height="32" /></a></td>

<td><a href="module-plasTeX-DOM.html" title="plasTeX.DOM — The plasTeX Document Object Model (DOM)"><img alt="Next: plasTeX.DOM — The plasTeX Document Object Model (DOM)" border="0" src="icons/next.gif" width="32" height="32" /></a></td>

<td class="navtitle" align="center">plasTeX — A Python Framework for Processing LaTeX Documents</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>


<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>

<div class="breadcrumbs">
<span>
<span>
<a href="index.html">plasTeX — A Python Framework for Processing LaTeX Documents</a> <b>:</b>
</span>

</span><span>
<span>
<a href="sect0024.html">plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X Frameworks and APIs</a> <b>:</b>
</span>

</span><span>
<span>
<a href="module-plasTeX-ConfigManager.html"><tt class="ttfamily">plasTeX.ConfigManager</tt> — plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X Configuration</a> <b>:</b>
</span>

</span><span>

<span>
<b class="current">Configuration Option Types</b>
</span>
</span>
<hr />
</div>

<div><h2 id="a0000000029">6.2.3 Configuration Option Types</h2>
<p>There are several option types that should cover just about any type of command-line and configuration option that you may have. However, in the spirit of object-orientedness, you can, of course, subclass one of these and create your own types. <tt class="ttfamily">GenericOption</tt> is the base class for all options. It contains all of the underlying framework for options, but should never be instantiated directly. Only subclasses should be instantiated. </p><p>   <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><b class="bf">class </b><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">GenericOption</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"> <span class="textnormal"><big class="xlarge">[</big></span>docsTring, options, default, optional, values, category, callback, synopsis, environ, registry, mandatory, name, source<span class="textnormal"><big class="xlarge">]</big></span> </i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000173" id="a0000000173"></a>  Declare a command line option. </p><p>Instances of subclasses of <tt class="ttfamily">GenericOption</tt> must be placed in a <tt class="ttfamily">ConfigManager</tt> instance to be used. See the documentation for <tt class="ttfamily">ConfigManager</tt> for more details. </p><p><span class="rmfamily"><i class="itshape">docstring</i></span> is a string in the format of Python documentation strings that describes the option and its usage. The first line is assumed to be a one-line summary for the option. The following paragraphs are assumed to be a complete description of the option. You can give a paragraph with the label ’Valid Values:’ that contains a short description of the values that are valid for the current option. If this paragraph exists and an error is encountered while validating the option, this paragraph will be printed instead of the somewhat generic error message for that option type. </p><p><span class="rmfamily"><i class="itshape">options</i></span> is a string containing all possible variants of the option. All variants should contain the ’-’, ’–’, etc. at the beginning. For boolean options, the option can be preceded by a ’!’ to mean that the option should be turned OFF rather than ON which is the default. </p><p><span class="rmfamily"><i class="itshape">default</i></span> is a value for the option to take if it isn’t specified on the command line </p><p><span class="rmfamily"><i class="itshape">optional</i></span> is a value for the option if it is given without a value. This is only used for options that normally take a value, but you also want a default that indicates that the option was given without a value. </p><p><span class="rmfamily"><i class="itshape">values</i></span> defines valid values for the option. This argument can take the following forms: </p><p><center><table cellspacing="0" class="tabular">
<tr>

    
    <td style="text-align:left; border-right:1px solid black"><p><b class="bf">Type</b>&amp;<b class="bf">Description</b> </p></td>

</tr><tr>

    
    <td style="border-top-style:solid; text-align:left; border-top-color:black; border-top-width:1px; border-right:1px solid black"><p> <span class="rmfamily"><i class="itshape">single value</i></span>&amp;for <tt class="ttfamily">StringOption</tt> this this is a string, for <tt class="ttfamily">IntegerOption</tt> this is an integer, for <tt class="ttfamily">FloatOption</tt> this is a float. The single value mode is most useful when the value is a regular expression. For example, to specify that a <tt class="ttfamily">StringOption</tt> must be a string of characters followed by a digit, ’values’ would be set to <span class="rmfamily"><tt class="ttfamily">re.compile(r’\w+\d’)</tt></span>.</p></td>

</tr><tr>

    
    <td style="text-align:left; border-right:1px solid black"><p><span class="rmfamily"><i class="itshape">range of values</i></span>&amp;a two element list can be given to specify the endpoints of a range of valid values. This is probably most useful on <tt class="ttfamily">IntegerOption</tt> and <tt class="ttfamily">FloatOption</tt>. For example, to specify that an IntegerOption can only take the values from 0 to 10, ’values’ would be set to [0,10]. <b class="bf">Note:</b> This mode must <em>always</em> use a Python list since using a tuple means something else entirely.</p></td>

</tr><tr>

    
    <td style="text-align:left; border-right:1px solid black"><p><span class="rmfamily"><i class="itshape">tuple of values</i></span>&amp;a tuple of values can be used to specify a complete list of valid values. For example, to specify that an <tt class="ttfamily">IntegerOption</tt> can take the values 1, 2, or 3, ’values’ would be set to <span class="rmfamily"><tt class="ttfamily">(1,2,3)</tt></span>. If a string value can only take the values, ’hi’, ’bye’, and any string of characters beginning with the letter ’z’, ’values’ would be set to <span class="rmfamily"><tt class="ttfamily">(’hi’,’bye’,re.compile(r’z.*?’))</tt></span>. <b class="bf">Note:</b> This mode must *always* use a Python tuple since using a list means something else entirely.</p></td>

</tr>
</table></center> </p><p><span class="rmfamily"><i class="itshape">category</i></span> is a category key which specifies which category the option belongs to (see the <tt class="ttfamily">ConfigManager</tt> documentation on how to create categories). </p><p><span class="rmfamily"><i class="itshape">callback</i></span> is a function to call after the value of the option has been validated. This function will be called with the validated option value as its only argument. </p><p><span class="rmfamily"><i class="itshape">environ</i></span> is an environment variable to use as default value instead of specified value. If the environment variable exists, it will be used for the default value instead of the specified value. </p><p><span class="rmfamily"><i class="itshape">registry</i></span> is a registry key to use as default value instead of specified value. If the registry key exists, it will be used for the default value instead of the specified value. A specified environment variable takes precedence over this value. <b class="bf">Note:</b> This is not implemented yet. </p><p><span class="rmfamily"><i class="itshape">name</i></span> is a key used to get the option from its corresponding section. You do not need to specify this. It will be set automatically when you put the option into the <tt class="ttfamily">ConfigManager</tt> instance. </p><p><span class="rmfamily"><i class="itshape">mandatory</i></span> is a flag used to determine if the option itself is required to be present. The idea of a "mandatory option" is a little strange, but I have seen it done. </p><p><span class="rmfamily"><i class="itshape">source</i></span> is a flag used to determine whether the option was set directly in the <tt class="ttfamily">ConfigManager</tt> instance through Python, by a configuration file/command line option, etc. You do not need to specify this, it will be set automatically during parsing. This flag should have the value of <span class="rmfamily"><i class="itshape">BUILTIN</i></span>, <span class="rmfamily"><i class="itshape">COMMANDLINE</i></span>, <span class="rmfamily"><i class="itshape">CONFIGFILE</i></span>, <span class="rmfamily"><i class="itshape">ENVIRONMENT</i></span>, <span class="rmfamily"><i class="itshape">REGISTRY</i></span>, or <span class="rmfamily"><i class="itshape">CODE</i></span>. </p></dd>

</dl> </p><p>  <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd>  </dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">acceptsArgument</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000174" id="a0000000174"></a> return a boolean indicating whether or not the option accepts an argument on the command-line. For example, boolean options do not accept an argument. </p></dd>

</dl> </p><p>  <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd>  </dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">cast</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">arg</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000175" id="a0000000175"></a> cast the given value to the appropriate type. </p></dd>

</dl> </p><p>  <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd>  </dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">checkValues</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">value</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000176" id="a0000000176"></a> check <span class="rmfamily"><i class="itshape">value</i></span> against all possible valid values for the option. If the value is invalid, raise an <tt class="ttfamily">InvalidOptionError</tt> exception. </p></dd>

</dl> </p><p>  <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd>  </dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">clearValue</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000177" id="a0000000177"></a> reset the value of the option as if it had never been set. </p></dd>

</dl> </p><p>  <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd>  </dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">getValue</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"><span class="textnormal"><big class="xlarge">[</big></span>default<span class="textnormal"><big class="xlarge">]</big></span></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000178" id="a0000000178"></a> return the current value of the option. If <span class="rmfamily"><i class="itshape">default</i></span> is specified and a value cannot be gotten from any source, it is returned. </p></dd>

</dl> </p><p>  <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd>  </dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">__repr__</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000179" id="a0000000179"></a> return a string containing a command-line representation of the option and its value. </p></dd>

</dl> </p><p>  <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd>  </dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">requiresArgument</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000180" id="a0000000180"></a> return a boolean indicating whether or not the option requires an argument on the command-line. </p></dd>

</dl> </p><p>As mentioned previously, <tt class="ttfamily">GenericOption</tt> is an abstract class (i.e. it should not be instantiated directly). Only subclasses of <tt class="ttfamily">GenericOption</tt> should be instantiated. Below are some examples of use of some of these subclasses, followed by the descriptions of the subclasses themselves. </p><pre>
   BooleanOption(
      ''' Display help message ''',
      options = '--help -h',
      callback = usage,  # usage() function must exist prior to this
   )
</pre><pre>
   BooleanOption(
      ''' Set verbosity ''',
      options = '-v --verbose !-q !--quiet',
   )
</pre><pre>
   StringOption(
      '''
      IP address option

      This option accepts an IP address to connect to.

      Valid Values:
      '#.#.#.#' where # is a number from 1 to 255

      ''',
      options = '--ip-address',
      values = re.compile(r'\d{1,3}(\.\d{1,3}){3}'),
      default = '127.0.0.0',
      synopsis = '#.#.#.#',
      category = 'network',  # Assumes 'network' category exists
   )
</pre><pre>
   IntegerOption(
      '''
      Number of seconds to wait before timing out

      Valid Values:
      positive integer

      ''',
      options = '--timeout -t',
      default = 300,
      values = [0,1e9],
      category = 'network',
   )
</pre><pre>
   IntegerOption(
      '''
      Number of tries to connect to the host before giving up

      Valid Values:
      accepts 1, 2, or 3 retries

      ''',
      options = '--tries',
      default = 1,
      values = (1,2,3),
      category = 'network',
   )
</pre><pre>
   StringOption(
      '''
      Nonsense option for example purposes only

      Valid Values:
      accepts 'hi', 'bye', or any string beginning with the letter 'z'

      ''',
      options = '--nonsense -n',
      default = 'hi',
      values = ('hi', 'bye', re.compile(r'z.*?')),
   )
</pre><p>   <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><b class="bf">class </b><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">BooleanOption</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"><span class="textnormal"><big class="xlarge">[</big></span><tt class="ttfamily">GenericOption</tt> arguments<span class="textnormal"><big class="xlarge">]</big></span></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000181" id="a0000000181"></a>  Boolean options are simply options that allow you to specify an ‘on’ or ‘off’ state. The accepted values for a boolean option in a config file are ‘on’, ‘off’, ‘true’, ‘false’, ‘yes’, ‘no’, 0, and 1. Boolean options on the command-line do not take an argument; simply specifying the option sets the state to true. </p><p>One interesting feature of boolean options is in specifying the command-line options. Since you cannot specify a value on the command-line (the existence of the option indicates the state), there must be a way to set the state to false. This is done using the ‘not’ operator (!). When specifying the <span class="rmfamily"><i class="itshape">options</i></span> argument of the constructor, if you prefix an command-line option with an exclamation point, the existence of that option indicates a false state rather than a true state. Below is an example of an <span class="rmfamily"><i class="itshape">options</i></span> value that has a way to turn debugging information on (<b class="bf">--debug</b>) or off (<b class="bf">--no-debug</b>). </p><pre>
BooleanOption( options = '--debug !--no-debug' )
</pre></dd>

</dl> </p><p>   <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><b class="bf">class </b><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">CompoundOption</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"><span class="textnormal"><big class="xlarge">[</big></span><tt class="ttfamily">GenericOption</tt> arguments<span class="textnormal"><big class="xlarge">]</big></span></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000182" id="a0000000182"></a>  Compound options are options that contain multiple elements on the command-line. They are simply groups of command-line arguments surrounded by a pair of grouping characters (e.g. ( ), [ ], { }, &lt; &gt;). This grouping can contain anything including other command-line arguments. However, all content between the grouping characters is unparsed. This can be useful if you have a program that wraps another program and you want to be able to forward the wrapped program’s options on. An example of a compound option used on the command-line is shown below. </p><pre>
# Capture the --diff-opts options to send to another program
mycommand --other-opt --diff-opts ( -ib --minimal ) file1 file2
</pre></dd>

</dl> </p><p>   <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><b class="bf">class </b><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">CountedOption</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"><span class="textnormal"><big class="xlarge">[</big></span><tt class="ttfamily">GenericOption</tt> arguments<span class="textnormal"><big class="xlarge">]</big></span></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000183" id="a0000000183"></a>  A <tt class="ttfamily">CountedOption</tt> is a boolean option that keeps track of how many times it has been specified. This is useful for options that control the verbosity of logging messages in a program where the number of times an option is specified, the more logging information is printed. </p></dd>

</dl> </p><p>   <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><b class="bf">class </b><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">InputDirectoryOption</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"><span class="textnormal"><big class="xlarge">[</big></span><tt class="ttfamily">GenericOption</tt> arguments<span class="textnormal"><big class="xlarge">]</big></span></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000184" id="a0000000184"></a>  An <tt class="ttfamily">InputDirectoryOption</tt> is an option that accepts a directory name for input. This directory name is checked to make sure that it exists and that it is readable. If it is not, a <tt class="ttfamily">InvalidOptionError</tt> exception is raised. </p></dd>

</dl> </p><p>   <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><b class="bf">class </b><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">OutputDirectoryOption</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"><span class="textnormal"><big class="xlarge">[</big></span><tt class="ttfamily">GenericOption</tt> arguments<span class="textnormal"><big class="xlarge">]</big></span></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000185" id="a0000000185"></a>  An <tt class="ttfamily">OutputDirectoryOption</tt> is an option that accepts a directory name for output. If the directory exists, it is checked to make sure that it is readable. If it does not exist, it is created. </p></dd>

</dl> </p><p>   <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><b class="bf">class </b><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">InputFileOption</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"><span class="textnormal"><big class="xlarge">[</big></span><tt class="ttfamily">GenericOption</tt> arguments<span class="textnormal"><big class="xlarge">]</big></span></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000186" id="a0000000186"></a>  An <tt class="ttfamily">InputFileOption</tt> is an option that accepts a file name for input. The filename is checked to make sure that it exists and is readable. If it isn’t, an <tt class="ttfamily">InvalidOptionError</tt> exception is raised. </p></dd>

</dl> </p><p>   <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><b class="bf">class </b><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">OutputFileOption</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"><span class="textnormal"><big class="xlarge">[</big></span><tt class="ttfamily">GenericOption</tt> arguments<span class="textnormal"><big class="xlarge">]</big></span></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000187" id="a0000000187"></a>  An <tt class="ttfamily">OutputFileOption</tt> is an option that accepts a file name for output. If the file exists, it is checked to make sure that it is writable. If a name contains a directory, the path is checked to make sure that it is writable. If the directory does not exist, it is created. </p></dd>

</dl> </p><p>   <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><b class="bf">class </b><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">FloatOption</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"><span class="textnormal"><big class="xlarge">[</big></span><tt class="ttfamily">GenericOption</tt> arguments<span class="textnormal"><big class="xlarge">]</big></span></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000188" id="a0000000188"></a>  A <tt class="ttfamily">FloatOption</tt> is an option that accepts a floating point number. </p></dd>

</dl> </p><p>   <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><b class="bf">class </b><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">IntegerOption</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"><span class="textnormal"><big class="xlarge">[</big></span><tt class="ttfamily">GenericOption</tt> arguments<span class="textnormal"><big class="xlarge">]</big></span></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000189" id="a0000000189"></a>  An <tt class="ttfamily">IntegerOption</tt> is an option that accepts an integer value. </p></dd>

</dl> </p><p>   <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><b class="bf">class </b><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">MultiOption</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"><span class="textnormal"><big class="xlarge">[</big></span><tt class="ttfamily">GenericOption</tt> arguments, <span class="textnormal"><big class="xlarge">[</big></span>delim, range, template<span class="textnormal"><big class="xlarge">]</big></span><span class="textnormal"><big class="xlarge">]</big></span></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000190" id="a0000000190"></a>  A <tt class="ttfamily">MultiOption</tt> is an option that is intended to be used multiple times on the command-line, or take a list of values. Other options when specified more than once simply overwrite the previous value. <tt class="ttfamily">MultiOption</tt>s will append the new values to a list. </p><p>The delimiter used to separate multiple values is the comma (,). A different character can be specified in the <span class="rmfamily"><i class="itshape">delim</i></span> argument. </p><p>In addition, it is possible to specify the number of values that are legal in the <span class="rmfamily"><i class="itshape">range</i></span> argument. The range argument takes a two element list. The first element is the minimum number of times the argument is required. The second element is the maximum number of times it is required. You can use a ‘*’ (in quotes) to mean an infinite number. </p><p>You can cast each element in the list of values to a particular type by using the <span class="rmfamily"><i class="itshape">template</i></span> argument. The <span class="rmfamily"><i class="itshape">template</i></span> argument takes a reference to the option class that you want the values to be converted to. </p></dd>

</dl> </p><p>   <dl class="description">

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt></dt>
    <dd></dd>

    <dt><b class="bf">class </b><span class="rmfamily"><tt class="ttfamily"><b class="bfseries">StringOption</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape"><span class="textnormal"><big class="xlarge">[</big></span><tt class="ttfamily">GenericOption</tt> arguments<span class="textnormal"><big class="xlarge">]</big></span></i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
    <dd><p><a name="a0000000191" id="a0000000191"></a>  A <tt class="ttfamily">StringOption</tt> is an option that accepts an arbitrary string. </p></dd>

</dl>  </p></div>





<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sect0027.html" title="ConfigSection Objects"><img alt="Previous: ConfigSection Objects" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>

<td><a href="module-plasTeX-ConfigManager.html" title="plasTeX.ConfigManager — plasTeX Configuration"><img alt="Up: plasTeX.ConfigManager — plasTeX Configuration" border="0" src="icons/up.gif" width="32" height="32" /></a></td>

<td><a href="module-plasTeX-DOM.html" title="plasTeX.DOM — The plasTeX Document Object Model (DOM)"><img alt="Next: plasTeX.DOM — The plasTeX Document Object Model (DOM)" border="0" src="icons/next.gif" width="32" height="32" /></a></td>

<td class="navtitle" align="center">plasTeX — A Python Framework for Processing LaTeX Documents</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>


<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>

<script language="javascript" src="icons/imgadjust.js" type="text/javascript"></script>

</body>
</html>