6.19.10.1.2. help

Start python section to interscript/frames/inputf.py[4 /42 ] Next Prev First Last
   184: #line 229 "input_frame.ipk"
   185:   def help(self):
   186:     "Command help"
   187:     print "Command Help"
   188:     d = self.userdict
   189:     keys = d.keys()
   190:     keys.sort()
   191:     for key in keys:
   192:       routine = d[key]
   193:       typ = type(routine)
   194:       doc = getattr(routine,'__doc__','')
   195:       if typ.__name__ in ['module']:
   196:         print typ.__name__,key
   197:       else:
   198:         print typ.__name__, key + "->",doc
   199: 
   200:   def weave_help(self, level):
   201:     "Weave help"
   202:     self.head(level,"Command Help")
   203:     d = self.userdict
   204:     keys = d.keys()
   205:     keys.sort()
   206:     for key in keys:
   207:       routine = d[key]
   208:       typ = type(routine)
   209:       doc = getattr(routine,'__doc__','')
   210:       if doc is None: doc = "No documentation"
   211:       self.head(level+1, typ.__name__+ " "+ key)
   212:       if typ is types.MethodType:
   213:         self.weave_line("Method of class " + routine.im_class.__name__+".")
   214:       self.begin_displayed_code()
   215:       self.weave(doc)
   216:       self.end_displayed_code()
   217: 
End python section to interscript/frames/inputf.py[4]