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

Method start_customshape

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

Source from the content-addressed store, hash-verified

688
689
690 def start_customshape(self, args):
691 #loads one
692 path = self._arg('customshape',args,'path')
693 if path=='None':
694 path = []
695 else:
696 path=[path]
697
698 # add package root folder and input file's folder to path
699 path.append(os.path.dirname(self.sourceFilename))
700 path.append(os.path.dirname(pythonpoint.__file__))
701
702 modulename = self._arg('customshape',args,'module')
703 funcname = self._arg('customshape',args,'class')
704 try:
705 found = imp.find_module(modulename, path)
706 (file, pathname, description) = found
707 mod = imp.load_module(modulename, file, pathname, description)
708 except ImportError:
709 mod = getModule(modulename)
710
711 #now get the function
712
713 func = getattr(mod, funcname)
714 initargs = self.ceval('customshape',args,'initargs')
715 self._curCustomShape = apply(func, initargs)
716
717 def end_customshape(self):
718 if self._curSlide:

Callers

nothing calls this directly

Calls 4

_argMethod · 0.95
cevalMethod · 0.95
getModuleFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected