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


Python dist.help方法代碼示例

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


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

示例1: _command_line_ok

# 需要導入模塊: from distutils import dist [as 別名]
# 或者: from distutils.dist import help [as 別名]
def _command_line_ok(_cache=None):
    """ Return True if command line does not contain any
    help or display requests.
    """
    if _cache:
        return _cache[0]
    elif _cache is None:
        _cache = []
    ok = True
    display_opts = ['--'+n for n in Distribution.display_option_names]
    for o in Distribution.display_options:
        if o[1]:
            display_opts.append('-'+o[1])
    for arg in sys.argv:
        if arg.startswith('--help') or arg=='-h' or arg in display_opts:
            ok = False
            break
    _cache.append(ok)
    return ok 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:21,代碼來源:core.py

示例2: _command_line_ok

# 需要導入模塊: from distutils import dist [as 別名]
# 或者: from distutils.dist import help [as 別名]
def _command_line_ok(_cache=[]):
    """ Return True if command line does not contain any
    help or display requests.
    """
    if _cache:
        return _cache[0]
    ok = True
    display_opts = ['--'+n for n in Distribution.display_option_names]
    for o in Distribution.display_options:
        if o[1]:
            display_opts.append('-'+o[1])
    for arg in sys.argv:
        if arg.startswith('--help') or arg=='-h' or arg in display_opts:
            ok = False
            break
    _cache.append(ok)
    return ok 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:19,代碼來源:core.py

示例3: test_show_help

# 需要導入模塊: from distutils import dist [as 別名]
# 或者: from distutils.dist import help [as 別名]
def test_show_help(self):
        # smoke test, just makes sure some help is displayed
        self.addCleanup(log.set_threshold, log._global_log.threshold)
        dist = Distribution()
        sys.argv = []
        dist.help = 1
        dist.script_name = 'setup.py'
        with captured_stdout() as s:
            dist.parse_command_line()

        output = [line for line in s.getvalue().split('\n')
                  if line.strip() != '']
        self.assertTrue(output) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:15,代碼來源:test_dist.py

示例4: test_show_help

# 需要導入模塊: from distutils import dist [as 別名]
# 或者: from distutils.dist import help [as 別名]
def test_show_help(self):
        # smoke test, just makes sure some help is displayed
        dist = Distribution()
        sys.argv = []
        dist.help = 1
        dist.script_name = 'setup.py'
        with captured_stdout() as s:
            dist.parse_command_line()

        output = [line for line in s.getvalue().split('\n')
                  if line.strip() != '']
        self.assertTrue(len(output) > 0) 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:14,代碼來源:test_dist.py

示例5: test_show_help

# 需要導入模塊: from distutils import dist [as 別名]
# 或者: from distutils.dist import help [as 別名]
def test_show_help(self):
        # smoke test, just makes sure some help is displayed
        dist = Distribution()
        sys.argv = []
        dist.help = 1
        dist.script_name = 'setup.py'
        with captured_stdout() as s:
            dist.parse_command_line()

        output = [line for line in s.getvalue().split('\n')
                  if line.strip() != '']
        self.assertTrue(output) 
開發者ID:aliyun,項目名稱:oss-ftp,代碼行數:14,代碼來源:test_dist.py


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