MCPcopy Create free account
hub / github.com/Distrotech/reportlab / validate

Function validate

tools/pythonpoint/pythonpoint.py:955–971  ·  view source on GitHub ↗
(rawdata)

Source from the content-addressed store, hash-verified

953
954_pyRXP_Parser = None
955def validate(rawdata):
956 global _pyRXP_Parser
957 if not _pyRXP_Parser:
958 try:
959 import pyRXP
960 except ImportError:
961 return
962 from reportlab.lib.utils import open_and_read, rl_isfile
963 dtd = 'pythonpoint.dtd'
964 if not rl_isfile(dtd):
965 dtd = os.path.join(toolsDir(),'pythonpoint','pythonpoint.dtd')
966 if not rl_isfile(dtd): return
967 def eocb(URI,dtdText=open_and_read(dtd),dtd=dtd):
968 if os.path.basename(URI)=='pythonpoint.dtd': return dtd,dtdText
969 return URI
970 _pyRXP_Parser = pyRXP.Parser(eoCB=eocb)
971 return _pyRXP_Parser.parse(rawdata)
972
973def process(datafile, notes=0, handout=0, printout=0, cols=0, verbose=0, outDir=None, datafilename=None, fx=1):
974 "Process one PythonPoint source file."

Callers 2

processFunction · 0.85
validateSetattrFunction · 0.85

Calls 3

rl_isfileFunction · 0.90
toolsDirFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected