def get_mod_file(sourcefilename): """get_mod_file(sourcefilename) Converts a file name into a file name inside the dtds package. This file name is the destination for generated python files. """ import dtds modname = os.path.splitext(os.path.split(sourcefilename)[1])[0] return os.path.join(dtds.__path__[0], modname.translate(maketrans("-. ", "___"))+".py")
def init(): from textutils import maketrans Header._CLS2STR = maketrans("_", "-") Header._STR2CLS = maketrans("-", "_")