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 |
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() |