本文整理汇总了Python中org.sikuli.basics.Debug.log方法的典型用法代码示例。如果您正苦于以下问题:Python Debug.log方法的具体用法?Python Debug.log怎么用?Python Debug.log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.sikuli.basics.Debug
的用法示例。
在下文中一共展示了Debug.log方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _exposeAllMethods
# 需要导入模块: from org.sikuli.basics import Debug [as 别名]
# 或者: from org.sikuli.basics.Debug import log [as 别名]
def _exposeAllMethods(anyObject, saved, theGlobals, exclude_list):
if not exclude_list:
exclude_list = [ 'class', 'classDictInit', 'clone', 'equals', 'finalize',
'getClass', 'hashCode', 'notify', 'notifyAll',
'toGlobalCoord', 'toString', 'getLocationFromPSRML', 'getRegionFromPSRM',
'capture', 'selectRegion', 'create', 'observeInBackground', 'waitAll',
'updateSelf', 'findNow', 'findAllNow', 'getEventManager',
'lastMatch', 'lastMatches', 'lastScreenImage', 'lastScreenImageFile']
#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
示例2: _exposeAllMethods
# 需要导入模块: from org.sikuli.basics import Debug [as 别名]
# 或者: from org.sikuli.basics.Debug import log [as 别名]
def _exposeAllMethods(anyObject, saved, theGlobals, exclude_list):
if not exclude_list:
exclude_list = [
"class",
"classDictInit",
"clone",
"equals",
"finalize",
"getClass",
"hashCode",
"notify",
"notifyAll",
"toGlobalCoord",
"toString",
"getLocationFromPSRML",
"getRegionFromPSRM",
"capture",
"selectRegion",
"create",
"observeInBackground",
"waitAll",
"updateSelf",
"findNow",
"findAllNow",
"getEventManager",
"lastMatch",
"lastMatches",
"lastScreenImage",
"lastScreenImageFile",
]
# 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
示例3: initSikuli
# 需要导入模块: from org.sikuli.basics import Debug [as 别名]
# 或者: from org.sikuli.basics.Debug import log [as 别名]
def initSikuli(scr = None):
dict = globals()
dict['METHODCATALOG'] = sys.modules[__name__].__dict__
if scr == None:
Debug.log(3, "Jython: init SCREEN as ()")
dict['SCREEN'] = Screen()
else:
Debug.log(3, "Jython: init SCREEN as", scr)
dict['SCREEN'] = Screen(scr)
dict['SCREEN']._exposeAllMethods(__name__)
示例4: __init__
# 需要导入模块: from org.sikuli.basics import Debug [as 别名]
# 或者: from org.sikuli.basics.Debug import log [as 别名]
def __init__(self, id=None):
try:
if id != None:
r = JScreen.getBounds(id)
s = JScreen.getScreen(id)
else:
id = JScreen.getPrimaryId()
r = JScreen.getBounds(id)
s = JScreen.getScreen(id)
(self.x, self.y, self.w, self.h) = (int(r.getX()), int(r.getY()), \
int(r.getWidth()), int(r.getHeight()))
self.initScreen(s)
except:
Debug.log(3, "Jython: init: exception while initializing Screen\n%s", sys.exc_info(0))
sys.exit(1)
示例5: _exposeAllMethods
# 需要导入模块: from org.sikuli.basics import Debug [as 别名]
# 或者: from org.sikuli.basics.Debug import log [as 别名]
def _exposeAllMethods(self, mod):
exclude_list = [ 'class', 'classDictInit', 'clone', 'equals', 'finalize',
'getClass', 'hashCode', 'notify', 'notifyAll',
'toGlobalCoord', 'toString', 'getLocationFromPSRML', 'getRegionFromPSRM',
'capture', 'selectRegion', 'create', 'observeInBackground', 'waitAll',
'updateSelf', 'findNow', 'findAllNow', 'getEventManager']
dict = sys.modules[mod].__dict__
for name in dir(self):
if name in exclude_list: continue
try:
if not inspect.ismethod(getattr(self,name)): continue
except:
continue
if name[0] != '_' and name[:7] != 'super__':
dict[name] = eval("self."+name)
if name == 'checkWith': Debug.log(3, "%s %s", name, str(dict[name])[1:])
示例6: find_module
# 需要导入模块: from org.sikuli.basics import Debug [as 别名]
# 或者: from org.sikuli.basics.Debug import log [as 别名]
def find_module(self, module_name, package_path):
if _debug(): print "SikuliImporter.find_module", module_name, package_path
module_name = _stripPackagePrefix(module_name)
if module_name[0:1] == "*":
return None
if package_path:
paths = package_path
else:
paths = sys.path
for path in paths:
mod = self._find_module(module_name, path)
if mod:
return mod
if Sikuli.load(module_name +".jar"):
Debug.log(2,module_name + ".jar loaded")
return None
return None
示例7: use
# 需要导入模块: from org.sikuli.basics import Debug [as 别名]
# 或者: from org.sikuli.basics.Debug import log [as 别名]
def use(scr = None, remote = False):
if remote:
theGlobals = inspect.currentframe().f_back.f_back.f_globals
else:
theGlobals = inspect.currentframe().f_back.f_globals
global remoteScreen
if remoteScreen:
remoteScreen.close()
remoteScreen = None
if not scr:
SCREEN = Screen()
else:
SCREEN = scr
Debug.log(3, "Jython: requested to use as default region: " + SCREEN.toStringShort())
globals()['SIKULISAVED'] = _exposeAllMethods(SCREEN, globals().get('SIKULISAVED'), theGlobals, None)
theGlobals['SCREEN'] = SCREEN
if remote:
remoteScreen = SCREEN
return SCREEN
示例8:
# 需要导入模块: from org.sikuli.basics import Debug [as 别名]
# 或者: from org.sikuli.basics.Debug import log [as 别名]
# Copyright 2010-2013, Sikuli.org
# Released under the MIT License.
# modified RaiMan 2013
from __future__ import with_statement
from org.sikuli.basics import Debug
Debug.log(3, "Jython: sikuli: Sikuli: starting init")
import time
import __builtin__
import __main__
import types
import sys
import os
import inspect
Debug.log(4, "Jython: sikuli: Sikuli: constants")
import org.sikuli.script.FindFailed as FindFailed
from org.sikuli.script.FindFailedResponse import *
from org.sikuli.script.Constants import *
import org.sikuli.script.Button as Button
from org.sikuli.script.Button import WHEEL_UP, WHEEL_DOWN
from org.sikuli.basics import OS
Debug.log(4, "Jython: sikuli: Sikuli: import Region")
from org.sikuli.script import Region as JRegion
from Region import *
from org.sikuli.script import Observing
Debug.log(4, "Jython: sikuli: Sikuli: import Screen")
from org.sikuli.script import Screen as JScreen
from Screen import *
示例9:
# 需要导入模块: from org.sikuli.basics import Debug [as 别名]
# 或者: from org.sikuli.basics.Debug import log [as 别名]
# Copyright 2010-2013, Sikuli.org
# Released under the MIT License.
# modified RaiMan 2013
from org.sikuli.basics import Debug
Debug.log(3, "Jython: sikuli: __init__: entering")
from Sikuli import *
示例10:
# 需要导入模块: from org.sikuli.basics import Debug [as 别名]
# 或者: from org.sikuli.basics.Debug import log [as 别名]
# Copyright 2010-2013, Sikuli.org
# Released under the MIT License.
# modified RaiMan 2013
from __future__ import with_statement
from org.sikuli.basics import Debug
Debug.log(3, "Jython: sikuli: Sikuli: entering")
import time
import __builtin__
import __main__
import types
import sys
import os
Debug.log(3, "Jython: sikuli: Sikuli: constants")
import org.sikuli.script.FindFailed as FindFailed
from org.sikuli.script.FindFailedResponse import *
from org.sikuli.script.Constants import *
import org.sikuli.script.Button as Button
from org.sikuli.script.Button import WHEEL_UP, WHEEL_DOWN
from org.sikuli.basics import OS
Debug.log(3, "Jython: sikuli: Sikuli: import Region")
from org.sikuli.script import Region as JRegion
from Region import *
Debug.log(3, "Jython: sikuli: Sikuli: import Screen")
from org.sikuli.script import Screen as JScreen
from Screen import *
Debug.log(3, "Jython: sikuli: Sikuli: Env.addHotkey")