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

Function getModule

tools/pythonpoint/stdparser.py:20–38  ·  view source on GitHub ↗

Get a module containing style declarations. Search order is: tools/pythonpoint/ tools/pythonpoint/styles/ ./

(modulename,fromPath='tools.pythonpoint.styles')

Source from the content-addressed store, hash-verified

18
19
20def getModule(modulename,fromPath='tools.pythonpoint.styles'):
21 """Get a module containing style declarations.
22
23 Search order is:
24 tools/pythonpoint/
25 tools/pythonpoint/styles/
26 ./
27 """
28
29 try:
30 exec 'from tools.pythonpoint import '+modulename
31 return eval(modulename)
32 except ImportError:
33 try:
34 exec 'from tools.pythonpoint.styles import '+modulename
35 return eval(modulename)
36 except ImportError:
37 exec 'import '+modulename
38 return eval(modulename)
39
40
41class PPMLParser(xmllib.XMLParser):

Callers 2

start_stylesheetMethod · 0.85
start_customshapeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected