37 |
import sys |
import sys |
38 |
import random |
import random |
39 |
from java.lang import Runnable, System |
from java.lang import Runnable, System |
40 |
|
import getopt |
41 |
|
import traceback |
42 |
|
|
43 |
import gzz |
import gzz |
44 |
from gzz.gfx.gl import MipzipLoader |
from gzz.gfx.gl import MipzipLoader |
53 |
|
|
54 |
from gfx.util import misc |
from gfx.util import misc |
55 |
|
|
56 |
import traceback |
|
57 |
|
print "ARGV:",sys.argv |
58 |
|
print "DBG:",gzz.util.dbg.short,gzz.util.dbg.long,gzz.util.dbg.all |
59 |
|
opts, args = getopt.getopt(sys.argv[1:], |
60 |
|
gzz.util.dbg.short, |
61 |
|
gzz.util.dbg.long) |
62 |
|
for o,a in opts: |
63 |
|
print "Opt: ",o,a |
64 |
|
if o in gzz.util.dbg.all: |
65 |
|
gzz.util.dbg.option(o,a) |
66 |
|
|
67 |
xs,ys = 1280, 960 |
xs,ys = 1280, 960 |
68 |
|
|
197 |
w.setLocation(0,0,xs,ys) |
w.setLocation(0,0,xs,ys) |
198 |
w.registerBinder(Bindings()) |
w.registerBinder(Bindings()) |
199 |
|
|
200 |
if len(sys.argv) >= 3 and sys.argv[2] != "": |
if len(args) >= 2 and args[1] != "": |
201 |
global logfile |
global logfile |
202 |
logfile = sys.argv[2] |
logfile = args[2] |
203 |
|
|
204 |
print "Reading trials" |
print "Reading trials" |
205 |
global trials |
global trials |
206 |
trials = [] |
trials = [] |
207 |
f = open(sys.argv[1], "r") |
f = open(args[0], "r") |
208 |
while 1: |
while 1: |
209 |
line = f.readline() |
line = f.readline() |
210 |
if line == "": break |
if line == "": break |