207 |
except: |
except: |
208 |
typ, val, tra = sys.exc_info() |
typ, val, tra = sys.exc_info() |
209 |
l = traceback.format_list(traceback.extract_tb(tra)) |
l = traceback.format_list(traceback.extract_tb(tra)) |
210 |
|
|
211 |
print "ERROR WHILE LOADING! %s\n%s\n"%(str(typ),str(val)), l |
print "ERROR WHILE LOADING! %s\n%s\n"%(str(typ),str(val)), l |
212 |
|
|
213 |
def globalkey(k): |
def globalkey(k): |
214 |
pass |
pass |
215 |
|
|
216 |
class Bindings(AbstractBinder): |
class Bindings(AbstractBinder): |
217 |
def keystroke(self, s): |
def keystroke(self, s, win): |
218 |
print "KEY: '%s'"%s |
print "KEY: '%s'"%s |
219 |
if s == "q" or s == "Q": |
if s == "q" or s == "Q": |
220 |
System.exit(43) |
System.exit(43) |
223 |
elif not globalkey(s): |
elif not globalkey(s): |
224 |
currentScene.key(s) |
currentScene.key(s) |
225 |
AbstractUpdateManager.chg() |
AbstractUpdateManager.chg() |
226 |
def mouse(self, e): |
def mouse(self, e, win): |
227 |
if hasattr(currentScene, "mouse"): |
if hasattr(currentScene, "mouse"): |
228 |
currentScene.mouse(e) |
currentScene.mouse(e) |
229 |
# print "MOUSE: '%s'"%e |
# print "MOUSE: '%s'"%e |