本文整理匯總了Python中cyclone.util.ObjectDict.debug方法的典型用法代碼示例。如果您正苦於以下問題:Python ObjectDict.debug方法的具體用法?Python ObjectDict.debug怎麽用?Python ObjectDict.debug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cyclone.util.ObjectDict
的用法示例。
在下文中一共展示了ObjectDict.debug方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: OD
# 需要導入模塊: from cyclone.util import ObjectDict [as 別名]
# 或者: from cyclone.util.ObjectDict import debug [as 別名]
# -*- encoding: utf-8 -*-
#
# :authors: Arturo Filastò
# :licence: see LICENSE
import sys
import os
import logging
from twisted.python import log as txlog
from twisted.python.logfile import DailyLogFile
from cyclone.util import ObjectDict as OD
config = OD()
config.debug = True
# XXX make this a config option
log_file = "/tmp/bridgeherder.log"
log_folder = os.path.join('/', *log_file.split('/')[:-1])
log_filename = log_file.split('/')[-1]
daily_logfile = DailyLogFile(log_filename, log_folder)
class LoggerFactory(object):
def __init__(self, options):
#print options
pass
def start(self, application):
logging.basicConfig()
示例2: ConfigError
# 需要導入模塊: from cyclone.util import ObjectDict [as 別名]
# 或者: from cyclone.util.ObjectDict import debug [as 別名]
raise ConfigError("GLClient not found at the %s path" % glclient_path)
return path
def get_db_file():
root = get_root_path()
db_dir = os.path.join(root, '_gldata')
if not os.path.isdir(db_dir):
os.mkdir(db_dir)
db_file = os.path.join(db_dir, 'glbackend.db')
return db_file
main = OD()
advanced = OD()
advanced.debug = True
main.glclient_path = get_glclient_path()
if advanced.debug:
print "Serving GLClient from %s" % main.glclient_path
main.database_uri = 'sqlite:'+get_db_file()
advanced.db_thread_pool_size = 10
advanced.scheduler_thread_pool_size = 10
advanced.data_dir = os.path.join(get_root_path(), '_gldata')
advanced.submissions_dir = os.path.join(advanced.data_dir, 'submissions')
advanced.delivery_dir = os.path.join(advanced.data_dir, 'delivery')