Package Bio :: Package EUtils :: Module dtd2py
[hide private]
[frames] | no frames]

Module dtd2py

source code


Internal class to convert DTDs to python form.

dtd2py [-m mixinmodule] [-u] <DTDfile>...

Converts the given DTD to a python form, and stores it in the dtds package
directory. That directory should be writable by the user running this. 
The new dtds module will have the same base name as the DTD, but with dashes and dots converted to underscores.

Options:
        -m <modulename> -- specify a mixin module to load. If a class in this
        module matches the DTD element name plus "Mixin" appended, then that class
        will be inherited from in the generated element class.
        -u  -- convert all element tag names to uppercase. Otherwise, case is
        preserved. Some XML applications specify using uppercase, others case
        preserving. Some XML element names may match python keyword or builtin
        names, and those DTDs should also be converted to uppercase to avoid syntax
        errors in the generated file.

Functions [hide private]
 
compile_file(dtdfile, mixin, toupper) source code
 
do_it(filelist, mixin, toupper) source code
 
main(argv) source code
Variables [hide private]
  __package__ = 'Bio.EUtils'