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
|
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>epydoc.util</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="epydoc-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://epydoc.sourceforge.net">epydoc 3.0.1</a></th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="epydoc-module.html">Package epydoc</a> ::
Module util
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="epydoc.util-module.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module util</h1><p class="nomargin-top"><span class="codelink"><a href="epydoc.util-pysrc.html">source code</a></span></p>
<p>Miscellaneous utility functions that are used by multiple modules.</p>
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Classes</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Classes"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="epydoc.util.RunSubprocessError-class.html" class="summary-name">RunSubprocessError</a>
</td>
</tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Functions</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Functions"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="is_src_filename"></a><span class="summary-sig-name">is_src_filename</span>(<span class="summary-sig-arg">filename</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.util-pysrc.html#is_src_filename">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_is_src_filename-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_is_src_filename-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_is_src_filename" name="call_graph_for_is_src_filename">
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#__init__" title="docwriter.html.HTMLWriter.__init__()" alt="" coords="6,6,323,38" />
<area shape="rect" href="epydoc.util-module.html#is_src_filename" title="is_src_filename()" alt="" coords="372,6,524,38" />
</map>
<img src="call_graph_for_is_src_filename.gif" alt='' usemap="#call_graph_for_is_src_filename" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="munge_script_name"></a><span class="summary-sig-name">munge_script_name</span>(<span class="summary-sig-arg">filename</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.util-pysrc.html#munge_script_name">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"><code>string</code></span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="epydoc.util-module.html#plaintext_to_latex" class="summary-sig-name">plaintext_to_latex</a>(<span class="summary-sig-arg">str</span>,
<span class="summary-sig-arg">nbsp</span>=<span class="summary-sig-default">0</span>,
<span class="summary-sig-arg">breakany</span>=<span class="summary-sig-default">0</span>)</span><br />
Returns:
A LaTeX string that encodes the given plaintext string.</td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.util-pysrc.html#plaintext_to_latex">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="epydoc.util-module.html#run_subprocess" class="summary-sig-name">run_subprocess</a>(<span class="summary-sig-arg">cmd</span>,
<span class="summary-sig-arg">data</span>=<span class="summary-sig-default">None</span>)</span><br />
Execute the command <code>cmd</code> in a subprocess.</td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.util-pysrc.html#run_subprocess">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_run_subprocess-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_run_subprocess-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_run_subprocess" name="call_graph_for_run_subprocess">
<area shape="rect" href="epydoc.docwriter.dotgraph.DotGraph-class.html#_run_dot" title="docwriter.dotgraph.DotGraph._run_dot()" alt="" coords="7,6,332,38" />
<area shape="rect" href="epydoc.util-module.html#run_subprocess" title="run_subprocess()" alt="" coords="382,34,534,66" />
<area shape="rect" href="epydoc.docwriter.dotgraph-module.html#get_dot_version" title="docwriter.dotgraph.get_dot_version()" alt="" coords="20,62,319,94" />
</map>
<img src="call_graph_for_run_subprocess.gif" alt='' usemap="#call_graph_for_run_subprocess" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
</td>
</tr>
<tr bgcolor="#e8f0f8" >
<th colspan="2" class="group-header"
> Python source types</th></tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="is_module_file"></a><span class="summary-sig-name">is_module_file</span>(<span class="summary-sig-arg">path</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.util-pysrc.html#is_module_file">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_is_module_file-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_is_module_file-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_is_module_file" name="call_graph_for_is_module_file">
<area shape="rect" href="epydoc.docbuilder._ProgressEstimator-class.html#_est_pkg_modules" title="docbuilder._ProgressEstimator._est_pkg_modules()" alt="" coords="5,6,413,38" />
<area shape="rect" href="epydoc.util-module.html#is_module_file" title="is_module_file()" alt="" coords="461,90,608,122" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_items" title="docbuilder._get_docs_from_items()" alt="" coords="65,62,353,94" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_submodules" title="docbuilder._get_docs_from_submodules()" alt="" coords="41,118,377,150" />
<area shape="rect" href="epydoc.util-module.html#is_package_dir" title="is_package_dir()" alt="" coords="136,174,283,206" />
</map>
<img src="call_graph_for_is_module_file.gif" alt='' usemap="#call_graph_for_is_module_file" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="is_package_dir"></a><span class="summary-sig-name">is_package_dir</span>(<span class="summary-sig-arg">dirname</span>)</span><br />
Return true if the given directory is a valid package directory
(i.e., it names a directory that contains a valid __init__ file, and
its name is a valid identifier).</td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.util-pysrc.html#is_package_dir">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_is_package_dir-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_is_package_dir-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_is_package_dir" name="call_graph_for_is_package_dir">
<area shape="rect" href="epydoc.docbuilder._ProgressEstimator-class.html#__init__" title="docbuilder._ProgressEstimator.__init__()" alt="" coords="44,6,375,38" />
<area shape="rect" href="epydoc.util-module.html#is_package_dir" title="is_package_dir()" alt="" coords="463,146,610,178" />
<area shape="rect" href="epydoc.docbuilder._ProgressEstimator-class.html#_est_pkg_modules" title="docbuilder._ProgressEstimator._est_pkg_modules()" alt="" coords="6,62,414,94" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_items" title="docbuilder._get_docs_from_items()" alt="" coords="66,118,354,150" />
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_submodules" title="docbuilder._get_docs_from_submodules()" alt="" coords="42,174,378,206" />
<area shape="rect" href="epydoc.docintrospecter-module.html#get_value_from_filename" title="docintrospecter.get_value_from_filename()" alt="" coords="38,230,382,262" />
<area shape="rect" href="epydoc.docparser-module.html#_parse_package" title="docparser._parse_package()" alt="" coords="95,286,324,318" />
<area shape="rect" href="epydoc.util-module.html#is_module_file" title="is_module_file()" alt="" coords="659,146,806,178" />
</map>
<img src="call_graph_for_is_package_dir.gif" alt='' usemap="#call_graph_for_is_package_dir" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="is_pyname"></a><span class="summary-sig-name">is_pyname</span>(<span class="summary-sig-arg">name</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.util-pysrc.html#is_pyname">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="py_src_filename"></a><span class="summary-sig-name">py_src_filename</span>(<span class="summary-sig-arg">filename</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.util-pysrc.html#py_src_filename">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_py_src_filename-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_py_src_filename-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_py_src_filename" name="call_graph_for_py_src_filename">
<area shape="rect" href="epydoc.docbuilder-module.html#_get_docs_from_module_file" title="docbuilder._get_docs_from_module_file()" alt="" coords="65,6,404,38" />
<area shape="rect" href="epydoc.util-module.html#py_src_filename" title="py_src_filename()" alt="" coords="512,90,672,122" />
<area shape="rect" href="epydoc.docintrospecter-module.html#introspect_module" title="docintrospecter.introspect_module()" alt="" coords="89,62,380,94" />
<area shape="rect" href="epydoc.docparser-module.html#parse_docs" title="docparser.parse_docs()" alt="" coords="137,118,332,150" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#__init__" title="docwriter.html_colorize.PythonSourceColorizer.__init__()" alt="" coords="5,174,464,206" />
</map>
<img src="call_graph_for_py_src_filename.gif" alt='' usemap="#call_graph_for_py_src_filename" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
</td>
</tr>
<tr bgcolor="#e8f0f8" >
<th colspan="2" class="group-header"
> Text processing</th></tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="epydoc.util-module.html#decode_with_backslashreplace" class="summary-sig-name">decode_with_backslashreplace</a>(<span class="summary-sig-arg">s</span>)</span><br />
Convert the given 8-bit string into unicode, treating any character c
such that ord(c)<128 as an ascii character, and converting any c
such that ord(c)>128 into a backslashed escape sequence.</td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.util-pysrc.html#decode_with_backslashreplace">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_decode_with_bac-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_decode_with_bac-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_decode_with_bac" name="call_graph_for_decode_with_bac">
<area shape="rect" href="epydoc.docparser-module.html#process_file" title="docparser.process_file()" alt="" coords="101,6,301,38" />
<area shape="rect" href="epydoc.util-module.html#decode_with_backslashreplace" title="decode_with_backslashreplace()" alt="" coords="447,90,711,122" />
<area shape="rect" href="epydoc.docstringparser-module.html#add_metadata_from_var" title="docstringparser.add_metadata_from_var()" alt="" coords="35,62,368,94" />
<area shape="rect" href="epydoc.markup.pyval_repr.PyvalColorizer-class.html#_colorize_re" title="markup.pyval_repr.PyvalColorizer._colorize_re()" alt="" coords="7,118,396,150" />
<area shape="rect" href="epydoc.markup.pyval_repr.PyvalColorizer-class.html#_output" title="markup.pyval_repr.PyvalColorizer._output()" alt="" coords="24,174,379,206" />
</map>
<img src="call_graph_for_decode_with_bac.gif" alt='' usemap="#call_graph_for_decode_with_bac" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"><code>str</code></span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="epydoc.util-module.html#wordwrap" class="summary-sig-name">wordwrap</a>(<span class="summary-sig-arg">str</span>,
<span class="summary-sig-arg">indent</span>=<span class="summary-sig-default">0</span>,
<span class="summary-sig-arg">right</span>=<span class="summary-sig-default">75</span>,
<span class="summary-sig-arg">startindex</span>=<span class="summary-sig-default">0</span>,
<span class="summary-sig-arg">splitchars</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span><br />
Word-wrap the given string.</td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.util-pysrc.html#wordwrap">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_wordwrap-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_wordwrap-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_wordwrap" name="call_graph_for_wordwrap">
<area shape="rect" href="epydoc.markup.epytext.ParsedEpytextDocstring-class.html#_to_html" title="markup.epytext.ParsedEpytextDocstring._to_html()" alt="" coords="5,6,413,38" />
<area shape="rect" href="epydoc.util-module.html#wordwrap" title="wordwrap()" alt="" coords="461,34,571,66" />
<area shape="rect" href="epydoc.markup.epytext-module.html#to_plaintext" title="markup.epytext.to_plaintext()" alt="" coords="88,62,331,94" />
</map>
<img src="call_graph_for_wordwrap.gif" alt='' usemap="#call_graph_for_wordwrap" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"><code>string</code></span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="epydoc.util-module.html#plaintext_to_html" class="summary-sig-name">plaintext_to_html</a>(<span class="summary-sig-arg">s</span>)</span><br />
Returns:
An HTML string that encodes the given plaintext string.</td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.util-pysrc.html#plaintext_to_html">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_plaintext_to_ht-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_plaintext_to_ht-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_plaintext_to_ht" name="call_graph_for_plaintext_to_ht">
<area shape="rect" href="epydoc.docwriter.dotgraph.DotGraph-class.html#to_html" title="docwriter.dotgraph.DotGraph.to_html()" alt="" coords="92,6,409,38" />
<area shape="rect" href="epydoc.util-module.html#plaintext_to_html" title="plaintext_to_html()" alt="" coords="544,314,712,346" />
<area shape="rect" href="epydoc.docwriter.dotgraph.DotGraphUmlClassNode-class.html#_operation_cell" title="docwriter.dotgraph.DotGraphUmlClassNode._operation_cell()" alt="" coords="7,62,495,94" />
<area shape="rect" href="epydoc.docwriter.dotgraph.DotGraphUmlClassNode-class.html#_summary" title="docwriter.dotgraph.DotGraphUmlClassNode._summary()" alt="" coords="25,118,476,150" />
<area shape="rect" href="epydoc.docwriter.dotgraph.DotGraphUmlClassNode-class.html#_type_descr" title="docwriter.dotgraph.DotGraphUmlClassNode._type_descr()" alt="" coords="19,174,483,206" />
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#build_identifier_index" title="docwriter.html.HTMLWriter.build_identifier_index()" alt="" coords="40,230,461,262" />
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#href" title="docwriter.html.HTMLWriter.href()" alt="" coords="108,286,393,318" />
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#variable_tooltip" title="docwriter.html.HTMLWriter.variable_tooltip()" alt="" coords="65,342,436,374" />
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#write_summary_table" title="docwriter.html.HTMLWriter.write_summary_table()" alt="" coords="43,398,459,430" />
<area shape="rect" href="epydoc.markup.ParsedDocstring-class.html#to_html" title="markup.ParsedDocstring.to_html()" alt="" coords="111,454,391,486" />
<area shape="rect" href="epydoc.markup.doctest.HTMLDoctestColorizer-class.html#markup" title="markup.doctest.HTMLDoctestColorizer.markup()" alt="" coords="53,510,448,542" />
<area shape="rect" href="epydoc.markup.epytext.ParsedEpytextDocstring-class.html#_to_html" title="markup.epytext.ParsedEpytextDocstring._to_html()" alt="" coords="47,566,455,598" />
<area shape="rect" href="epydoc.markup.plaintext.ParsedPlaintextDocstring-class.html#to_html" title="markup.plaintext.ParsedPlaintextDocstring.to_html()" alt="" coords="43,622,459,654" />
</map>
<img src="call_graph_for_plaintext_to_ht.gif" alt='' usemap="#call_graph_for_plaintext_to_ht" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
</td>
</tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Variables"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="PY_SRC_EXTENSIONS"></a><span class="summary-name">PY_SRC_EXTENSIONS</span> = <code title="['.py', '.pyw']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">.py</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">.pyw</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="PY_BIN_EXTENSIONS"></a><span class="summary-name">PY_BIN_EXTENSIONS</span> = <code title="['.pyc', '.so', '.pyd']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">.pyc</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">.so</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">.pyd</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
</td>
</tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Function Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-FunctionDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="decode_with_backslashreplace"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">decode_with_backslashreplace</span>(<span class="sig-arg">s</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="epydoc.util-pysrc.html#decode_with_backslashreplace">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_decode_with_bac-div');return false;">call graph</a></span> </td>
</tr></table>
<div style="display:none" id="call_graph_for_decode_with_bac-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_decode_with_bac" name="call_graph_for_decode_with_bac">
<area shape="rect" href="epydoc.docparser-module.html#process_file" title="docparser.process_file()" alt="" coords="101,6,301,38" />
<area shape="rect" href="epydoc.util-module.html#decode_with_backslashreplace" title="decode_with_backslashreplace()" alt="" coords="447,90,711,122" />
<area shape="rect" href="epydoc.docstringparser-module.html#add_metadata_from_var" title="docstringparser.add_metadata_from_var()" alt="" coords="35,62,368,94" />
<area shape="rect" href="epydoc.markup.pyval_repr.PyvalColorizer-class.html#_colorize_re" title="markup.pyval_repr.PyvalColorizer._colorize_re()" alt="" coords="7,118,396,150" />
<area shape="rect" href="epydoc.markup.pyval_repr.PyvalColorizer-class.html#_output" title="markup.pyval_repr.PyvalColorizer._output()" alt="" coords="24,174,379,206" />
</map>
<img src="call_graph_for_decode_with_bac.gif" alt='' usemap="#call_graph_for_decode_with_bac" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
<p>Convert the given 8-bit string into unicode, treating any character c
such that ord(c)<128 as an ascii character, and converting any c such
that ord(c)>128 into a backslashed escape sequence.</p>
<pre class="py-doctest">
<span class="py-prompt">>>> </span>decode_with_backslashreplace(<span class="py-string">'abc\xff\xe8'</span>)
<span class="py-output">u'abc\\xff\\xe8'</span></pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="wordwrap"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">wordwrap</span>(<span class="sig-arg">str</span>,
<span class="sig-arg">indent</span>=<span class="sig-default">0</span>,
<span class="sig-arg">right</span>=<span class="sig-default">75</span>,
<span class="sig-arg">startindex</span>=<span class="sig-default">0</span>,
<span class="sig-arg">splitchars</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="epydoc.util-pysrc.html#wordwrap">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_wordwrap-div');return false;">call graph</a></span> </td>
</tr></table>
<div style="display:none" id="call_graph_for_wordwrap-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_wordwrap" name="call_graph_for_wordwrap">
<area shape="rect" href="epydoc.markup.epytext.ParsedEpytextDocstring-class.html#_to_html" title="markup.epytext.ParsedEpytextDocstring._to_html()" alt="" coords="5,6,413,38" />
<area shape="rect" href="epydoc.util-module.html#wordwrap" title="wordwrap()" alt="" coords="461,34,571,66" />
<area shape="rect" href="epydoc.markup.epytext-module.html#to_plaintext" title="markup.epytext.to_plaintext()" alt="" coords="88,62,331,94" />
</map>
<img src="call_graph_for_wordwrap.gif" alt='' usemap="#call_graph_for_wordwrap" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
<p>Word-wrap the given string. I.e., add newlines to the string such
that any lines that are longer than <code>right</code> are broken into
shorter lines (at the first whitespace sequence that occurs before index
<code>right</code>). If the given string contains newlines, they will
<i>not</i> be removed. Any lines that begin with whitespace will not be
wordwrapped.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>indent</code></strong> (<code>int</code>) - If specified, then indent each line by this number of spaces.</li>
<li><strong class="pname"><code>right</code></strong> (<code>int</code>) - The right margin for word wrapping. Lines that are longer than
<code>right</code> will be broken at the first whitespace
sequence before the right margin.</li>
<li><strong class="pname"><code>startindex</code></strong> (<code>int</code>) - If specified, then assume that the first line is already
preceeded by <code>startindex</code> characters.</li>
<li><strong class="pname"><code>splitchars</code></strong> - A list of non-whitespace characters which can be used to split a
line. (E.g., use '/\' to allow path names to be split over
multiple lines.)</li>
</ul></dd>
<dt>Returns: <code>str</code></dt>
</dl>
</td></tr></table>
</div>
<a name="plaintext_to_html"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">plaintext_to_html</span>(<span class="sig-arg">s</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="epydoc.util-pysrc.html#plaintext_to_html">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_plaintext_to_ht-div');return false;">call graph</a></span> </td>
</tr></table>
<div style="display:none" id="call_graph_for_plaintext_to_ht-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_plaintext_to_ht" name="call_graph_for_plaintext_to_ht">
<area shape="rect" href="epydoc.docwriter.dotgraph.DotGraph-class.html#to_html" title="docwriter.dotgraph.DotGraph.to_html()" alt="" coords="92,6,409,38" />
<area shape="rect" href="epydoc.util-module.html#plaintext_to_html" title="plaintext_to_html()" alt="" coords="544,314,712,346" />
<area shape="rect" href="epydoc.docwriter.dotgraph.DotGraphUmlClassNode-class.html#_operation_cell" title="docwriter.dotgraph.DotGraphUmlClassNode._operation_cell()" alt="" coords="7,62,495,94" />
<area shape="rect" href="epydoc.docwriter.dotgraph.DotGraphUmlClassNode-class.html#_summary" title="docwriter.dotgraph.DotGraphUmlClassNode._summary()" alt="" coords="25,118,476,150" />
<area shape="rect" href="epydoc.docwriter.dotgraph.DotGraphUmlClassNode-class.html#_type_descr" title="docwriter.dotgraph.DotGraphUmlClassNode._type_descr()" alt="" coords="19,174,483,206" />
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#build_identifier_index" title="docwriter.html.HTMLWriter.build_identifier_index()" alt="" coords="40,230,461,262" />
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#href" title="docwriter.html.HTMLWriter.href()" alt="" coords="108,286,393,318" />
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#variable_tooltip" title="docwriter.html.HTMLWriter.variable_tooltip()" alt="" coords="65,342,436,374" />
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#write_summary_table" title="docwriter.html.HTMLWriter.write_summary_table()" alt="" coords="43,398,459,430" />
<area shape="rect" href="epydoc.markup.ParsedDocstring-class.html#to_html" title="markup.ParsedDocstring.to_html()" alt="" coords="111,454,391,486" />
<area shape="rect" href="epydoc.markup.doctest.HTMLDoctestColorizer-class.html#markup" title="markup.doctest.HTMLDoctestColorizer.markup()" alt="" coords="53,510,448,542" />
<area shape="rect" href="epydoc.markup.epytext.ParsedEpytextDocstring-class.html#_to_html" title="markup.epytext.ParsedEpytextDocstring._to_html()" alt="" coords="47,566,455,598" />
<area shape="rect" href="epydoc.markup.plaintext.ParsedPlaintextDocstring-class.html#to_html" title="markup.plaintext.ParsedPlaintextDocstring.to_html()" alt="" coords="43,622,459,654" />
</map>
<img src="call_graph_for_plaintext_to_ht.gif" alt='' usemap="#call_graph_for_plaintext_to_ht" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
<dl class="fields">
<dt>Returns: <code>string</code></dt>
<dd>An HTML string that encodes the given plaintext string. In
particular, special characters (such as <code>'<'</code> and
<code>'&'</code>) are escaped.</dd>
</dl>
</td></tr></table>
</div>
<a name="plaintext_to_latex"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">plaintext_to_latex</span>(<span class="sig-arg">str</span>,
<span class="sig-arg">nbsp</span>=<span class="sig-default">0</span>,
<span class="sig-arg">breakany</span>=<span class="sig-default">0</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="epydoc.util-pysrc.html#plaintext_to_latex">source code</a></span>
</td>
</tr></table>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>breakany</code></strong> - Insert hyphenation marks, so that LaTeX can break the resulting
string at any point. This is useful for small boxes (e.g., the
type box in the variable list table).</li>
<li><strong class="pname"><code>nbsp</code></strong> - Replace every space with a non-breaking space (<code>'~'</code>).</li>
</ul></dd>
<dt>Returns: <code>string</code></dt>
<dd>A LaTeX string that encodes the given plaintext string. In
particular, special characters (such as <code>'$'</code> and
<code>'_'</code>) are escaped, and tabs are expanded.</dd>
</dl>
</td></tr></table>
</div>
<a name="run_subprocess"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">run_subprocess</span>(<span class="sig-arg">cmd</span>,
<span class="sig-arg">data</span>=<span class="sig-default">None</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="epydoc.util-pysrc.html#run_subprocess">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_run_subprocess-div');return false;">call graph</a></span> </td>
</tr></table>
<div style="display:none" id="call_graph_for_run_subprocess-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_run_subprocess" name="call_graph_for_run_subprocess">
<area shape="rect" href="epydoc.docwriter.dotgraph.DotGraph-class.html#_run_dot" title="docwriter.dotgraph.DotGraph._run_dot()" alt="" coords="7,6,332,38" />
<area shape="rect" href="epydoc.util-module.html#run_subprocess" title="run_subprocess()" alt="" coords="382,34,534,66" />
<area shape="rect" href="epydoc.docwriter.dotgraph-module.html#get_dot_version" title="docwriter.dotgraph.get_dot_version()" alt="" coords="20,62,319,94" />
</map>
<img src="call_graph_for_run_subprocess.gif" alt='' usemap="#call_graph_for_run_subprocess" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
<p>Execute the command <code>cmd</code> in a subprocess.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>cmd</code></strong> - The command to execute, specified as a list of string.</li>
<li><strong class="pname"><code>data</code></strong> - A string containing data to send to the subprocess.</li>
</ul></dd>
<dt>Returns:</dt>
<dd>A tuple <code>(out, err)</code>.</dd>
<dt>Raises:</dt>
<dd><ul class="nomargin-top">
<li><code><strong class='fraise'>OSError</strong></code> - If there is any problem executing the command, or if its exitval is
not 0.</li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="epydoc-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://epydoc.sourceforge.net">epydoc 3.0.1</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
<a href="epydoc-log.html">Generated by Epydoc
3.0.1 on Wed Jan 30 14:06:51 2008</a>
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>
|