擅长:python、mysql、java
<p>有两种方法可以从setuptools和PyPI基础结构获取工作命令行工具:</p>
<ol>
<li><a href="http://python-packaging.readthedocs.org/en/latest/command-line-scripts.html#the-scripts-keyword-argument" rel="noreferrer">The "scripts" Keyword Argument</a>
<br/>这允许命令行执行您想要的所有内容,可以是Python脚本、shell脚本或完全不同的脚本。</li>
<li><a href="http://python-packaging.readthedocs.org/en/latest/command-line-scripts.html#the-console-scripts-entry-point" rel="noreferrer">The "console_scripts" Entry Point</a>
<br/>这允许使用Python函数(而不是脚本!)直接注册为命令行可访问工具。</li>
</ol>