src/reportlab/lib/utils.py
changeset 3122 19218a7fd0e7
parent 3083 95f7752b0284
child 3134 e403094e7c98
equal deleted inserted replaced
3115:049d6a82b49a 3122:19218a7fd0e7
   866             import pprint
   866             import pprint
   867             self._start(k)
   867             self._start(k)
   868             pprint.pprint(v,self.stdout)
   868             pprint.pprint(v,self.stdout)
   869             self._finish(k)
   869             self._finish(k)
   870 
   870 
       
   871     def _show_extensions(self):
       
   872         for mn in ('_rl_accel','_renderPM','sgmlop','pyRXP','pyRXPU','_imaging','Image'):
       
   873             try:
       
   874                 A = [mn].append
       
   875                 m = recursiveImport(mn,sys.path[:],1)
       
   876                 A(m.__file__)
       
   877                 for vn in ('__version__','VERSION','_version','version'):
       
   878                     if hasattr(m,vn):
       
   879                         A('%s=%r' % (vn,getattr(m,vn)))
       
   880             except:
       
   881                 A('not found')
       
   882             self._writeln(' '+' '.join(A.__self__))
       
   883 
   871     specials = {'__module_versions': _show_module_versions,
   884     specials = {'__module_versions': _show_module_versions,
   872                 '__payload': _show_payload,
   885                 '__payload': _show_payload,
   873                 '__traceback': _show_lines,
   886                 '__traceback': _show_lines,
   874                 '__script': _show_file,
   887                 '__script': _show_file,
   875                 }
   888                 }
   877         K = self.store.keys()
   890         K = self.store.keys()
   878         K.sort()
   891         K.sort()
   879         for k in K:
   892         for k in K:
   880             if k not in self.specials.keys(): self._writeln('%-15s = %s' % (k,self.store[k]))
   893             if k not in self.specials.keys(): self._writeln('%-15s = %s' % (k,self.store[k]))
   881         for k in K:
   894         for k in K:
   882             if k in self.specials.keys(): apply(self.specials[k],(self,k,self.store[k]))
   895             if k in self.specials.keys(): self.specials[k](self,k,self.store[k])
       
   896         self._show_extensions()
   883 
   897 
   884     def payload(self,name):
   898     def payload(self,name):
   885         return self.store['__payload'][name]
   899         return self.store['__payload'][name]
   886 
   900 
   887     def __setitem__(self,name,value):
   901     def __setitem__(self,name,value):