本文整理汇总了Python中core.Core.run方法的典型用法代码示例。如果您正苦于以下问题:Python Core.run方法的具体用法?Python Core.run怎么用?Python Core.run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core.Core
的用法示例。
在下文中一共展示了Core.run方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from core import Core [as 别名]
# 或者: from core.Core import run [as 别名]
class Omr:
'''
This module parses the options from comand line and starts the process
'''
def __init__(self,options):
'''
Constructor
@param options : program options
'''
self.core=None
self.appfilepath=options.appfilepath
self.datafilepath=options.datafilepath
self.inputfolder=options.inputfolder
self.threshold=options.threshold
self.zbar=options.zbar
def scan(self):
'''
Starts the processing. Supported image formats: all supported by OpenCV and PIL
'''
if self.inputfolder!=None and self.appfilepath!=None and self.datafilepath!=None:
self.core=Core(glob.glob(self.inputfolder),self.appfilepath,self.datafilepath,self.threshold,self.zbar)
self.core.run()
else:
print "usage: python omr.py -i regex -o output -a config -t threshold [-z]"
示例2: main
# 需要导入模块: from core import Core [as 别名]
# 或者: from core.Core import run [as 别名]
def main():
parser = OptionParser(version="%omxone 0.1", usage=doc)
parser.add_option("-c", "--config", dest="config", default="omxone.conf",
help="load configuration from FILE", metavar="FILE")
parser.add_option("-l", "--device-list",
action="store_true", dest="list_devices", default=False,
help="print a list of available MIDI devices")
parser.add_option("-d", "--debug",
action="store_true", dest="debug", default=False,
help="print debug information")
parser.add_option("-i", "--interactive",
action="store_true", dest="interactive", default=False,
help="enter interactive mode")
(options, args) = parser.parse_args()
core = Core()
core.run(options)
示例3: hello_world
# 需要导入模块: from core import Core [as 别名]
# 或者: from core.Core import run [as 别名]
def hello_world():
temp_filename = 'test.txt'
c = Core()
c.run(temp_filename)
return 'web test'