bee_python 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/{build/README → README} +1 -1
- data/egg/egg/build.yml +11 -49
- data/egg/egg.yml +19 -27
- data/egg/http/build.erb +32 -36
- data/egg/http/libhttp.py +102 -0
- data/egg/http/pylint.cfg +236 -0
- data/egg/http/server.py +7 -0
- data/egg/http/test.erb +32 -0
- data/egg/http.yml +33 -29
- data/egg/mysql/mysql.py +8 -9
- data/egg/project/build.erb +21 -53
- data/egg/project/pylint.cfg +236 -0
- data/egg/project/test.py +2 -2
- data/egg/project.yml +23 -31
- data/egg/script/build.erb +18 -23
- data/egg/script/pylint.cfg +236 -0
- data/egg/script.yml +22 -18
- data/egg/source/source.py +6 -6
- data/egg/test/test.py +1 -1
- data/lib/bee_task_python.rb +3 -34
- data/python.yml +123 -0
- metadata +61 -503
- data/test/build.yml +0 -16
- data/test/tc_bee_task_python.rb +0 -27
- data/test/test_build.rb +0 -26
- data/test/test_build_listener.rb +0 -110
- data/test/ts_bee_python.rb +0 -26
- data/tools/common/__init__.py +0 -5
- data/tools/common/common/__init__.py +0 -140
- data/tools/common/common/__pkginfo__.py +0 -43
- data/tools/common/common/adbh.py +0 -35
- data/tools/common/common/cache.py +0 -114
- data/tools/common/common/changelog.py +0 -234
- data/tools/common/common/clcommands.py +0 -181
- data/tools/common/common/cli.py +0 -212
- data/tools/common/common/compat.py +0 -328
- data/tools/common/common/configuration.py +0 -1087
- data/tools/common/common/contexts.py +0 -58
- data/tools/common/common/corbautils.py +0 -117
- data/tools/common/common/daemon.py +0 -171
- data/tools/common/common/date.py +0 -279
- data/tools/common/common/db.py +0 -49
- data/tools/common/common/dbf.py +0 -229
- data/tools/common/common/debugger.py +0 -208
- data/tools/common/common/decorators.py +0 -190
- data/tools/common/common/deprecation.py +0 -118
- data/tools/common/common/fileutils.py +0 -409
- data/tools/common/common/graph.py +0 -259
- data/tools/common/common/html.py +0 -142
- data/tools/common/common/interface.py +0 -76
- data/tools/common/common/logging_ext.py +0 -166
- data/tools/common/common/modutils.py +0 -670
- data/tools/common/common/optik_ext.py +0 -383
- data/tools/common/common/optparser.py +0 -92
- data/tools/common/common/pdf_ext.py +0 -111
- data/tools/common/common/proc.py +0 -276
- data/tools/common/common/pyro_ext.py +0 -146
- data/tools/common/common/pytest.py +0 -754
- data/tools/common/common/shellutils.py +0 -383
- data/tools/common/common/sphinx_ext.py +0 -87
- data/tools/common/common/sphinxutils.py +0 -122
- data/tools/common/common/sqlgen.py +0 -31
- data/tools/common/common/table.py +0 -930
- data/tools/common/common/tasksqueue.py +0 -97
- data/tools/common/common/test/__init__.py +0 -1
- data/tools/common/common/test/data/ChangeLog +0 -184
- data/tools/common/common/test/data/MyPyPa-0.1.0-py2.5.egg +0 -0
- data/tools/common/common/test/data/__init__.py +0 -1
- data/tools/common/common/test/data/content_differ_dir/NOTHING +0 -0
- data/tools/common/common/test/data/content_differ_dir/README +0 -1
- data/tools/common/common/test/data/content_differ_dir/subdir/coin +0 -1
- data/tools/common/common/test/data/content_differ_dir/subdir/toto.txt +0 -53
- data/tools/common/common/test/data/file_differ_dir/NOTHING +0 -0
- data/tools/common/common/test/data/file_differ_dir/README +0 -1
- data/tools/common/common/test/data/file_differ_dir/subdir/toto.txt +0 -53
- data/tools/common/common/test/data/file_differ_dir/subdirtwo/Hello +0 -0
- data/tools/common/common/test/data/find_test/__init__.py +0 -0
- data/tools/common/common/test/data/find_test/foo.txt +0 -0
- data/tools/common/common/test/data/find_test/module.py +0 -0
- data/tools/common/common/test/data/find_test/module2.py +0 -0
- data/tools/common/common/test/data/find_test/newlines.txt +0 -0
- data/tools/common/common/test/data/find_test/noendingnewline.py +0 -0
- data/tools/common/common/test/data/find_test/nonregr.py +0 -0
- data/tools/common/common/test/data/find_test/normal_file.txt +0 -0
- data/tools/common/common/test/data/find_test/spam.txt +0 -0
- data/tools/common/common/test/data/find_test/sub/doc.txt +0 -0
- data/tools/common/common/test/data/find_test/sub/momo.py +0 -0
- data/tools/common/common/test/data/find_test/test.ini +0 -0
- data/tools/common/common/test/data/find_test/test1.msg +0 -0
- data/tools/common/common/test/data/find_test/test2.msg +0 -0
- data/tools/common/common/test/data/find_test/write_protected_file.txt +0 -0
- data/tools/common/common/test/data/foo.txt +0 -9
- data/tools/common/common/test/data/module.py +0 -88
- data/tools/common/common/test/data/module2.py +0 -77
- data/tools/common/common/test/data/newlines.txt +0 -3
- data/tools/common/common/test/data/noendingnewline.py +0 -36
- data/tools/common/common/test/data/nonregr.py +0 -14
- data/tools/common/common/test/data/normal_file.txt +0 -0
- data/tools/common/common/test/data/reference_dir/NOTHING +0 -0
- data/tools/common/common/test/data/reference_dir/README +0 -1
- data/tools/common/common/test/data/reference_dir/subdir/coin +0 -1
- data/tools/common/common/test/data/reference_dir/subdir/toto.txt +0 -53
- data/tools/common/common/test/data/same_dir/NOTHING +0 -0
- data/tools/common/common/test/data/same_dir/README +0 -1
- data/tools/common/common/test/data/same_dir/subdir/coin +0 -1
- data/tools/common/common/test/data/same_dir/subdir/toto.txt +0 -53
- data/tools/common/common/test/data/spam.txt +0 -9
- data/tools/common/common/test/data/sub/doc.txt +0 -1
- data/tools/common/common/test/data/sub/momo.py +0 -1
- data/tools/common/common/test/data/subdir_differ_dir/NOTHING +0 -0
- data/tools/common/common/test/data/subdir_differ_dir/README +0 -1
- data/tools/common/common/test/data/subdir_differ_dir/subdir/coin +0 -1
- data/tools/common/common/test/data/subdir_differ_dir/subdir/toto.txt +0 -53
- data/tools/common/common/test/data/test.ini +0 -20
- data/tools/common/common/test/data/test1.msg +0 -30
- data/tools/common/common/test/data/test2.msg +0 -42
- data/tools/common/common/test/data/write_protected_file.txt +0 -0
- data/tools/common/common/test/foomod.py +0 -17
- data/tools/common/common/test/unittest_cache.py +0 -129
- data/tools/common/common/test/unittest_changelog.py +0 -37
- data/tools/common/common/test/unittest_compat.py +0 -239
- data/tools/common/common/test/unittest_configuration.py +0 -348
- data/tools/common/common/test/unittest_date.py +0 -154
- data/tools/common/common/test/unittest_decorators.py +0 -62
- data/tools/common/common/test/unittest_deprecation.py +0 -76
- data/tools/common/common/test/unittest_fileutils.py +0 -133
- data/tools/common/common/test/unittest_graph.py +0 -50
- data/tools/common/common/test/unittest_html.py +0 -76
- data/tools/common/common/test/unittest_interface.py +0 -87
- data/tools/common/common/test/unittest_modutils.py +0 -244
- data/tools/common/common/test/unittest_pytest.py +0 -50
- data/tools/common/common/test/unittest_shellutils.py +0 -248
- data/tools/common/common/test/unittest_table.py +0 -448
- data/tools/common/common/test/unittest_taskqueue.py +0 -71
- data/tools/common/common/test/unittest_testlib.py +0 -956
- data/tools/common/common/test/unittest_textutils.py +0 -247
- data/tools/common/common/test/unittest_tree.py +0 -248
- data/tools/common/common/test/unittest_umessage.py +0 -55
- data/tools/common/common/test/unittest_ureports_html.py +0 -64
- data/tools/common/common/test/unittest_ureports_text.py +0 -105
- data/tools/common/common/test/unittest_xmlutils.py +0 -75
- data/tools/common/common/test/utils.py +0 -87
- data/tools/common/common/testlib.py +0 -1927
- data/tools/common/common/textutils.py +0 -476
- data/tools/common/common/tree.py +0 -372
- data/tools/common/common/umessage.py +0 -161
- data/tools/common/common/ureports/__init__.py +0 -174
- data/tools/common/common/ureports/docbook_writer.py +0 -139
- data/tools/common/common/ureports/html_writer.py +0 -131
- data/tools/common/common/ureports/nodes.py +0 -201
- data/tools/common/common/ureports/text_writer.py +0 -140
- data/tools/common/common/vcgutils.py +0 -216
- data/tools/common/common/visitor.py +0 -107
- data/tools/common/common/xmlrpcutils.py +0 -136
- data/tools/common/common/xmlutils.py +0 -61
- data/tools/coverage/coverage.py +0 -602
- data/tools/epydoc/__init__.py +0 -227
- data/tools/epydoc/__init__.pyc +0 -0
- data/tools/epydoc/apidoc.py +0 -2203
- data/tools/epydoc/apidoc.pyc +0 -0
- data/tools/epydoc/checker.py +0 -349
- data/tools/epydoc/checker.pyc +0 -0
- data/tools/epydoc/cli.py +0 -1470
- data/tools/epydoc/cli.pyc +0 -0
- data/tools/epydoc/compat.py +0 -250
- data/tools/epydoc/compat.pyc +0 -0
- data/tools/epydoc/docbuilder.py +0 -1358
- data/tools/epydoc/docbuilder.pyc +0 -0
- data/tools/epydoc/docintrospecter.py +0 -1056
- data/tools/epydoc/docintrospecter.pyc +0 -0
- data/tools/epydoc/docparser.py +0 -2113
- data/tools/epydoc/docparser.pyc +0 -0
- data/tools/epydoc/docstringparser.py +0 -1111
- data/tools/epydoc/docstringparser.pyc +0 -0
- data/tools/epydoc/docwriter/__init__.py +0 -12
- data/tools/epydoc/docwriter/__init__.pyc +0 -0
- data/tools/epydoc/docwriter/dotgraph.py +0 -1351
- data/tools/epydoc/docwriter/dotgraph.pyc +0 -0
- data/tools/epydoc/docwriter/html.py +0 -3491
- data/tools/epydoc/docwriter/html.pyc +0 -0
- data/tools/epydoc/docwriter/html_colorize.py +0 -909
- data/tools/epydoc/docwriter/html_colorize.pyc +0 -0
- data/tools/epydoc/docwriter/html_css.py +0 -550
- data/tools/epydoc/docwriter/html_css.pyc +0 -0
- data/tools/epydoc/docwriter/html_help.py +0 -190
- data/tools/epydoc/docwriter/html_help.pyc +0 -0
- data/tools/epydoc/docwriter/latex.py +0 -1187
- data/tools/epydoc/docwriter/latex.pyc +0 -0
- data/tools/epydoc/docwriter/plaintext.py +0 -276
- data/tools/epydoc/docwriter/plaintext.pyc +0 -0
- data/tools/epydoc/docwriter/xlink.py +0 -505
- data/tools/epydoc/docwriter/xlink.pyc +0 -0
- data/tools/epydoc/gui.py +0 -1148
- data/tools/epydoc/gui.pyc +0 -0
- data/tools/epydoc/log.py +0 -204
- data/tools/epydoc/log.pyc +0 -0
- data/tools/epydoc/markup/__init__.py +0 -623
- data/tools/epydoc/markup/__init__.pyc +0 -0
- data/tools/epydoc/markup/doctest.py +0 -311
- data/tools/epydoc/markup/doctest.pyc +0 -0
- data/tools/epydoc/markup/epytext.py +0 -2116
- data/tools/epydoc/markup/epytext.pyc +0 -0
- data/tools/epydoc/markup/javadoc.py +0 -250
- data/tools/epydoc/markup/javadoc.pyc +0 -0
- data/tools/epydoc/markup/plaintext.py +0 -78
- data/tools/epydoc/markup/plaintext.pyc +0 -0
- data/tools/epydoc/markup/pyval_repr.py +0 -532
- data/tools/epydoc/markup/pyval_repr.pyc +0 -0
- data/tools/epydoc/markup/restructuredtext.py +0 -906
- data/tools/epydoc/markup/restructuredtext.pyc +0 -0
- data/tools/epydoc/test/__init__.py +0 -97
- data/tools/epydoc/test/__init__.pyc +0 -0
- data/tools/epydoc/test/util.py +0 -226
- data/tools/epydoc/test/util.pyc +0 -0
- data/tools/epydoc/util.py +0 -289
- data/tools/epydoc/util.pyc +0 -0
- data/tools/logilab/logilab/__init__.py +0 -5
- data/tools/logilab/logilab/astng/__init__.py +0 -82
- data/tools/logilab/logilab/astng/__pkginfo__.py +0 -76
- data/tools/logilab/logilab/astng/_exceptions.py +0 -64
- data/tools/logilab/logilab/astng/_nodes_ast.py +0 -667
- data/tools/logilab/logilab/astng/_nodes_compiler.py +0 -758
- data/tools/logilab/logilab/astng/bases.py +0 -608
- data/tools/logilab/logilab/astng/builder.py +0 -239
- data/tools/logilab/logilab/astng/inference.py +0 -426
- data/tools/logilab/logilab/astng/inspector.py +0 -289
- data/tools/logilab/logilab/astng/manager.py +0 -421
- data/tools/logilab/logilab/astng/mixins.py +0 -165
- data/tools/logilab/logilab/astng/node_classes.py +0 -848
- data/tools/logilab/logilab/astng/nodes.py +0 -85
- data/tools/logilab/logilab/astng/nodes_as_string.py +0 -389
- data/tools/logilab/logilab/astng/patchcomptransformer.py +0 -159
- data/tools/logilab/logilab/astng/protocols.py +0 -333
- data/tools/logilab/logilab/astng/raw_building.py +0 -212
- data/tools/logilab/logilab/astng/rebuilder.py +0 -307
- data/tools/logilab/logilab/astng/scoped_nodes.py +0 -951
- data/tools/logilab/logilab/astng/test/__init__.py +0 -19
- data/tools/logilab/logilab/astng/test/data/MyPyPa-0.1.0-py2.5.egg +0 -0
- data/tools/logilab/logilab/astng/test/data/MyPyPa-0.1.0-py2.5.zip +0 -0
- data/tools/logilab/logilab/astng/test/data/SSL1/Connection1.py +0 -33
- data/tools/logilab/logilab/astng/test/data/SSL1/__init__.py +0 -20
- data/tools/logilab/logilab/astng/test/data/__init__.py +0 -20
- data/tools/logilab/logilab/astng/test/data/all.py +0 -29
- data/tools/logilab/logilab/astng/test/data/appl/__init__.py +0 -23
- data/tools/logilab/logilab/astng/test/data/appl/myConnection.py +0 -30
- data/tools/logilab/logilab/astng/test/data/format.py +0 -34
- data/tools/logilab/logilab/astng/test/data/module.py +0 -90
- data/tools/logilab/logilab/astng/test/data/module2.py +0 -112
- data/tools/logilab/logilab/astng/test/data/noendingnewline.py +0 -57
- data/tools/logilab/logilab/astng/test/data/nonregr.py +0 -76
- data/tools/logilab/logilab/astng/test/data/notall.py +0 -28
- data/tools/logilab/logilab/astng/test/data2/__init__.py +0 -20
- data/tools/logilab/logilab/astng/test/data2/clientmodule_test.py +0 -51
- data/tools/logilab/logilab/astng/test/data2/suppliermodule_test.py +0 -32
- data/tools/logilab/logilab/astng/test/regrtest.py +0 -135
- data/tools/logilab/logilab/astng/test/regrtest_data/absimport.py +0 -22
- data/tools/logilab/logilab/astng/test/regrtest_data/descriptor_crash.py +0 -31
- data/tools/logilab/logilab/astng/test/regrtest_data/import_package_subpackage_module.py +0 -68
- data/tools/logilab/logilab/astng/test/regrtest_data/package/__init__.py +0 -24
- data/tools/logilab/logilab/astng/test/regrtest_data/package/subpackage/__init__.py +0 -20
- data/tools/logilab/logilab/astng/test/regrtest_data/package/subpackage/module.py +0 -20
- data/tools/logilab/logilab/astng/test/unittest_builder.py +0 -684
- data/tools/logilab/logilab/astng/test/unittest_inference.py +0 -1112
- data/tools/logilab/logilab/astng/test/unittest_inspector.py +0 -105
- data/tools/logilab/logilab/astng/test/unittest_lookup.py +0 -302
- data/tools/logilab/logilab/astng/test/unittest_manager.py +0 -98
- data/tools/logilab/logilab/astng/test/unittest_nodes.py +0 -302
- data/tools/logilab/logilab/astng/test/unittest_scoped_nodes.py +0 -501
- data/tools/logilab/logilab/astng/test/unittest_utils.py +0 -104
- data/tools/logilab/logilab/astng/utils.py +0 -342
- data/tools/logilab/logilab/common/__init__.py +0 -140
- data/tools/logilab/logilab/common/__pkginfo__.py +0 -43
- data/tools/logilab/logilab/common/adbh.py +0 -35
- data/tools/logilab/logilab/common/cache.py +0 -114
- data/tools/logilab/logilab/common/changelog.py +0 -234
- data/tools/logilab/logilab/common/clcommands.py +0 -181
- data/tools/logilab/logilab/common/cli.py +0 -212
- data/tools/logilab/logilab/common/compat.py +0 -328
- data/tools/logilab/logilab/common/configuration.py +0 -1087
- data/tools/logilab/logilab/common/contexts.py +0 -58
- data/tools/logilab/logilab/common/corbautils.py +0 -117
- data/tools/logilab/logilab/common/daemon.py +0 -171
- data/tools/logilab/logilab/common/date.py +0 -279
- data/tools/logilab/logilab/common/db.py +0 -49
- data/tools/logilab/logilab/common/dbf.py +0 -229
- data/tools/logilab/logilab/common/debugger.py +0 -208
- data/tools/logilab/logilab/common/decorators.py +0 -190
- data/tools/logilab/logilab/common/deprecation.py +0 -118
- data/tools/logilab/logilab/common/fileutils.py +0 -409
- data/tools/logilab/logilab/common/graph.py +0 -259
- data/tools/logilab/logilab/common/html.py +0 -142
- data/tools/logilab/logilab/common/interface.py +0 -76
- data/tools/logilab/logilab/common/logging_ext.py +0 -166
- data/tools/logilab/logilab/common/modutils.py +0 -670
- data/tools/logilab/logilab/common/optik_ext.py +0 -383
- data/tools/logilab/logilab/common/optparser.py +0 -92
- data/tools/logilab/logilab/common/pdf_ext.py +0 -111
- data/tools/logilab/logilab/common/proc.py +0 -276
- data/tools/logilab/logilab/common/pyro_ext.py +0 -146
- data/tools/logilab/logilab/common/pytest.py +0 -754
- data/tools/logilab/logilab/common/shellutils.py +0 -383
- data/tools/logilab/logilab/common/sphinx_ext.py +0 -87
- data/tools/logilab/logilab/common/sphinxutils.py +0 -122
- data/tools/logilab/logilab/common/sqlgen.py +0 -31
- data/tools/logilab/logilab/common/table.py +0 -930
- data/tools/logilab/logilab/common/tasksqueue.py +0 -97
- data/tools/logilab/logilab/common/test/__init__.py +0 -1
- data/tools/logilab/logilab/common/test/data/ChangeLog +0 -184
- data/tools/logilab/logilab/common/test/data/MyPyPa-0.1.0-py2.5.egg +0 -0
- data/tools/logilab/logilab/common/test/data/__init__.py +0 -1
- data/tools/logilab/logilab/common/test/data/content_differ_dir/NOTHING +0 -0
- data/tools/logilab/logilab/common/test/data/content_differ_dir/README +0 -1
- data/tools/logilab/logilab/common/test/data/content_differ_dir/subdir/coin +0 -1
- data/tools/logilab/logilab/common/test/data/content_differ_dir/subdir/toto.txt +0 -53
- data/tools/logilab/logilab/common/test/data/file_differ_dir/NOTHING +0 -0
- data/tools/logilab/logilab/common/test/data/file_differ_dir/README +0 -1
- data/tools/logilab/logilab/common/test/data/file_differ_dir/subdir/toto.txt +0 -53
- data/tools/logilab/logilab/common/test/data/file_differ_dir/subdirtwo/Hello +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/__init__.py +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/foo.txt +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/module.py +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/module2.py +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/newlines.txt +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/noendingnewline.py +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/nonregr.py +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/normal_file.txt +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/spam.txt +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/sub/doc.txt +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/sub/momo.py +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/test.ini +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/test1.msg +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/test2.msg +0 -0
- data/tools/logilab/logilab/common/test/data/find_test/write_protected_file.txt +0 -0
- data/tools/logilab/logilab/common/test/data/foo.txt +0 -9
- data/tools/logilab/logilab/common/test/data/module.py +0 -88
- data/tools/logilab/logilab/common/test/data/module2.py +0 -77
- data/tools/logilab/logilab/common/test/data/newlines.txt +0 -3
- data/tools/logilab/logilab/common/test/data/noendingnewline.py +0 -36
- data/tools/logilab/logilab/common/test/data/nonregr.py +0 -14
- data/tools/logilab/logilab/common/test/data/normal_file.txt +0 -0
- data/tools/logilab/logilab/common/test/data/reference_dir/NOTHING +0 -0
- data/tools/logilab/logilab/common/test/data/reference_dir/README +0 -1
- data/tools/logilab/logilab/common/test/data/reference_dir/subdir/coin +0 -1
- data/tools/logilab/logilab/common/test/data/reference_dir/subdir/toto.txt +0 -53
- data/tools/logilab/logilab/common/test/data/same_dir/NOTHING +0 -0
- data/tools/logilab/logilab/common/test/data/same_dir/README +0 -1
- data/tools/logilab/logilab/common/test/data/same_dir/subdir/coin +0 -1
- data/tools/logilab/logilab/common/test/data/same_dir/subdir/toto.txt +0 -53
- data/tools/logilab/logilab/common/test/data/spam.txt +0 -9
- data/tools/logilab/logilab/common/test/data/sub/doc.txt +0 -1
- data/tools/logilab/logilab/common/test/data/sub/momo.py +0 -1
- data/tools/logilab/logilab/common/test/data/subdir_differ_dir/NOTHING +0 -0
- data/tools/logilab/logilab/common/test/data/subdir_differ_dir/README +0 -1
- data/tools/logilab/logilab/common/test/data/subdir_differ_dir/subdir/coin +0 -1
- data/tools/logilab/logilab/common/test/data/subdir_differ_dir/subdir/toto.txt +0 -53
- data/tools/logilab/logilab/common/test/data/test.ini +0 -20
- data/tools/logilab/logilab/common/test/data/test1.msg +0 -30
- data/tools/logilab/logilab/common/test/data/test2.msg +0 -42
- data/tools/logilab/logilab/common/test/data/write_protected_file.txt +0 -0
- data/tools/logilab/logilab/common/test/foomod.py +0 -17
- data/tools/logilab/logilab/common/test/unittest_cache.py +0 -129
- data/tools/logilab/logilab/common/test/unittest_changelog.py +0 -37
- data/tools/logilab/logilab/common/test/unittest_compat.py +0 -239
- data/tools/logilab/logilab/common/test/unittest_configuration.py +0 -348
- data/tools/logilab/logilab/common/test/unittest_date.py +0 -154
- data/tools/logilab/logilab/common/test/unittest_decorators.py +0 -62
- data/tools/logilab/logilab/common/test/unittest_deprecation.py +0 -76
- data/tools/logilab/logilab/common/test/unittest_fileutils.py +0 -133
- data/tools/logilab/logilab/common/test/unittest_graph.py +0 -50
- data/tools/logilab/logilab/common/test/unittest_html.py +0 -76
- data/tools/logilab/logilab/common/test/unittest_interface.py +0 -87
- data/tools/logilab/logilab/common/test/unittest_modutils.py +0 -244
- data/tools/logilab/logilab/common/test/unittest_pytest.py +0 -50
- data/tools/logilab/logilab/common/test/unittest_shellutils.py +0 -248
- data/tools/logilab/logilab/common/test/unittest_table.py +0 -448
- data/tools/logilab/logilab/common/test/unittest_taskqueue.py +0 -71
- data/tools/logilab/logilab/common/test/unittest_testlib.py +0 -956
- data/tools/logilab/logilab/common/test/unittest_textutils.py +0 -247
- data/tools/logilab/logilab/common/test/unittest_tree.py +0 -248
- data/tools/logilab/logilab/common/test/unittest_umessage.py +0 -55
- data/tools/logilab/logilab/common/test/unittest_ureports_html.py +0 -64
- data/tools/logilab/logilab/common/test/unittest_ureports_text.py +0 -105
- data/tools/logilab/logilab/common/test/unittest_xmlutils.py +0 -75
- data/tools/logilab/logilab/common/test/utils.py +0 -87
- data/tools/logilab/logilab/common/testlib.py +0 -1927
- data/tools/logilab/logilab/common/textutils.py +0 -476
- data/tools/logilab/logilab/common/tree.py +0 -372
- data/tools/logilab/logilab/common/umessage.py +0 -161
- data/tools/logilab/logilab/common/ureports/__init__.py +0 -174
- data/tools/logilab/logilab/common/ureports/docbook_writer.py +0 -139
- data/tools/logilab/logilab/common/ureports/html_writer.py +0 -131
- data/tools/logilab/logilab/common/ureports/nodes.py +0 -201
- data/tools/logilab/logilab/common/ureports/text_writer.py +0 -140
- data/tools/logilab/logilab/common/vcgutils.py +0 -216
- data/tools/logilab/logilab/common/visitor.py +0 -107
- data/tools/logilab/logilab/common/xmlrpcutils.py +0 -136
- data/tools/logilab/logilab/common/xmlutils.py +0 -61
- data/tools/pychecker/COPYRIGHT +0 -31
- data/tools/pychecker/ChangeLog +0 -349
- data/tools/pychecker/CodeChecks.py +0 -1969
- data/tools/pychecker/CodeChecks.pyc +0 -0
- data/tools/pychecker/CodeChecks.pyo +0 -0
- data/tools/pychecker/Config.py +0 -475
- data/tools/pychecker/Config.pyc +0 -0
- data/tools/pychecker/Config.pyo +0 -0
- data/tools/pychecker/KNOWN_BUGS +0 -100
- data/tools/pychecker/MAINTAINERS +0 -81
- data/tools/pychecker/NEWS +0 -406
- data/tools/pychecker/OP.py +0 -131
- data/tools/pychecker/OP.pyc +0 -0
- data/tools/pychecker/OP.pyo +0 -0
- data/tools/pychecker/OptionTypes.py +0 -117
- data/tools/pychecker/OptionTypes.pyc +0 -0
- data/tools/pychecker/OptionTypes.pyo +0 -0
- data/tools/pychecker/README +0 -152
- data/tools/pychecker/Stack.py +0 -115
- data/tools/pychecker/Stack.pyc +0 -0
- data/tools/pychecker/Stack.pyo +0 -0
- data/tools/pychecker/TODO +0 -101
- data/tools/pychecker/VERSION +0 -1
- data/tools/pychecker/Warning.py +0 -50
- data/tools/pychecker/Warning.pyc +0 -0
- data/tools/pychecker/Warning.pyo +0 -0
- data/tools/pychecker/__init__.py +0 -17
- data/tools/pychecker/__init__.pyc +0 -0
- data/tools/pychecker/__init__.pyo +0 -0
- data/tools/pychecker/checker.py +0 -961
- data/tools/pychecker/checker.pyc +0 -0
- data/tools/pychecker/checker.pyo +0 -0
- data/tools/pychecker/function.py +0 -159
- data/tools/pychecker/function.pyc +0 -0
- data/tools/pychecker/function.pyo +0 -0
- data/tools/pychecker/msgs.py +0 -175
- data/tools/pychecker/msgs.pyc +0 -0
- data/tools/pychecker/msgs.pyo +0 -0
- data/tools/pychecker/options.py +0 -275
- data/tools/pychecker/options.pyc +0 -0
- data/tools/pychecker/options.pyo +0 -0
- data/tools/pychecker/pcmodules.py +0 -19
- data/tools/pychecker/pcmodules.pyc +0 -0
- data/tools/pychecker/pcmodules.pyo +0 -0
- data/tools/pychecker/printer.py +0 -47
- data/tools/pychecker/printer.pyc +0 -0
- data/tools/pychecker/printer.pyo +0 -0
- data/tools/pychecker/python.py +0 -427
- data/tools/pychecker/python.pyc +0 -0
- data/tools/pychecker/python.pyo +0 -0
- data/tools/pychecker/utils.py +0 -102
- data/tools/pychecker/utils.pyc +0 -0
- data/tools/pychecker/utils.pyo +0 -0
- data/tools/pychecker/warn.py +0 -778
- data/tools/pychecker/warn.pyc +0 -0
- data/tools/pychecker/warn.pyo +0 -0
- data/tools/pylint2/pylint/__init__.py +0 -16
- data/tools/pylint2/pylint/__pkginfo__.py +0 -67
- data/tools/pylint2/pylint/checkers/__init__.py +0 -155
- data/tools/pylint2/pylint/checkers/base.py +0 -749
- data/tools/pylint2/pylint/checkers/classes.py +0 -527
- data/tools/pylint2/pylint/checkers/design_analysis.py +0 -344
- data/tools/pylint2/pylint/checkers/exceptions.py +0 -183
- data/tools/pylint2/pylint/checkers/format.py +0 -367
- data/tools/pylint2/pylint/checkers/imports.py +0 -379
- data/tools/pylint2/pylint/checkers/logging.py +0 -98
- data/tools/pylint2/pylint/checkers/misc.py +0 -128
- data/tools/pylint2/pylint/checkers/newstyle.py +0 -107
- data/tools/pylint2/pylint/checkers/raw_metrics.py +0 -125
- data/tools/pylint2/pylint/checkers/similar.py +0 -333
- data/tools/pylint2/pylint/checkers/string_format.py +0 -239
- data/tools/pylint2/pylint/checkers/typecheck.py +0 -364
- data/tools/pylint2/pylint/checkers/utils.py +0 -208
- data/tools/pylint2/pylint/checkers/variables.py +0 -498
- data/tools/pylint2/pylint/config.py +0 -149
- data/tools/pylint2/pylint/epylint.py +0 -149
- data/tools/pylint2/pylint/gui.py +0 -433
- data/tools/pylint2/pylint/interfaces.py +0 -98
- data/tools/pylint2/pylint/lint.py +0 -914
- data/tools/pylint2/pylint/pyreverse/__init__.py +0 -5
- data/tools/pylint2/pylint/pyreverse/diadefslib.py +0 -229
- data/tools/pylint2/pylint/pyreverse/diagrams.py +0 -247
- data/tools/pylint2/pylint/pyreverse/main.py +0 -123
- data/tools/pylint2/pylint/pyreverse/utils.py +0 -131
- data/tools/pylint2/pylint/pyreverse/writer.py +0 -196
- data/tools/pylint2/pylint/reporters/__init__.py +0 -67
- data/tools/pylint2/pylint/reporters/guireporter.py +0 -36
- data/tools/pylint2/pylint/reporters/html.py +0 -69
- data/tools/pylint2/pylint/reporters/text.py +0 -156
- data/tools/pylint2/pylint/utils.py +0 -518
- data/tools/pylint2/pylint.py +0 -16
@@ -1,311 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# doctest.py: Syntax Highlighting for doctest blocks
|
3
|
-
# Edward Loper
|
4
|
-
#
|
5
|
-
# Created [06/28/03 02:52 AM]
|
6
|
-
# $Id: doctest.py,v 1.1 2009/11/26 13:20:49 casa Exp $
|
7
|
-
#
|
8
|
-
|
9
|
-
"""
|
10
|
-
Syntax highlighting for doctest blocks. This module defines two
|
11
|
-
functions, L{doctest_to_html()} and L{doctest_to_latex()}, which can
|
12
|
-
be used to perform syntax highlighting on doctest blocks. It also
|
13
|
-
defines the more general C{colorize_doctest()}, which could be used to
|
14
|
-
do syntac highlighting on doctest blocks with other output formats.
|
15
|
-
(Both C{doctest_to_html()} and C{doctest_to_latex()} are defined using
|
16
|
-
C{colorize_doctest()}.)
|
17
|
-
"""
|
18
|
-
__docformat__ = 'epytext en'
|
19
|
-
|
20
|
-
import re
|
21
|
-
from epydoc.util import plaintext_to_html, plaintext_to_latex
|
22
|
-
|
23
|
-
__all__ = ['doctest_to_html', 'doctest_to_latex',
|
24
|
-
'DoctestColorizer', 'XMLDoctestColorizer',
|
25
|
-
'HTMLDoctestColorizer', 'LaTeXDoctestColorizer']
|
26
|
-
|
27
|
-
def doctest_to_html(s):
|
28
|
-
"""
|
29
|
-
Perform syntax highlighting on the given doctest string, and
|
30
|
-
return the resulting HTML code. This code consists of a C{<pre>}
|
31
|
-
block with class=py-doctest. Syntax highlighting is performed
|
32
|
-
using the following css classes:
|
33
|
-
|
34
|
-
- C{py-prompt} -- the Python PS1 prompt (>>>)
|
35
|
-
- C{py-more} -- the Python PS2 prompt (...)
|
36
|
-
- C{py-keyword} -- a Python keyword (for, if, etc.)
|
37
|
-
- C{py-builtin} -- a Python builtin name (abs, dir, etc.)
|
38
|
-
- C{py-string} -- a string literal
|
39
|
-
- C{py-comment} -- a comment
|
40
|
-
- C{py-except} -- an exception traceback (up to the next >>>)
|
41
|
-
- C{py-output} -- the output from a doctest block.
|
42
|
-
- C{py-defname} -- the name of a function or class defined by
|
43
|
-
a C{def} or C{class} statement.
|
44
|
-
"""
|
45
|
-
return HTMLDoctestColorizer().colorize_doctest(s)
|
46
|
-
|
47
|
-
def doctest_to_latex(s):
|
48
|
-
"""
|
49
|
-
Perform syntax highlighting on the given doctest string, and
|
50
|
-
return the resulting LaTeX code. This code consists of an
|
51
|
-
C{alltt} environment. Syntax highlighting is performed using
|
52
|
-
the following new latex commands, which must be defined externally:
|
53
|
-
- C{\pysrcprompt} -- the Python PS1 prompt (>>>)
|
54
|
-
- C{\pysrcmore} -- the Python PS2 prompt (...)
|
55
|
-
- C{\pysrckeyword} -- a Python keyword (for, if, etc.)
|
56
|
-
- C{\pysrcbuiltin} -- a Python builtin name (abs, dir, etc.)
|
57
|
-
- C{\pysrcstring} -- a string literal
|
58
|
-
- C{\pysrccomment} -- a comment
|
59
|
-
- C{\pysrcexcept} -- an exception traceback (up to the next >>>)
|
60
|
-
- C{\pysrcoutput} -- the output from a doctest block.
|
61
|
-
- C{\pysrcdefname} -- the name of a function or class defined by
|
62
|
-
a C{def} or C{class} statement.
|
63
|
-
"""
|
64
|
-
return LaTeXDoctestColorizer().colorize_doctest(s)
|
65
|
-
|
66
|
-
class DoctestColorizer:
|
67
|
-
"""
|
68
|
-
An abstract base class for performing syntax highlighting on
|
69
|
-
doctest blocks and other bits of Python code. Subclasses should
|
70
|
-
provide definitions for:
|
71
|
-
|
72
|
-
- The L{markup()} method, which takes a substring and a tag, and
|
73
|
-
returns a colorized version of the substring.
|
74
|
-
- The L{PREFIX} and L{SUFFIX} variables, which will be added
|
75
|
-
to the beginning and end of the strings returned by
|
76
|
-
L{colorize_codeblock} and L{colorize_doctest}.
|
77
|
-
"""
|
78
|
-
|
79
|
-
#: A string that is added to the beginning of the strings
|
80
|
-
#: returned by L{colorize_codeblock} and L{colorize_doctest}.
|
81
|
-
#: Typically, this string begins a preformatted area.
|
82
|
-
PREFIX = None
|
83
|
-
|
84
|
-
#: A string that is added to the end of the strings
|
85
|
-
#: returned by L{colorize_codeblock} and L{colorize_doctest}.
|
86
|
-
#: Typically, this string ends a preformatted area.
|
87
|
-
SUFFIX = None
|
88
|
-
|
89
|
-
#: A list of the names of all Python keywords. ('as' is included
|
90
|
-
#: even though it is technically not a keyword.)
|
91
|
-
_KEYWORDS = ("and del for is raise"
|
92
|
-
"assert elif from lambda return"
|
93
|
-
"break else global not try"
|
94
|
-
"class except if or while"
|
95
|
-
"continue exec import pass yield"
|
96
|
-
"def finally in print as").split()
|
97
|
-
|
98
|
-
#: A list of all Python builtins.
|
99
|
-
_BUILTINS = [_BI for _BI in dir(__builtins__)
|
100
|
-
if not _BI.startswith('__')]
|
101
|
-
|
102
|
-
#: A regexp group that matches keywords.
|
103
|
-
_KEYWORD_GRP = '|'.join([r'\b%s\b' % _KW for _KW in _KEYWORDS])
|
104
|
-
|
105
|
-
#: A regexp group that matches Python builtins.
|
106
|
-
_BUILTIN_GRP = (r'(?<!\.)(?:%s)' % '|'.join([r'\b%s\b' % _BI
|
107
|
-
for _BI in _BUILTINS]))
|
108
|
-
|
109
|
-
#: A regexp group that matches Python strings.
|
110
|
-
_STRING_GRP = '|'.join(
|
111
|
-
[r'("""("""|.*?((?!").)"""))', r'("("|.*?((?!").)"))',
|
112
|
-
r"('''('''|.*?[^\\']'''))", r"('('|.*?[^\\']'))"])
|
113
|
-
|
114
|
-
#: A regexp group that matches Python comments.
|
115
|
-
_COMMENT_GRP = '(#.*?$)'
|
116
|
-
|
117
|
-
#: A regexp group that matches Python ">>>" prompts.
|
118
|
-
_PROMPT1_GRP = r'^[ \t]*>>>(?:[ \t]|$)'
|
119
|
-
|
120
|
-
#: A regexp group that matches Python "..." prompts.
|
121
|
-
_PROMPT2_GRP = r'^[ \t]*\.\.\.(?:[ \t]|$)'
|
122
|
-
|
123
|
-
#: A regexp group that matches function and class definitions.
|
124
|
-
_DEFINE_GRP = r'\b(?:def|class)[ \t]+\w+'
|
125
|
-
|
126
|
-
#: A regexp that matches Python prompts
|
127
|
-
PROMPT_RE = re.compile('(%s|%s)' % (_PROMPT1_GRP, _PROMPT2_GRP),
|
128
|
-
re.MULTILINE | re.DOTALL)
|
129
|
-
|
130
|
-
#: A regexp that matches Python "..." prompts.
|
131
|
-
PROMPT2_RE = re.compile('(%s)' % _PROMPT2_GRP,
|
132
|
-
re.MULTILINE | re.DOTALL)
|
133
|
-
|
134
|
-
#: A regexp that matches doctest exception blocks.
|
135
|
-
EXCEPT_RE = re.compile(r'^[ \t]*Traceback \(most recent call last\):.*',
|
136
|
-
re.DOTALL | re.MULTILINE)
|
137
|
-
|
138
|
-
#: A regexp that matches doctest directives.
|
139
|
-
DOCTEST_DIRECTIVE_RE = re.compile(r'#[ \t]*doctest:.*')
|
140
|
-
|
141
|
-
#: A regexp that matches all of the regions of a doctest block
|
142
|
-
#: that should be colored.
|
143
|
-
DOCTEST_RE = re.compile(
|
144
|
-
r'(.*?)((?P<STRING>%s)|(?P<COMMENT>%s)|(?P<DEFINE>%s)|'
|
145
|
-
r'(?P<KEYWORD>%s)|(?P<BUILTIN>%s)|'
|
146
|
-
r'(?P<PROMPT1>%s)|(?P<PROMPT2>%s)|(?P<EOS>\Z))' % (
|
147
|
-
_STRING_GRP, _COMMENT_GRP, _DEFINE_GRP, _KEYWORD_GRP, _BUILTIN_GRP,
|
148
|
-
_PROMPT1_GRP, _PROMPT2_GRP), re.MULTILINE | re.DOTALL)
|
149
|
-
|
150
|
-
#: This regular expression is used to find doctest examples in a
|
151
|
-
#: string. This is copied from the standard Python doctest.py
|
152
|
-
#: module (after the refactoring in Python 2.4+).
|
153
|
-
DOCTEST_EXAMPLE_RE = re.compile(r'''
|
154
|
-
# Source consists of a PS1 line followed by zero or more PS2 lines.
|
155
|
-
(?P<source>
|
156
|
-
(?:^(?P<indent> [ ]*) >>> .*) # PS1 line
|
157
|
-
(?:\n [ ]* \.\.\. .*)* # PS2 lines
|
158
|
-
\n?)
|
159
|
-
# Want consists of any non-blank lines that do not start with PS1.
|
160
|
-
(?P<want> (?:(?![ ]*$) # Not a blank line
|
161
|
-
(?![ ]*>>>) # Not a line starting with PS1
|
162
|
-
.*$\n? # But any other line
|
163
|
-
)*)
|
164
|
-
''', re.MULTILINE | re.VERBOSE)
|
165
|
-
|
166
|
-
def colorize_inline(self, s):
|
167
|
-
"""
|
168
|
-
Colorize a string containing Python code. Do not add the
|
169
|
-
L{PREFIX} and L{SUFFIX} strings to the returned value. This
|
170
|
-
method is intended for generating syntax-highlighted strings
|
171
|
-
that are appropriate for inclusion as inline expressions.
|
172
|
-
"""
|
173
|
-
return self.DOCTEST_RE.sub(self.subfunc, s)
|
174
|
-
|
175
|
-
def colorize_codeblock(self, s):
|
176
|
-
"""
|
177
|
-
Colorize a string containing only Python code. This method
|
178
|
-
differs from L{colorize_doctest} in that it will not search
|
179
|
-
for doctest prompts when deciding how to colorize the string.
|
180
|
-
"""
|
181
|
-
body = self.DOCTEST_RE.sub(self.subfunc, s)
|
182
|
-
return self.PREFIX + body + self.SUFFIX
|
183
|
-
|
184
|
-
def colorize_doctest(self, s, strip_directives=False):
|
185
|
-
"""
|
186
|
-
Colorize a string containing one or more doctest examples.
|
187
|
-
"""
|
188
|
-
output = []
|
189
|
-
charno = 0
|
190
|
-
for m in self.DOCTEST_EXAMPLE_RE.finditer(s):
|
191
|
-
# Parse the doctest example:
|
192
|
-
pysrc, want = m.group('source', 'want')
|
193
|
-
# Pre-example text:
|
194
|
-
output.append(s[charno:m.start()])
|
195
|
-
# Example source code:
|
196
|
-
output.append(self.DOCTEST_RE.sub(self.subfunc, pysrc))
|
197
|
-
# Example output:
|
198
|
-
if want:
|
199
|
-
if self.EXCEPT_RE.match(want):
|
200
|
-
output += '\n'.join([self.markup(line, 'except')
|
201
|
-
for line in want.split('\n')])
|
202
|
-
else:
|
203
|
-
output += '\n'.join([self.markup(line, 'output')
|
204
|
-
for line in want.split('\n')])
|
205
|
-
# Update charno
|
206
|
-
charno = m.end()
|
207
|
-
# Add any remaining post-example text.
|
208
|
-
output.append(s[charno:])
|
209
|
-
|
210
|
-
return self.PREFIX + ''.join(output) + self.SUFFIX
|
211
|
-
|
212
|
-
def subfunc(self, match):
|
213
|
-
other, text = match.group(1, 2)
|
214
|
-
#print 'M %20r %20r' % (other, text) # <- for debugging
|
215
|
-
if other:
|
216
|
-
other = '\n'.join([self.markup(line, 'other')
|
217
|
-
for line in other.split('\n')])
|
218
|
-
|
219
|
-
if match.group('PROMPT1'):
|
220
|
-
return other + self.markup(text, 'prompt')
|
221
|
-
elif match.group('PROMPT2'):
|
222
|
-
return other + self.markup(text, 'more')
|
223
|
-
elif match.group('KEYWORD'):
|
224
|
-
return other + self.markup(text, 'keyword')
|
225
|
-
elif match.group('BUILTIN'):
|
226
|
-
return other + self.markup(text, 'builtin')
|
227
|
-
elif match.group('COMMENT'):
|
228
|
-
return other + self.markup(text, 'comment')
|
229
|
-
elif match.group('STRING') and '\n' not in text:
|
230
|
-
return other + self.markup(text, 'string')
|
231
|
-
elif match.group('STRING'):
|
232
|
-
# It's a multiline string; colorize the string & prompt
|
233
|
-
# portion of each line.
|
234
|
-
pieces = []
|
235
|
-
for line in text.split('\n'):
|
236
|
-
if self.PROMPT2_RE.match(line):
|
237
|
-
if len(line) > 4:
|
238
|
-
pieces.append(self.markup(line[:4], 'more') +
|
239
|
-
self.markup(line[4:], 'string'))
|
240
|
-
else:
|
241
|
-
pieces.append(self.markup(line[:4], 'more'))
|
242
|
-
elif line:
|
243
|
-
pieces.append(self.markup(line, 'string'))
|
244
|
-
else:
|
245
|
-
pieces.append('')
|
246
|
-
return other + '\n'.join(pieces)
|
247
|
-
elif match.group('DEFINE'):
|
248
|
-
m = re.match('(?P<def>\w+)(?P<space>\s+)(?P<name>\w+)', text)
|
249
|
-
return other + (self.markup(m.group('def'), 'keyword') +
|
250
|
-
self.markup(m.group('space'), 'other') +
|
251
|
-
self.markup(m.group('name'), 'defname'))
|
252
|
-
elif match.group('EOS') is not None:
|
253
|
-
return other
|
254
|
-
else:
|
255
|
-
assert 0, 'Unexpected match!'
|
256
|
-
|
257
|
-
def markup(self, s, tag):
|
258
|
-
"""
|
259
|
-
Apply syntax highlighting to a single substring from a doctest
|
260
|
-
block. C{s} is the substring, and C{tag} is the tag that
|
261
|
-
should be applied to the substring. C{tag} will be one of the
|
262
|
-
following strings:
|
263
|
-
|
264
|
-
- C{prompt} -- the Python PS1 prompt (>>>)
|
265
|
-
- C{more} -- the Python PS2 prompt (...)
|
266
|
-
- C{keyword} -- a Python keyword (for, if, etc.)
|
267
|
-
- C{builtin} -- a Python builtin name (abs, dir, etc.)
|
268
|
-
- C{string} -- a string literal
|
269
|
-
- C{comment} -- a comment
|
270
|
-
- C{except} -- an exception traceback (up to the next >>>)
|
271
|
-
- C{output} -- the output from a doctest block.
|
272
|
-
- C{defname} -- the name of a function or class defined by
|
273
|
-
a C{def} or C{class} statement.
|
274
|
-
- C{other} -- anything else (does *not* include output.)
|
275
|
-
"""
|
276
|
-
raise AssertionError("Abstract method")
|
277
|
-
|
278
|
-
class XMLDoctestColorizer(DoctestColorizer):
|
279
|
-
"""
|
280
|
-
A subclass of DoctestColorizer that generates XML-like output.
|
281
|
-
This class is mainly intended to be used for testing purposes.
|
282
|
-
"""
|
283
|
-
PREFIX = '<colorized>\n'
|
284
|
-
SUFFIX = '</colorized>\n'
|
285
|
-
def markup(self, s, tag):
|
286
|
-
s = s.replace('&', '&').replace('<', '<').replace('>', '>')
|
287
|
-
if tag == 'other': return s
|
288
|
-
else: return '<%s>%s</%s>' % (tag, s, tag)
|
289
|
-
|
290
|
-
class HTMLDoctestColorizer(DoctestColorizer):
|
291
|
-
"""A subclass of DoctestColorizer that generates HTML output."""
|
292
|
-
PREFIX = '<pre class="py-doctest">\n'
|
293
|
-
SUFFIX = '</pre>\n'
|
294
|
-
def markup(self, s, tag):
|
295
|
-
if tag == 'other':
|
296
|
-
return plaintext_to_html(s)
|
297
|
-
else:
|
298
|
-
return ('<span class="py-%s">%s</span>' %
|
299
|
-
(tag, plaintext_to_html(s)))
|
300
|
-
|
301
|
-
class LaTeXDoctestColorizer(DoctestColorizer):
|
302
|
-
"""A subclass of DoctestColorizer that generates LaTeX output."""
|
303
|
-
PREFIX = '\\begin{alltt}\n'
|
304
|
-
SUFFIX = '\\end{alltt}\n'
|
305
|
-
def markup(self, s, tag):
|
306
|
-
if tag == 'other':
|
307
|
-
return plaintext_to_latex(s)
|
308
|
-
else:
|
309
|
-
return '\\pysrc%s{%s}' % (tag, plaintext_to_latex(s))
|
310
|
-
|
311
|
-
|
Binary file
|