/usr/share/doc/python-plastex-doc/html/sect0026.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 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 | <!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: ConfigManager Objects</title>
<link href="sect0027.html" title="ConfigSection Objects" rel="next" />
<link href="module-plasTeX-ConfigManager.html" title="plasTeX.ConfigManager — plasConfiguration" 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="module-plasTeX-ConfigManager.html" title="plasTeX.ConfigManager — plasTeX Configuration"><img alt="Previous: plasTeX.ConfigManager — plasTeX Configuration" 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="sect0027.html" title="ConfigSection Objects"><img alt="Next: ConfigSection Objects" 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">ConfigManager Objects</b>
</span>
</span>
<hr />
</div>
<div><h2 id="a0000000027">6.2.1 ConfigManager Objects</h2>
<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">ConfigManager</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">defaults={ }</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000124" id="a0000000124"></a> Instantiate a configuration class for plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X that parses the command-line options as well as reads the config files. </p><p>The optional argument, <span class="rmfamily"><i class="itshape">defaults</i></span>, is a dictionary of default values for the configuration object. These values are used if a value is not found in the requested section. </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">__add__</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">other</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000125" id="a0000000125"></a> merge items from another <tt class="ttfamily">ConfigManager</tt>. This allows you to add <tt class="ttfamily">ConfigManager</tt> instances with syntax like: config + other. This operation will modify the original instance. </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">add_section</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">name</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000126" id="a0000000126"></a> create a new section in the configuration with the given name. This name is the name used for the section heading in the INI file (i.e. the name used within square brackets ([ ]) to start a section). The return value of this method is a reference to the newly created section. </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">categories</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="a0000000127" id="a0000000127"></a> return the dictionary of categories </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">copy</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="a0000000128" id="a0000000128"></a> return a deep copy of the configuration </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">defaults</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="a0000000129" id="a0000000129"></a> return the dictionary of default values </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">read</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">filenames</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000130" id="a0000000130"></a> read configuration data contained in files specified by <span class="rmfamily"><i class="itshape">filenames</i></span>. Files that cannot be opened are silently ignored. This is designed so that you can specify a list of potential configuration file locations (e.g. current directory, user’s home directory, system directory), and all existing configuration files in the list will be read. A single filename may also be given. </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">get</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">section, option, raw=0, vars={ }</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000131" id="a0000000131"></a> retrieve the value of <span class="rmfamily"><i class="itshape">option</i></span> from the section <span class="rmfamily"><i class="itshape">section</i></span>. Setting <span class="rmfamily"><i class="itshape">raw</i></span> to true prevents any string interpolation from occurring in that value. <span class="rmfamily"><i class="itshape">vars</i></span> is a dictionary of addition value to use when interpolating values into the option. </p><p><b class="bf">Note:</b> You can alsouse the alternative dictionary syntax: config[section].get(option). </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">getboolean</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">section, option</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000132" id="a0000000132"></a> retrieve the specified value and cast it to a boolean </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">get_category</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">key</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000133" id="a0000000133"></a> return the title of the given category </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">getfloat</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">section, option</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000134" id="a0000000134"></a> retrieve the specified value and cast it to a float </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">getint</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">section, option</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000135" id="a0000000135"></a> retrieve the specified value and cast it to and integer </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">get_opt</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">section, option</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000136" id="a0000000136"></a> return the option value with any leading and trailing quotes removed </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">getopt</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">args=None, merge=True</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000137" id="a0000000137"></a> parse the command-line options. If <span class="rmfamily"><i class="itshape">args</i></span> is not given, the args are parsed from <span class="rmfamily"><tt class="ttfamily">sys.argv[1:]</tt></span>. If <span class="rmfamily"><i class="itshape">merge</i></span> is set to false, then the options are not merged into the configuration. The return value is a two element tuple. The first value is a list of parsed options in the form <span class="rmfamily"><tt class="ttfamily">(option, value)</tt></span>, and the second value is the list of arguments. </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">get_optlist</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">section, option, delim=’,’</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000138" id="a0000000138"></a> return the option value as a list using <span class="rmfamily"><i class="itshape">delim</i></span> as the delimiter </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">getraw</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">section, option</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000139" id="a0000000139"></a> return the raw (i.e. un-interpolated) value of the option </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">has_category</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">key, title</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000140" id="a0000000140"></a> add a category to group options when printing the command-line help. Command-line options can be grouped into categories to make options easier to find when printing the usage message for a program. Categories consist of two pieces: 1) the name, and 2) the title. The name is the key in the category dictionary and is the name used when specifying which category an option belongs to. The title is the actual text that you see as a section header when printing the usage message. </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">has_option</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">section, name</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000141" id="a0000000141"></a> return a boolean indicating whether or not an option with the given name exists in the given section </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">has_section</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">name</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000142" id="a0000000142"></a> return a boolean indicating whether or not a section with the given name exists </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">__iadd__</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">other</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000143" id="a0000000143"></a> merge items from another <tt class="ttfamily">ConfigManager</tt>. This allows you to add <tt class="ttfamily">ConfigManager</tt> instances with syntax like: config += other. </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">options</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">name</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000144" id="a0000000144"></a> return a list of configured option names within a section. Options are all of the settings of a configuration file within a section (i.e. the lines that start with ‘optionname=’). </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">__radd__</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">other</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000145" id="a0000000145"></a> merge items from another <tt class="ttfamily">ConfigManager</tt>. This allows you to add <tt class="ttfamily">ConfigManager</tt> instances with syntax like: other + config. This operation will modify the original instance. </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">readfp</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">fp, filename=None</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000146" id="a0000000146"></a> like <tt class="ttfamily">read()</tt>, but the argument is a file object. The optional <span class="rmfamily"><i class="itshape">filename</i></span> argument is used for printing error messages. </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">remove_option</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">section, option</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000147" id="a0000000147"></a> remove the specified option from the given section </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">remove_section</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">section</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000148" id="a0000000148"></a> remove the specified section </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="a0000000149" id="a0000000149"></a> return the configuration as an INI formatted string; this also includes options that were set from Python code. </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">sections</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="a0000000150" id="a0000000150"></a> return a list of all section names in the configuration </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">set</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">section, option, value</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000151" id="a0000000151"></a> set the value of an option </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">__str__</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="a0000000152" id="a0000000152"></a> return the configuration as an INI formatted string; however, do not include options that were set from Python code. </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">to_string</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">source=...</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000153" id="a0000000153"></a> return the configuration as an INI formatted string. The <span class="rmfamily"><i class="itshape">source</i></span> option indicates which source of information should be included in the resulting INI file. The possible values are: <center><table cellspacing="0" class="tabular">
<tr>
<td style="text-align:left; border-right:1px solid black"><p><b class="bf">Name</b>&<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">COMMANDLINE</i></span>&set from a command-line option</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black"><p><span class="rmfamily"><i class="itshape">CONFIGFILE</i></span>&set from a configuration file</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black"><p><span class="rmfamily"><i class="itshape">BUILTIN</i></span>&set from Python code</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black"><p><span class="rmfamily"><i class="itshape">ENVIRONMENT</i></span>&set from an environment variable</p></td>
</tr>
</table></center> </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">write</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">fp</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000154" id="a0000000154"></a> write the configuration as an INI formatted string to the given file object </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">usage</b></tt></span><span class="rmfamily"><tt class="ttfamily">(</tt></span><span style="width:0.0pt" class="parbox"><span class="rmfamily"><i class="itshape">categories=[]</i></span><span class="rmfamily"><tt class="ttfamily">)</tt></span></span></dt>
<dd><p><a name="a0000000155" id="a0000000155"></a> print the descriptions of all command-line options. If <span class="rmfamily"><i class="itshape">categories</i></span> is specified, only the command-line options from those categories is printed. </p></dd>
</dl> </p></div>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="module-plasTeX-ConfigManager.html" title="plasTeX.ConfigManager — plasTeX Configuration"><img alt="Previous: plasTeX.ConfigManager — plasTeX Configuration" 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="sect0027.html" title="ConfigSection Objects"><img alt="Next: ConfigSection Objects" 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>
|