try: if name == "wordList": Debug.log(4, "Sikuli: _exposeAllMethods: checking1: %s", name) attr = getattr(anyObject, name) if name == "wordList": Debug.log(4, "Sikuli: _exposeAllMethods: checking2: %s", name) if not inspect.ismethod(attr): continue except: continue if name[0] != '_' and name[:7] != 'super__': try: saved.remove(name) except: pass tosave.append(name) theGlobals[name] = eval("anyObject." + name) Debug.log(4, "Sikuli: _exposeAllMethods: added: %s", name) if name == 'checkWith': Debug.log(4, "%s %s", name, str(dict[name])[1:]) for name in saved: if name in theGlobals: Debug.log(4, "Sikuli: _exposeAllMethods: removed: %s", name) theGlobals.pop(name) return tosave ############### set SCREEN as primary screen at startup ################ use() ALL = JScreen.all().getRegion() Debug.log(3, "Jython: sikuli: Sikuli: ending init")
#Debug.log(3, "Sikuli: _exposeAllMethods: %s called from: %s", anyObject, theGlobals['__name__']) tosave = [] if not saved: saved = [] for name in dir(anyObject): if name in exclude_list: continue try: if not inspect.ismethod(getattr(anyObject,name)): continue except: continue if name[0] != '_' and name[:7] != 'super__': try: saved.remove(name) except: pass tosave.append(name) #print "added:", name theGlobals[name] = eval("anyObject."+name) if name == 'checkWith': Debug.log(3, "%s %s", name, str(dict[name])[1:]) for name in saved: if name in theGlobals: #print "removed:", name theGlobals.pop(name) return tosave ############### set SCREEN as primary screen at startup ################ use() ALL = JScreen.all() Debug.log(3, "Jython: sikuli: Sikuli: ending init")
def reset(): JScreen.resetMonitors(); use(); ALL = JScreen.all()
def reset(): JScreen.resetMonitors() use() ALL = JScreen.all()
tosave = [] if not saved: saved = [] for name in dir(anyObject): if name in exclude_list: continue try: if not inspect.ismethod(getattr(anyObject, name)): continue except: continue if name[0] != '_' and name[:7] != 'super__': try: saved.remove(name) except: pass tosave.append(name) #print "added:", name theGlobals[name] = eval("anyObject." + name) if name == 'checkWith': Debug.log(3, "%s %s", name, str(dict[name])[1:]) for name in saved: if name in theGlobals: #print "removed:", name theGlobals.pop(name) return tosave ############### set SCREEN as primary screen at startup ################ use() ALL = JScreen.all() Debug.log(3, "Jython: sikuli: Sikuli: ending init")
] # Debug.log(3, "Sikuli: _exposeAllMethods: %s called from: %s", anyObject, theGlobals['__name__']) tosave = [] if not saved: saved = [] for name in dir(anyObject): if name in exclude_list: continue try: if not inspect.ismethod(getattr(anyObject, name)): continue except: continue if name[0] != '_' and name[:7] != 'super__': try: saved.remove(name) except: pass tosave.append(name) # print "added:", name theGlobals[name] = eval("anyObject." + name) if name == 'checkWith': Debug.log(3, "%s %s", name, str(dict[name])[1:]) for name in saved: if name in theGlobals: # print "removed:", name theGlobals.pop(name) return tosave ############### set SCREEN as primary screen at startup ################ use() ALL = JScreen.all().getRegion() Debug.log(3, "Jython: sikuli: Sikuli: ending init")
def all(cls): return JScreen.all()