|
| 1 | +import sys |
1 | 2 | import os |
2 | 3 | import glob |
3 | 4 |
|
| 5 | +import pygame |
4 | 6 | import expyriment |
5 | 7 | import android |
6 | 8 |
|
7 | 9 |
|
8 | | -android.init() |
9 | | -android.map_key(android.KEYCODE_BACK, pygame.K_ESCAPE) |
10 | | - |
11 | 10 | def main(): |
| 11 | + android.init() |
| 12 | + |
12 | 13 | projects = {} |
13 | 14 | for folder in glob.glob("/mnt/*"): |
14 | 15 | if os.path.isdir(folder): |
@@ -44,9 +45,9 @@ def main(): |
44 | 45 | aliases = ( |
45 | 46 | ('monospace', 'misc-fixed', 'courier', 'couriernew', 'console', |
46 | 47 | 'fixed', 'mono', 'freemono', 'bitstreamverasansmono', |
47 | | - 'verasansmono', 'monotype', 'lucidaconsole', 'droidsansmono), |
| 48 | + 'verasansmono', 'monotype', 'lucidaconsole', 'droidsansmono'), |
48 | 49 | ('sans', 'arial', 'helvetica', 'swiss', 'freesans', |
49 | | - 'bitstreamverasans', 'verasans', 'verdana', 'tahoma', 'droidsans), |
| 50 | + 'bitstreamverasans', 'verasans', 'verdana', 'tahoma', 'droidsans'), |
50 | 51 | ('serif', 'times', 'freeserif', 'bitstreamveraserif', 'roman', |
51 | 52 | 'timesroman', 'timesnewroman', 'dutch', 'veraserif', |
52 | 53 | 'georgia', 'droidserif'), |
@@ -82,8 +83,10 @@ def main(): |
82 | 83 | scroll_menu=5, mouse=mouse) |
83 | 84 | py_file = projects[menu.get()] |
84 | 85 | expyriment.control.defaults.event_logging = 1 |
| 86 | + expyriment.control.defaults.initialize_delay = 0 |
85 | 87 | os.chdir(os.path.split(py_file)[0]) |
86 | | - execfile("{0}".format(py_file)) |
| 88 | + sys.argv[0] = py_file |
| 89 | + execfile("{0}".format(py_file), globals()) |
87 | 90 |
|
88 | 91 |
|
89 | 92 | if __name__ == "__main__": |
|
0 commit comments