| 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): |