當前位置: 首頁>>代碼示例>>Python>>正文


Python Config.help方法代碼示例

本文整理匯總了Python中nose.config.Config.help方法的典型用法代碼示例。如果您正苦於以下問題:Python Config.help方法的具體用法?Python Config.help怎麽用?Python Config.help使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在nose.config.Config的用法示例。


在下文中一共展示了Config.help方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: usage

# 需要導入模塊: from nose.config import Config [as 別名]
# 或者: from nose.config.Config import help [as 別名]
def usage():
    conf = Config(plugins=BuiltinPluginManager())
    usage_text = conf.help(nose.main.__doc__).replace('mkwiki.py', 'nosetests')
    out = '{{{\n%s\n}}}\n' % usage_text
    return out
開發者ID:GaloisInc,項目名稱:echronos,代碼行數:7,代碼來源:mkwiki.py

示例2: print

# 需要導入模塊: from nose.config import Config [as 別名]
# 或者: from nose.config.Config import help [as 別名]
print("Commands...")
cmds = publish_parts(nose.commands.__doc__, reader=DocReader(),
                     writer_name='html')
docs['commands'] = cmds['body']

print("Changelog...")
changes = open(os.path.join(root, 'CHANGELOG'), 'r').read()
changes_html = publish_parts(changes, reader=DocReader(), writer_name='html')
docs['changelog'] = changes_html['body']

print("News...")
news = open(os.path.join(root, 'NEWS'), 'r').read()
news_html = publish_parts(news, reader=DocReader(), writer_name='html')
docs['news'] = news_html['body']

print("Usage...")
conf = Config(plugins=BuiltinPluginManager())
usage_txt = conf.help(nose.main.__doc__).replace(
    'mkindex.py', 'nosetests')
docs['usage'] = '<pre>%s</pre>' % usage_txt

out = tpl % docs

index = open(os.path.join(root, 'index.html'), 'w')
index.write(out)
index.close()

readme = open(os.path.join(root, 'README.txt'), 'w')
readme.write(nose.__doc__)
readme.close()
開發者ID:GaloisInc,項目名稱:echronos,代碼行數:32,代碼來源:mkindex.py


注:本文中的nose.config.Config.help方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。