Changeset 114
- Timestamp:
- 06/29/07 09:40:23 (1 year ago)
- Files:
-
- branches/0.3/doc/wikidoc.py (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.3/doc/wikidoc.py
r113 r114 3 3 4 4 import sys 5 import pyNN.common6 5 import types, string, re, logging 7 8 6 import imp, os 7 common = imp.load_source('common', os.path.join('..','common.py')) 8 print common 9 9 10 10 #-- Define global data --------------------------------------------------------- … … 141 141 # gather information from the common module 142 142 logging.info("Gathering information from the common module.") 143 for entry in dir( pyNN.common):143 for entry in dir(common): 144 144 if entry not in exclude: 145 instance = eval(' pyNN.common.%s' % entry)145 instance = eval('common.%s' % entry) 146 146 entry_type = type(instance) 147 147 logging.info(' %-30s %s' % (entry,entry_type)) … … 150 150 for classentry in dir(instance): 151 151 if classentry not in exclude and (classentry[0] != '_' or classentry[0:2] == '__'): # don't include private methods 152 classentry_type = type(eval(' pyNN.common.%s.%s' % (entry,classentry)))152 classentry_type = type(eval('common.%s.%s' % (entry,classentry))) 153 153 logging.info(' %-28s %s' % (classentry,classentry_type)) 154 154 if classentry_type == types.MethodType: … … 179 179 outputStr += category_fmt % "Data" 180 180 for element in data: 181 instance = eval(' pyNN.common.%s' % element)181 instance = eval('common.%s' % element) 182 182 if type(instance) == types.DictType: 183 183 outputStr += dict_fmt % element … … 195 195 outputStr += category_fmt % "Functions" 196 196 for funcname in functions: 197 funcinst = eval(' pyNN.common.%s' % funcname)197 funcinst = eval('common.%s' % funcname) 198 198 outputStr += function_fmt % func_sig(funcinst, default_arg_fmt, func_sig_fmt) 199 199 if funcinst.__doc__: … … 208 208 if classname.find('Error') > -1: 209 209 error_classes[classname] = classes[classname] 210 elif issubclass(eval(' pyNN.common.%s' % classname),pyNN.common.StandardCellType):210 elif issubclass(eval('common.%s' % classname),common.StandardCellType): 211 211 celltype_classes[classname] = classes[classname] 212 212 else: … … 225 225 for classname in classlist: 226 226 outputStr += class_fmt % classname 227 docstr = eval(' pyNN.common.%s.__doc__' % classname)227 docstr = eval('common.%s.__doc__' % classname) 228 228 if docstr: 229 229 outputStr += _(docstr) 230 230 for methodname in classes[classname]['methods']: 231 methodinst = eval(' pyNN.common.%s.%s' % (classname,methodname))231 methodinst = eval('common.%s.%s' % (classname,methodname)) 232 232 fs = func_sig(methodinst, default_arg_fmt, func_sig_fmt) 233 233 if fs: … … 236 236 outputStr += _(methodinst.__doc__.strip()) 237 237 for methodname in classes[classname]['staticmethods']: 238 methodinst = eval(' pyNN.common.%s.%s' % (classname,methodname))238 methodinst = eval('common.%s.%s' % (classname,methodname)) 239 239 fs = func_sig(methodinst, default_arg_fmt, func_sig_fmt) 240 240 if fs: … … 243 243 outputStr += _(methodinst.__doc__.strip()) 244 244 for element in classes[classname]['data']: 245 instance = eval(' pyNN.common.%s.%s' % (classname,element))245 instance = eval('common.%s.%s' % (classname,element)) 246 246 if type(instance) == types.DictType: 247 247 outputStr += dict_fmt % element

