python命令行应用程序裸体模板。

sectemp-bootstrap的Python项目详细描述


这是python命令行应用程序的结构模板 通过setuptools/pypi/pip为python 2和3发布和分发。

用法

克隆此存储库并为您自己的项目采用引导结构。 这只是一个起点,但我希望是一个好的起点。从那以后,你应该 阅读并跟随http://python-packaging-user-guide.readthedocs.org/en/latest/, python打包的明确资源。

行为

灵活调用< EH3>

应用程序可以在两个不同的源目录中运行 方式:

  1. 将bootstrap目录视为包,并将视为主脚本:

    $ python -m bootstrap arg1 arg2
    Executing bootstrap version 0.2.0.
    List of argument strings: ['arg1', 'arg2']
    Stuff and Boo():
    <class 'bootstrap.stuff.Stuff'>
    <bootstrap.bootstrap.Boo object at 0x7f43d9f65a90>
    
  2. 使用bootstrap-runner.py包装器:

    $ ./bootstrap-runner.py arg1 arg2
    Executing bootstrap version 0.2.0.
    List of argument strings: ['arg1', 'arg2']
    Stuff and Boo():
    <class 'bootstrap.stuff.Stuff'>
    <bootstrap.bootstrap.Boo object at 0x7f149554ead0>
    

安装设置引导命令

安装前情况:

$ bootstrap
bash: bootstrap: command not found

从源树(或通过pypi中的pip)直接安装:

$ python setup.py install

现在,bootstrap命令可用:

$ bootstrap arg1 arg2
Executing bootstrap version 0.2.0.
List of argument strings: ['arg1', 'arg2']
Stuff and Boo():
<class 'bootstrap.stuff.Stuff'>
<bootstrap.bootstrap.Boo object at 0x7f366749a190>

在类unix系统上,安装程序将bootstrap脚本放入 集中的bin目录,应该在PATH中。在Windows上, bootstrap.exe被放在一个集中的Scripts目录中 也应该在您的PATH中。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何使用jaxb整理集合?   java改装添加带有令牌和id的标头   Java Webstart在启动应用程序之前停止   mysql将请求主体作为JSON存储到Java数据库中   春天3。从Java 7更新到Java 8后x应用程序不工作   java如何为我的mock实例化unirest HttpResponse<JsonNode>?   java两个servlet在同一场战争中与两场独立战争中的利弊?   java Mockito验证未失败   GWT中的java文件读取器   java避免代码重复   java谁将设置saml cookie,其中包含凭证信息   java如何修改jar包代码,然后重新导出更新的jar包?   BST数据结构中的java递归差异   java如何从文本文件中读取存储的哈希表?   带有quercus的java php comet   java从SeleniumWebDriver写入json变量   javascript如何在同一个action类中对方法调用action?