本文整理汇总了Python中DataStore.calib_store方法的典型用法代码示例。如果您正苦于以下问题:Python DataStore.calib_store方法的具体用法?Python DataStore.calib_store怎么用?Python DataStore.calib_store使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataStore
的用法示例。
在下文中一共展示了DataStore.calib_store方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: import DataStore [as 别名]
# 或者: from DataStore import calib_store [as 别名]
opts, args = getopt.getopt(
argv[1:], "hcv", ['help', 'catchup', 'verbose'])
except getopt.error, msg:
print >>sys.stderr, 'Error: %s\n' % msg
print >>sys.stderr, __usage__.strip()
return 1
# process options
catchup = False
verbose = 0
for o, a in opts:
if o == '-h' or o == '--help':
print __usage__.strip()
return 0
elif o == '-c' or o == '--catchup':
catchup = True
elif o == '-v' or o == '--verbose':
verbose += 1
# check arguments
if len(args) != 2:
print >>sys.stderr, "Error: 2 arguments required"
print >>sys.stderr, __usage__.strip()
return 2
logger = ApplicationLogger(verbose)
return ToService(
DataStore.params(args[0]), DataStore.calib_store(args[0]),
service_name=args[1]
).Upload(catchup)
if __name__ == "__main__":
sys.exit(main())
示例2: main
# 需要导入模块: import DataStore [as 别名]
# 或者: from DataStore import calib_store [as 别名]
of.write(' </auto_update>\n')
of.write(' </current_weather>\n')
of.write('</response>\n')
of.close()
def main(argv=None):
if argv is None:
argv = sys.argv
try:
opts, args = getopt.getopt(argv[1:], "hv", ['help', 'verbose'])
except getopt.error, msg:
print >>sys.stderr, 'Error: %s\n' % msg
print >>sys.stderr, __doc__.strip()
return 1
# process options
verbose = 0
for o, a in opts:
if o == '-h' or o == '--help':
print __doc__.strip()
return 0
elif o == '-v' or o == '--verbose':
verbose += 1
# check arguments
if len(args) != 2:
print >>sys.stderr, "Error: 2 arguments required"
print >>sys.stderr, __doc__.strip()
return 2
logger = ApplicationLogger(verbose)
return YoWindow(DataStore.calib_store(args[0])).write_file(args[1])
if __name__ == "__main__":
sys.exit(main())
示例3: main
# 需要导入模块: import DataStore [as 别名]
# 或者: from DataStore import calib_store [as 别名]
def main(argv=None):
if argv is None:
argv = sys.argv
try:
opts, args = getopt.getopt(argv[1:], "h", ['help'])
except getopt.error, msg:
print >>sys.stderr, 'Error: %s\n' % msg
print >>sys.stderr, __usage__.strip()
return 1
# process options
for o, a in opts:
if o in ('-h', '--help'):
print __usage__.strip()
return 0
# check arguments
if len(args) != 1:
print >>sys.stderr, 'Error: 1 argument required\n'
print >>sys.stderr, __usage__.strip()
return 2
logger = ApplicationLogger(1)
data_dir = args[0]
return Process(DataStore.params(data_dir),
DataStore.data_store(data_dir),
DataStore.calib_store(data_dir),
DataStore.hourly_store(data_dir),
DataStore.daily_store(data_dir),
DataStore.monthly_store(data_dir))
if __name__ == "__main__":
sys.exit(main())
示例4: main
# 需要导入模块: import DataStore [as 别名]
# 或者: from DataStore import calib_store [as 别名]
def main(argv=None):
if argv is None:
argv = sys.argv
try:
opts, args = getopt.getopt(argv[1:], "", ['help'])
except getopt.error, msg:
print >>sys.stderr, 'Error: %s\n' % msg
print >>sys.stderr, __doc__.strip()
return 1
# check arguments
if len(args) != 3:
print >>sys.stderr, 'Error: 3 arguments required\n'
print >>sys.stderr, __doc__.strip()
return 2
# process options
for o, a in opts:
if o == '--help':
print __doc__.strip()
return 0
logger = ApplicationLogger(1)
params = DataStore.params(args[0])
Localisation.SetApplicationLanguage(params)
return Template(
params,
DataStore.calib_store(args[0]), DataStore.hourly_store(args[0]),
DataStore.daily_store(args[0]), DataStore.monthly_store(args[0])
).make_file(args[1], args[2])
if __name__ == "__main__":
sys.exit(main())