/[libvob]/libvob/vob/util/dbg.py
ViewVC logotype

Diff of /libvob/vob/util/dbg.py

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

revision 1.1 by tjl, Thu Apr 10 14:00:19 2003 UTC revision 1.2 by benja, Sat Apr 19 15:07:04 2003 UTC
# Line 22  Line 22 
22    
23    
24  # Jython:  # Jython:
25  # Provide variables for and read commandline debug options.  # Provide variables for and read commandline debug options;
26    # recognize 'dbg' and 'gldbg' system properties as
27    # comma-separated lists of Java classes and GL debug
28    # variables that should be turned on.
29    
30  # python imports  # python imports
31  import re  import re
# Line 53  def option(o,a): Line 56  def option(o,a):
56          prop = System.getProperties()          prop = System.getProperties()
57          prop.setProperty(m.group(1), m.group(2))          prop.setProperty(m.group(1), m.group(2))
58          System.setProperties(prop)          System.setProperties(prop)
59            readSystemProperties()
60    
61    def readSystemProperties():
62        dbg = System.getProperty("dbg")
63        gldbg = System.getProperty("gldbg")
64    
65        if dbg:
66            for a in dbg.split(','):
67                cls = java.lang.Class.forName(a)
68                cls.dbg = 1
69    
70        if gldbg:
71            GL.loadLib()
72            for a in gldbg.split(','):
73                print "Setting GL debug ",a
74                GL.setDebugVar(a, 1)
75            
76    readSystemProperties()

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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