/[gzz]/gzz/gfx/util/demo.py
ViewVC logotype

Diff of /gzz/gfx/util/demo.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by tjl, Thu Dec 19 11:09:35 2002 UTC revision 1.7 by tjl, Thu Dec 19 15:02:33 2002 UTC
# Line 70  def loadSubmodules(theModule): Line 70  def loadSubmodules(theModule):
70              list.extend(loadSubmodules(a))              list.extend(loadSubmodules(a))
71      return list      return list
72    
73    def firstDocLine(obj):
74        if hasattr(obj, "__doc__") and obj.__doc__ != None:
75            return obj.__doc__.splitlines()[0]
76        else:
77            return "XXX UNDOC "
78    
79  globalSceneMap = { }  globalSceneMap = { }
80    
81  def loadScenes():  def loadScenes():
# Line 80  def loadScenes(): Line 86  def loadScenes():
86      if 1:      if 1:
87          reloadmod.reloadModules()          reloadmod.reloadModules()
88      try:      try:
89            from gfx.util import demowindow
90            demowindow.w = w
91          if "." not in scenefile or "/" in scenefile:          if "." not in scenefile or "/" in scenefile:
92              exec open(scenefile) in globals(), globals()              exec open(scenefile) in globals(), globals()
93          else:          else:
# Line 108  theModule = %(scenefile)s Line 116  theModule = %(scenefile)s
116                  key = "F%s"%(i+2)                  key = "F%s"%(i+2)
117                  globalSceneMap[key] = globalScenes[i]                  globalSceneMap[key] = globalScenes[i]
118                  globalSceneHelp += "%s: %s\n"%(key,                  globalSceneHelp += "%s: %s\n"%(key,
119                          globalScenes[i].__doc__.splitlines()[0])                          firstDocLine(globalScenes[i]))
120    
121              print globalScenes, globalSceneHelp, globalSceneMap              print globalScenes, globalSceneHelp, globalSceneMap
122    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26