示例#1
0
文件: POM.py 项目: xiama/automations
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")
示例#2
0
def init():
	from textutils import maketrans
	Header._CLS2STR = maketrans("_", "-")
	Header._STR2CLS = maketrans("-", "_")