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


Python TreeDict.verbose方法代码示例

本文整理汇总了Python中treedict.TreeDict.verbose方法的典型用法代码示例。如果您正苦于以下问题:Python TreeDict.verbose方法的具体用法?Python TreeDict.verbose怎么用?Python TreeDict.verbose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在treedict.TreeDict的用法示例。


在下文中一共展示了TreeDict.verbose方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: TreeDict

# 需要导入模块: from treedict import TreeDict [as 别名]
# 或者: from treedict.TreeDict import verbose [as 别名]
########################################
# __call__

from treedict import TreeDict
t = TreeDict()
t('a.b.x', 1, x = 2)
print t.makeReport()
t(y = 3)(z = 4)
print t.makeReport()

########################################
# The globals

t = getTree("default_parameters")
t.verbose = False
t.run_mode = t.chug

t.chug.action = "drink"
t.chug.quantity = "lots"

t.sip.action = "drink"
t.sip.quantity = "a little"

if True:
    def run(run_parameters):

        t = getTree("default_parameters")
        t.update(parameters)

        # The following will print "drink lots" unless overridden by run_parameters
开发者ID:aurora1625,项目名称:treedict,代码行数:32,代码来源:docstringscraps.py

示例2: set

# 需要导入模块: from treedict import TreeDict [as 别名]
# 或者: from treedict.TreeDict import verbose [as 别名]
# Default global options

is_boolean = set([True, False])

__default_opttree = TreeDict()
    
__default_opttree.logging.format = (str, '%(asctime)s %(name)-12s %(levelname)-8s %(message)s', 
                                    'Format string used for the logging.')
__default_opttree.logging.datefmt = (str, '%H:%M:%S', 
                                    'Format string used for the date in the logging.')
    
__default_opttree.debug_mode = (is_boolean, False, "Enable debug mode in compilation.")
__default_opttree.use_hdf5 = (is_boolean, False, "Use hdf5 for caching instead of simple pickling.")
__default_opttree.cache_compression = (is_boolean, True, "Use bz2 compression on the cache files.")
__default_opttree.project_directory = (str, '.', "The root of the project directory.")
__default_opttree.verbose = (is_boolean, False, "Print more detailed diagnostic and progress messages.")
__default_opttree.no_cache = (is_boolean, False, "Disable the caching system.")
__default_opttree.force = (is_boolean, False, "Overwrite existing files when creating new modules.")
__default_opttree.cache_read_only = (is_boolean, False, "Only load things from cache; never save.")
__default_opttree.no_compile = (is_boolean, False, "Disable compiling things, even if source files are modified.")
__default_opttree.config_file = (str, 'conf', "The configuration file to load options from.")
__default_opttree.cache_directory = ([str, type(None)], None, "The cache directory to use; None disables caching.")
__default_opttree.import_list = (list, [], "List of modules / directories to import in loading project.")
__default_opttree.auto_import = (is_boolean, True, "Automatically import all subdirs with __init__.py files.")
__default_opttree.cython.use_cpp = (is_boolean, False, "Compile cython extensions in C++ mode.")

__default_opttree.cython.compiler_args = (list, [], "Additional arguments to use when compiling cython extensions.")
__default_opttree.cython.link_args = (list, [], "Additional arguments to use when linking cython extensions.")
__default_opttree.cython.extra_include_dirs = (list, [], "Additional include directories to pass to the compiler.")
__default_opttree.cython.extra_library_dirs = (list, [], "Additional library directories to pass to the linker.")
__default_opttree.cython.libraries = (list, [], "Additional libraries use in linking.")
开发者ID:aurora1625,项目名称:lazyrunner,代码行数:33,代码来源:configuration.py


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