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 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285
|
<?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.docwriter.html_colorize.PythonSourceColorizer</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> ::
<a href="epydoc.docwriter-module.html">Package docwriter</a> ::
<a href="epydoc.docwriter.html_colorize-module.html">Module html_colorize</a> ::
Class PythonSourceColorizer
</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.docwriter.html_colorize.PythonSourceColorizer-class.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class PythonSourceColorizer</h1><p class="nomargin-top"><span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer">source code</a></span></p>
<p>A class that renders a python module's source code into HTML pages.
These HTML pages are intended to be provided along with the API
documentation for a module, in case a user wants to learn more about a
particular object by examining its source code. Links are therefore
generated from the API documentation to the source code pages, and from
the source code pages back into the API documentation.</p>
<p>The HTML generated by <code>PythonSourceColorizer</code> has several
notable features:</p>
<ul>
<li>
CSS styles are used to color tokens according to their type. (See <a
href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#CSS_CLASSES"
class="link">CSS_CLASSES</a> for a list of the different token types
that are identified).
</li>
<li>
Line numbers are included to the left of each line.
</li>
<li>
The first line of each class and function definition includes a link
to the API source documentation for that object.
</li>
<li>
The first line of each class and function definition includes an
anchor that can be used to link directly to that class or function.
</li>
<li>
If javascript is enabled, and the page is loaded using the anchor for
a class or function (i.e., if the url ends in
<code>'#<i><name></i>'</code>), then that class or function
will automatically be highlighted; and all other classes and function
definition blocks will be 'collapsed'. These collapsed blocks can be
expanded by clicking on them.
</li>
<li>
Unicode input is supported (including automatic detection of
<code>'coding:'</code> declarations).
</li>
</ul>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></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">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
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 href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">module_filename</span>,
<span class="summary-sig-arg">module_name</span>,
<span class="summary-sig-arg">docindex</span>=<span class="summary-sig-default">None</span>,
<span class="summary-sig-arg">url_func</span>=<span class="summary-sig-default">None</span>,
<span class="summary-sig-arg">name_to_docs</span>=<span class="summary-sig-default">None</span>,
<span class="summary-sig-arg">tab_width</span>=<span class="summary-sig-default">8</span>)</span><br />
Create a new HTML colorizer for the specified module.</td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.__init__">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for___init___23-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for___init___23-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for___init___23" name="call_graph_for___init___23">
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#write_sourcecode" title="html.HTMLWriter.write_sourcecode()" alt="" coords="6,6,318,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#__init__" title="__init__()" alt="" coords="367,6,463,38" />
<area shape="rect" href="epydoc.util-module.html#py_src_filename" title="util.py_src_filename()" alt="" coords="512,6,702,38" />
</map>
<img src="call_graph_for___init___23.gif" alt='' usemap="#call_graph_for___init___23" 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="find_line_offsets"></a><span class="summary-sig-name">find_line_offsets</span>(<span class="summary-sig-arg">self</span>)</span><br />
Construct the <a
href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#line_offsets"
class="link">line_offsets</a> table from <code>self.text</code>.</td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.find_line_offsets">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_find_line_offse-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_find_line_offse-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_find_line_offse" name="call_graph_for_find_line_offse">
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#colorize" title="colorize()" alt="" coords="7,6,100,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#find_line_offsets" title="find_line_offsets()" alt="" coords="150,6,310,38" />
</map>
<img src="call_graph_for_find_line_offse.gif" alt='' usemap="#call_graph_for_find_line_offse" 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="lineno_to_html"></a><span class="summary-sig-name">lineno_to_html</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.lineno_to_html">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_lineno_to_html-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_lineno_to_html-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_lineno_to_html" name="call_graph_for_lineno_to_html">
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#add_line_numbers" title="add_line_numbers()" alt="" coords="7,6,177,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#lineno_to_html" title="lineno_to_html()" alt="" coords="228,34,375,66" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line" title="handle_line()" alt="" coords="31,62,153,94" />
</map>
<img src="call_graph_for_lineno_to_html.gif" alt='' usemap="#call_graph_for_lineno_to_html" 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="colorize"></a><span class="summary-sig-name">colorize</span>(<span class="summary-sig-arg">self</span>)</span><br />
Return an HTML string that renders the source code for the module
that was specified in the constructor.</td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.colorize">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_colorize-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_colorize-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_colorize" name="call_graph_for_colorize">
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#write_sourcecode" title="html.HTMLWriter.write_sourcecode()" alt="" coords="6,6,318,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#colorize" title="colorize()" alt="" coords="367,6,460,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#find_line_offsets" title="find_line_offsets()" alt="" coords="510,6,670,38" />
</map>
<img src="call_graph_for_colorize.gif" alt='' usemap="#call_graph_for_colorize" 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 href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#tokeneater" class="summary-sig-name">tokeneater</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">toktype</span>,
<span class="summary-sig-arg">toktext</span>,
<span class="summary-sig-arg">(srow, scol)</span>,
<span class="summary-sig-arg">(erow, ecol)</span>,
<span class="summary-sig-arg">line</span>)</span><br />
A callback function used by <code>tokenize.tokenize</code> to handle
each token in the module.</td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.tokeneater">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_tokeneater-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_tokeneater-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_tokeneater" name="call_graph_for_tokeneater">
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line" title="handle_line()" alt="" coords="165,6,288,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#tokeneater" title="tokeneater()" alt="" coords="5,6,117,38" />
</map>
<img src="call_graph_for_tokeneater.gif" alt='' usemap="#call_graph_for_tokeneater" 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 href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line" class="summary-sig-name">handle_line</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">line</span>)</span><br />
Render a single logical line from the module, and write the generated
HTML to <code>self.out</code>.</td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.handle_line">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_handle_line-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_handle_line-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_handle_line" name="call_graph_for_handle_line">
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__str__" title="apidoc.DottedName.__str__()" alt="" coords="338,6,580,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#add_line_numbers" title="add_line_numbers()" alt="" coords="374,62,544,94" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#context_name" title="context_name()" alt="" coords="390,118,528,150" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#doclink" title="doclink()" alt="" coords="414,174,504,206" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line" title="handle_line()" alt="" coords="166,202,288,234" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#is_docstring" title="is_docstring()" alt="" coords="396,230,522,262" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#lineno_to_html" title="lineno_to_html()" alt="" coords="386,286,532,318" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#mark_def" title="mark_def()" alt="" coords="407,342,511,374" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#name2url" title="name2url()" alt="" coords="407,398,511,430" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#tokeneater" title="tokeneater()" alt="" coords="6,202,118,234" />
</map>
<img src="call_graph_for_handle_line.gif" alt='' usemap="#call_graph_for_handle_line" 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="context_name"></a><span class="summary-sig-name">context_name</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">extra</span>=<span class="summary-sig-default">None</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.context_name">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_context_name-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_context_name-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_context_name" name="call_graph_for_context_name">
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#context_name" title="context_name()" alt="" coords="176,6,315,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line" title="handle_line()" alt="" coords="5,6,128,38" />
</map>
<img src="call_graph_for_context_name.gif" alt='' usemap="#call_graph_for_context_name" 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="doclink"></a><span class="summary-sig-name">doclink</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">name</span>,
<span class="summary-sig-arg">docs</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.doclink">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_doclink-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_doclink-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_doclink" name="call_graph_for_doclink">
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__init__" title="apidoc.DottedName.__init__()" alt="" coords="315,6,566,38" />
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#url" title="html.HTMLWriter.url()" alt="" coords="340,62,540,94" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#doc_descr" title="doc_descr()" alt="" coords="386,118,495,150" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#doclink" title="doclink()" alt="" coords="176,62,267,94" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line" title="handle_line()" alt="" coords="6,62,128,94" />
</map>
<img src="call_graph_for_doclink.gif" alt='' usemap="#call_graph_for_doclink" 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="doc_descr"></a><span class="summary-sig-name">doc_descr</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">doc</span>,
<span class="summary-sig-arg">context</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.doc_descr">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_doc_descr-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_doc_descr-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_doc_descr" name="call_graph_for_doc_descr">
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__str__" title="apidoc.DottedName.__str__()" alt="" coords="303,6,545,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#doc_descr" title="doc_descr()" alt="" coords="144,34,253,66" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#doc_kind" title="doc_kind()" alt="" coords="372,62,476,94" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#doclink" title="doclink()" alt="" coords="5,34,96,66" />
</map>
<img src="call_graph_for_doc_descr.gif" alt='' usemap="#call_graph_for_doc_descr" 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="doc_kind"></a><span class="summary-sig-name">doc_kind</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">doc</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.doc_kind">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_doc_kind_2-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_doc_kind_2-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_doc_kind_2" name="call_graph_for_doc_kind_2">
<area shape="rect" href="epydoc.apidoc.DocIndex-class.html#container" title="apidoc.DocIndex.container()" alt="" coords="339,6,574,38" />
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__getitem__" title="apidoc.DottedName.__getitem__()" alt="" coords="316,62,596,94" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#doc_descr" title="doc_descr()" alt="" coords="6,34,115,66" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#doc_kind" title="doc_kind()" alt="" coords="163,34,267,66" />
</map>
<img src="call_graph_for_doc_kind_2.gif" alt='' usemap="#call_graph_for_doc_kind_2" 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="mark_def"></a><span class="summary-sig-name">mark_def</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">s</span>,
<span class="summary-sig-arg">name</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.mark_def">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_mark_def-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_mark_def-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_mark_def" name="call_graph_for_mark_def">
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line" title="handle_line()" alt="" coords="5,6,128,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#mark_def" title="mark_def()" alt="" coords="177,6,281,38" />
</map>
<img src="call_graph_for_mark_def.gif" alt='' usemap="#call_graph_for_mark_def" 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_docstring"></a><span class="summary-sig-name">is_docstring</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">line</span>,
<span class="summary-sig-arg">i</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.is_docstring">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_is_docstring-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_is_docstring-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_is_docstring" name="call_graph_for_is_docstring">
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line" title="handle_line()" alt="" coords="5,6,128,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#is_docstring" title="is_docstring()" alt="" coords="177,6,303,38" />
</map>
<img src="call_graph_for_is_docstring.gif" alt='' usemap="#call_graph_for_is_docstring" 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="add_line_numbers"></a><span class="summary-sig-name">add_line_numbers</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">s</span>,
<span class="summary-sig-arg">css_class</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.add_line_numbers">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_add_line_number-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_add_line_number-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_add_line_number" name="call_graph_for_add_line_number">
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#add_line_numbers" title="add_line_numbers()" alt="" coords="177,6,348,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#lineno_to_html" title="lineno_to_html()" alt="" coords="399,6,545,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line" title="handle_line()" alt="" coords="5,6,128,38" />
</map>
<img src="call_graph_for_add_line_number.gif" alt='' usemap="#call_graph_for_add_line_number" 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="name2url"></a><span class="summary-sig-name">name2url</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">class_name</span>,
<span class="summary-sig-arg">func_name</span>=<span class="summary-sig-default">None</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.name2url">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_name2url-summary-div');return false;">call graph</a></span>
</td>
</tr>
</table>
<div style="display:none" id="call_graph_for_name2url-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_name2url" name="call_graph_for_name2url">
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line" title="handle_line()" alt="" coords="5,6,128,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#name2url" title="name2url()" alt="" coords="176,6,280,38" />
</map>
<img src="call_graph_for_name2url.gif" alt='' usemap="#call_graph_for_name2url" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
</td>
</tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></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">Class Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-ClassVariables"
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.docwriter.html_colorize.PythonSourceColorizer-class.html#CSS_CLASSES" class="summary-name">CSS_CLASSES</a> = <code title="{'@': 'py-decorator',
'BASECLASS': 'py-base-class',
'COMMENT': 'py-comment',
'DECORATOR': 'py-decorator',
'DEFNAME': 'py-def-name',
'DOCSTRING': 'py-docstring',
'KEYWORD': 'py-keyword',
'NAME': 'py-name',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">@</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">py-decorator</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">BASECLASS</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">py-base-clas</code><code class="variable-ellipsis">...</code></code><br />
A look-up table that is used to determine which CSS class should be
used to colorize a given token.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#START_DEF_BLOCK" class="summary-name">START_DEF_BLOCK</a> = <code title="'<div id="%s-collapsed" style="display:none;" pad="%s" indent="%s"></d\
iv><div id="%s-expanded">'"><code class="variable-quote">'</code><code class="variable-string"><div id="%s-collapsed" style="display:none;</code><code class="variable-ellipsis">...</code></code><br />
HTML code for the beginning of a collapsable function or class
definition block.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="END_DEF_BLOCK"></a><span class="summary-name">END_DEF_BLOCK</span> = <code title="'</div>'"><code class="variable-quote">'</code><code class="variable-string"></div></code><code class="variable-quote">'</code></code><br />
HTML code for the end of a collapsable function or class definition
block.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#UNICODE_CODING_RE" class="summary-name">UNICODE_CODING_RE</a> = <code title="re.compile(r'.*?\n?.*?coding[:=]\s*([-\w\.]+)')">re.compile(r'.<code class="re-op">*?</code>\n<code class="re-op">?</code>.<code class="re-op">*?</code>coding<code class="re-group">[</code>:=<code class="re-group">]</code>\s<code class="re-op">*</code><code class="re-group">(</code><code class="re-group">[</code>-\w\.<code class="variable-ellipsis">...</code></code><br />
A regular expression used to pick out the unicode encoding for the
source file.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="ADD_DEF_BLOCKS"></a><span class="summary-name">ADD_DEF_BLOCKS</span> = <code title="True">True</code><br />
A configuration constant, used to determine whether or not to add
collapsable <div> elements for definition blocks.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="ADD_LINE_NUMBERS"></a><span class="summary-name">ADD_LINE_NUMBERS</span> = <code title="True">True</code><br />
A configuration constant, used to determine whether or not to add
line numbers.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="ADD_TOOLTIPS"></a><span class="summary-name">ADD_TOOLTIPS</span> = <code title="True">True</code><br />
A configuration constant, used to determine whether or not to add
tooltips for linked names.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="GUESS_LINK_TARGETS"></a><span class="summary-name">GUESS_LINK_TARGETS</span> = <code title="False">False</code><br />
If true, then try to guess which target is appropriate for linked
names; if false, then always open a div asking the user which one
they want.
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="_next_uid"></a><span class="summary-name">_next_uid</span> = <code title="0">0</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#_FIX_DECORATOR_RE" class="summary-name" onclick="show_private();">_FIX_DECORATOR_RE</a> = <code title="re.compile(r'(?m)((?:^<a name="L\d+"></a><tt class="py-lineno">\s*\d+<\
/tt>\s*<tt class="py-line">(?:<tt class="py-decorator">.*|\s*</tt>|\s*\
<tt class="py-comment">.*)\n)+)(<a name="\w+"></a><div id="\w+-def">)'\
)">re.compile(r'<code class="re-flags">(?m)</code><code class="re-group">(</code><code class="re-group">(?:</code>^<a name="L\d<code class="re-op">+</code>"></a><<code class="variable-ellipsis">...</code></code><br />
A regexp used to move the <div> that marks the beginning of a
function or method to just before the decorators.
</td>
</tr>
</table>
<!-- ==================== INSTANCE VARIABLES ==================== -->
<a name="section-InstanceVariables"></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">Instance Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceVariables"
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="module_filename"></a><span class="summary-name">module_filename</span><br />
The filename of the module we're colorizing.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="module_name"></a><span class="summary-name">module_name</span><br />
The dotted name of the module we're colorizing.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="docindex"></a><span class="summary-name">docindex</span><br />
A docindex, used to create href links from identifiers to the API
documentation for their values.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="name_to_docs"></a><span class="summary-name">name_to_docs</span><br />
A mapping from short names to lists of ValueDoc, used to decide which
values an identifier might map to when creating href links from
identifiers to the API docs for their values.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="url_func"></a><span class="summary-name">url_func</span><br />
A function that maps APIDoc -> URL, used to create href links from
identifiers to the API documentation for their values.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="pos"></a><span class="summary-name">pos</span><br />
The index in <code>text</code> of the last character of the last
token we've processed.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#line_offsets" class="summary-name">line_offsets</a><br />
A list that maps line numbers to character offsets in
<code>text</code>.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#cur_line" class="summary-name">cur_line</a><br />
A list of <code>(toktype, toktext)</code> for all tokens on the
logical line that we are currently processing.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#context" class="summary-name">context</a><br />
A list of the names of the class or functions that include the
current block.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#context_types" class="summary-name">context_types</a><br />
A list, corresponding one-to-one with <a
href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#context"
class="link">self.context</a>, indicating the type of each entry.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#indents" class="summary-name">indents</a><br />
A list of indentation strings for each of the current block's
indents.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="lineno"></a><span class="summary-name">lineno</span><br />
The line number of the line we're currently processing.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="def_name"></a><span class="summary-name">def_name</span><br />
The name of the class or function whose definition started on the
previous logical line, or <code>None</code> if the previous logical
line was not a class or function definition.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#def_type" class="summary-name">def_type</a><br />
The type of the class or function whose definition started on the
previous logical line, or <code>None</code> if the previous logical
line was not a class or function definition.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="tab_width"></a><span class="summary-name">tab_width</span><br />
The number of spaces to replace each tab in source code with
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></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">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></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">__init__</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">module_filename</span>,
<span class="sig-arg">module_name</span>,
<span class="sig-arg">docindex</span>=<span class="sig-default">None</span>,
<span class="sig-arg">url_func</span>=<span class="sig-default">None</span>,
<span class="sig-arg">name_to_docs</span>=<span class="sig-default">None</span>,
<span class="sig-arg">tab_width</span>=<span class="sig-default">8</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.__init__">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for___init___23-div');return false;">call graph</a></span> </td>
</tr></table>
<div style="display:none" id="call_graph_for___init___23-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for___init___23" name="call_graph_for___init___23">
<area shape="rect" href="epydoc.docwriter.html.HTMLWriter-class.html#write_sourcecode" title="html.HTMLWriter.write_sourcecode()" alt="" coords="6,6,318,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#__init__" title="__init__()" alt="" coords="367,6,463,38" />
<area shape="rect" href="epydoc.util-module.html#py_src_filename" title="util.py_src_filename()" alt="" coords="512,6,702,38" />
</map>
<img src="call_graph_for___init___23.gif" alt='' usemap="#call_graph_for___init___23" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
<p>Create a new HTML colorizer for the specified module.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>module_filename</code></strong> - The name of the file containing the module; its text will be
loaded from this file.</li>
<li><strong class="pname"><code>module_name</code></strong> - The dotted name of the module; this will be used to create links
back into the API source documentation.</li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<a name="tokeneater"></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">tokeneater</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">toktype</span>,
<span class="sig-arg">toktext</span>,
<span class="sig-arg">(srow, scol)</span>,
<span class="sig-arg">(erow, ecol)</span>,
<span class="sig-arg">line</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.tokeneater">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_tokeneater-div');return false;">call graph</a></span> </td>
</tr></table>
<div style="display:none" id="call_graph_for_tokeneater-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_tokeneater" name="call_graph_for_tokeneater">
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line" title="handle_line()" alt="" coords="165,6,288,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#tokeneater" title="tokeneater()" alt="" coords="5,6,117,38" />
</map>
<img src="call_graph_for_tokeneater.gif" alt='' usemap="#call_graph_for_tokeneater" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
<p>A callback function used by <code>tokenize.tokenize</code> to handle
each token in the module. <code>tokeneater</code> collects tokens into
the <code>self.cur_line</code> list until a complete logical line has
been formed; and then calls <a
href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line"
class="link">handle_line</a> to process that line.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="handle_line"></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">handle_line</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">line</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="epydoc.docwriter.html_colorize-pysrc.html#PythonSourceColorizer.handle_line">source code</a></span>
<br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_handle_line-div');return false;">call graph</a></span> </td>
</tr></table>
<div style="display:none" id="call_graph_for_handle_line-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><center> <map id="call_graph_for_handle_line" name="call_graph_for_handle_line">
<area shape="rect" href="epydoc.apidoc.DottedName-class.html#__str__" title="apidoc.DottedName.__str__()" alt="" coords="338,6,580,38" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#add_line_numbers" title="add_line_numbers()" alt="" coords="374,62,544,94" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#context_name" title="context_name()" alt="" coords="390,118,528,150" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#doclink" title="doclink()" alt="" coords="414,174,504,206" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line" title="handle_line()" alt="" coords="166,202,288,234" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#is_docstring" title="is_docstring()" alt="" coords="396,230,522,262" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#lineno_to_html" title="lineno_to_html()" alt="" coords="386,286,532,318" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#mark_def" title="mark_def()" alt="" coords="407,342,511,374" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#name2url" title="name2url()" alt="" coords="407,398,511,430" />
<area shape="rect" href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#tokeneater" title="tokeneater()" alt="" coords="6,202,118,234" />
</map>
<img src="call_graph_for_handle_line.gif" alt='' usemap="#call_graph_for_handle_line" ismap="ismap" class="graph-without-title" />
</center></td></tr>
<tr><th>Call Graph</th></tr>
</table><br />
</center></div>
<p>Render a single logical line from the module, and write the generated
HTML to <code>self.out</code>.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>line</code></strong> - A single logical line, encoded as a list of
<code>(toktype,tokttext)</code> pairs corresponding to the tokens
in the line.</li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></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">Class Variable Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-ClassVariableDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="CSS_CLASSES"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">CSS_CLASSES</h3>
<p>A look-up table that is used to determine which CSS class should be
used to colorize a given token. The following keys may be used:</p>
<ul>
<li>
Any token name (e.g., <code>'STRING'</code>)
</li>
<li>
Any operator token (e.g., <code>'='</code> or <code>'@'</code>).
</li>
<li>
<code>'KEYWORD'</code> -- Python keywords such as <code>'for'</code>
and <code>'if'</code>
</li>
<li>
<code>'DEFNAME'</code> -- the name of a class or function at the top
of its definition statement.
</li>
<li>
<code>'BASECLASS'</code> -- names of base classes at the top of a
class definition statement.
</li>
<li>
<code>'PARAM'</code> -- function parameters
</li>
<li>
<code>'DOCSTRING'</code> -- docstrings
</li>
<li>
<code>'DECORATOR'</code> -- decorator names
</li>
</ul>
<p>If no CSS class can be found for a given token, then it won't be
marked with any CSS class.</p>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">@</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">py-decorator</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">BASECLASS</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">py-base-class</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">COMMENT</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">py-comment</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">DECORATOR</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">py-decorator</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">DEFNAME</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">py-def-name</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">DOCSTRING</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">py-docstring</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">KEYWORD</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">py-keyword</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">NAME</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">py-name</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<a name="START_DEF_BLOCK"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">START_DEF_BLOCK</h3>
<p>HTML code for the beginning of a collapsable function or class
definition block. The block contains two <div>...</div>
elements -- a collapsed version and an expanded version -- and only one
of these elements is visible at any given time. By default, all
definition blocks are expanded.</p>
<p>This string should be interpolated with the following values:</p>
<pre class="literalblock">
(name, indentation, name)
</pre>
<p>Where <code>name</code> is the anchor name for the function or class;
and indentation is a string of whitespace used to indent the ellipsis
marker in the collapsed version.</p>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string"><div id="%s-collapsed" style="display:none;" pad="%s" indent="%s"></d</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">iv><div id="%s-expanded"></code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<a name="UNICODE_CODING_RE"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">UNICODE_CODING_RE</h3>
<p>A regular expression used to pick out the unicode encoding for the
source file.</p>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
re.compile(r'.<code class="re-op">*?</code>\n<code class="re-op">?</code>.<code class="re-op">*?</code>coding<code class="re-group">[</code>:=<code class="re-group">]</code>\s<code class="re-op">*</code><code class="re-group">(</code><code class="re-group">[</code>-\w\.<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>')
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<a name="_FIX_DECORATOR_RE"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">_FIX_DECORATOR_RE</h3>
<p>A regexp used to move the <div> that marks the beginning of a
function or method to just before the decorators.</p>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-flags">(?m)</code><code class="re-group">(</code><code class="re-group">(?:</code>^<a name="L\d<code class="re-op">+</code>"></a><tt class="py-lineno">\s<code class="re-op">*</code>\d<code class="re-op">+</code><<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
/tt>\s<code class="re-op">*</code><tt class="py-line"><code class="re-group">(?:</code><tt class="py-decorator">.<code class="re-op">*</code><code class="re-op">|</code>\s<code class="re-op">*</code></tt><code class="re-op">|</code>\s<code class="re-op">*</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<tt class="py-comment">.<code class="re-op">*</code><code class="re-group">)</code>\n<code class="re-group">)</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-group">(</code><a name="\w<code class="re-op">+</code>"></a><div id="\w<code class="re-op">+</code>-def"><code class="re-group">)</code>'<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
)
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== INSTANCE VARIABLE DETAILS ==================== -->
<a name="section-InstanceVariableDetails"></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">Instance Variable Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceVariableDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="line_offsets"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">line_offsets</h3>
<p>A list that maps line numbers to character offsets in
<code>text</code>. In particular, line <code><i
class="math">i</i></code> begins at character <code>line_offset[i]</code>
in <code>text</code>. Since line numbers begin at 1, the first element
of <code>line_offsets</code> is <code>None</code>.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="cur_line"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">cur_line</h3>
<p>A list of <code>(toktype, toktext)</code> for all tokens on the
logical line that we are currently processing. Once a complete line of
tokens has been collected in <code>cur_line</code>, it is sent to <a
href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#handle_line"
class="link">handle_line</a> for processing.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="context"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">context</h3>
<p>A list of the names of the class or functions that include the current
block. <code>context</code> has one element for each level of
indentation; <code>context[i]</code> is the name of the class or function
defined by the <code>i</code>th level of indentation, or
<code>None</code> if that level of indentation doesn't correspond to a
class or function definition.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="context_types"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">context_types</h3>
<p>A list, corresponding one-to-one with <a
href="epydoc.docwriter.html_colorize.PythonSourceColorizer-class.html#context"
class="link">self.context</a>, indicating the type of each entry. Each
element of <code>context_types</code> is one of: <code>'func'</code>,
<code>'class'</code>, <code>None</code>.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="indents"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">indents</h3>
<p>A list of indentation strings for each of the current block's indents.
I.e., the current total indentation can be found by taking
<code>''.join(self.indents)</code>.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="def_type"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">def_type</h3>
<p>The type of the class or function whose definition started on the
previous logical line, or <code>None</code> if the previous logical line
was not a class or function definition. Can be <code>'func'</code>,
<code>'class'</code>, <code>None</code>.</p>
<dl class="fields">
</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:08:16 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>
|