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

Method start_stylesheet

tools/pythonpoint/stdparser.py:324–343  ·  view source on GitHub ↗
(self, args)

Source from the content-addressed store, hash-verified

322 self._curSubject = None
323
324 def start_stylesheet(self, args):
325 #makes it the current style sheet.
326 path = self._arg('stylesheet',args,'path')
327 if path=='None': path = []
328 if not isSeqType(path): path = [path]
329 path.append('styles')
330 path.append(os.getcwd())
331 modulename = self._arg('stylesheet', args, 'module')
332 funcname = self._arg('stylesheet', args, 'function')
333 try:
334 found = imp.find_module(modulename, path)
335 (file, pathname, description) = found
336 mod = imp.load_module(modulename, file, pathname, description)
337 except ImportError:
338 #last gasp
339 mod = getModule(modulename)
340
341 #now get the function
342 func = getattr(mod, funcname)
343 pythonpoint.setStyles(func())
344## print 'set global stylesheet to %s.%s()' % (modulename, funcname)
345
346 def end_stylesheet(self):

Callers

nothing calls this directly

Calls 4

_argMethod · 0.95
isSeqTypeFunction · 0.90
getModuleFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected