当前位置: 首页>>代码示例>>Python>>正文


Python ObjectDict.debug方法代码示例

本文整理汇总了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()
开发者ID:hellais,项目名称:bridgeherder,代码行数:33,代码来源:log.py

示例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')
开发者ID:Afridocs,项目名称:GLBackend,代码行数:32,代码来源:config.py


注:本文中的cyclone.util.ObjectDict.debug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。