久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<i id='4kVmS'><tr id='4kVmS'><dt id='4kVmS'><q id='4kVmS'><span id='4kVmS'><b id='4kVmS'><form id='4kVmS'><ins id='4kVmS'></ins><ul id='4kVmS'></ul><sub id='4kVmS'></sub></form><legend id='4kVmS'></legend><bdo id='4kVmS'><pre id='4kVmS'><center id='4kVmS'></center></pre></bdo></b><th id='4kVmS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='4kVmS'><tfoot id='4kVmS'></tfoot><dl id='4kVmS'><fieldset id='4kVmS'></fieldset></dl></div>

        <tfoot id='4kVmS'></tfoot>
        <legend id='4kVmS'><style id='4kVmS'><dir id='4kVmS'><q id='4kVmS'></q></dir></style></legend>

        <small id='4kVmS'></small><noframes id='4kVmS'>

          <bdo id='4kVmS'></bdo><ul id='4kVmS'></ul>

        setup.py 中 entry_points/console_scripts 和腳本之間的區(qū)

        Difference between entry_points/console_scripts and scripts in setup.py?(setup.py 中 entry_points/console_scripts 和腳本之間的區(qū)別?)
        <tfoot id='Gf6Wc'></tfoot>

            • <i id='Gf6Wc'><tr id='Gf6Wc'><dt id='Gf6Wc'><q id='Gf6Wc'><span id='Gf6Wc'><b id='Gf6Wc'><form id='Gf6Wc'><ins id='Gf6Wc'></ins><ul id='Gf6Wc'></ul><sub id='Gf6Wc'></sub></form><legend id='Gf6Wc'></legend><bdo id='Gf6Wc'><pre id='Gf6Wc'><center id='Gf6Wc'></center></pre></bdo></b><th id='Gf6Wc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Gf6Wc'><tfoot id='Gf6Wc'></tfoot><dl id='Gf6Wc'><fieldset id='Gf6Wc'></fieldset></dl></div>
              • <bdo id='Gf6Wc'></bdo><ul id='Gf6Wc'></ul>

                <small id='Gf6Wc'></small><noframes id='Gf6Wc'>

                  <tbody id='Gf6Wc'></tbody>

                1. <legend id='Gf6Wc'><style id='Gf6Wc'><dir id='Gf6Wc'><q id='Gf6Wc'></q></dir></style></legend>
                  本文介紹了setup.py 中 entry_points/console_scripts 和腳本之間的區(qū)別?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  通過 setup.py 將 Python 控制臺腳本安裝到我的路徑中基本上有兩種方法:

                  There are basically two ways to install Python console scripts to my path by setup.py:

                  setup(
                      ...
                      entry_points = {
                          'console_scripts': [
                              'foo = package.module:func',
                          ],
                      }
                  )
                  

                  setup(
                      ...
                      scripts = [
                          'scripts/myscript.sh'
                      ]
                  )
                  

                  有什么區(qū)別?我看到第一種方法允許我為我的腳本選擇好的、特定的名稱,但是還有其他區(qū)別嗎?不同的原始用途、兼容性(setuptools、distutils、...?)、用法、...?我很困惑,一個很好的詳細(xì)回復(fù)可以幫助我(可能還有其他人)正確理解這一切.

                  What are the differences? I see the first approach allows me to choose nice, specific name for my script, but are there any other differences? Different original purposes, compatibility (setuptools, distutils, ...?), usage, ...? I am quite confused and a nice elaborated reply could help me (and probably also others) to properly understand all this.

                  更新:自從我提出問題 PyPA 發(fā)布 這些關(guān)于該主題的酷文檔.

                  Update: Since I asked the question PyPA published these cool docs on the topic.

                  推薦答案

                  (很棒的)Click 包的文檔 建議幾個理由 使用入口點而不是腳本,包括

                  The docs for the (awesome) Click package suggest a few reasons to use entry points instead of scripts, including

                  1. 跨平臺兼容性和
                  2. 避免讓解釋器將 __name__ 分配給 __main__,這可能導(dǎo)致代碼被導(dǎo)入兩次(如果另一個模塊導(dǎo)入您的腳本)
                  1. cross-platform compatibility and
                  2. avoiding having the interpreter assign __name__ to __main__, which could cause code to be imported twice (if another module imports your script)

                  Click 是實現(xiàn)函數(shù)的好方法,可用作 entry_points,順便說一句.

                  Click is a nice way to implement functions for use as entry_points, btw.

                  這篇關(guān)于setup.py 中 entry_points/console_scripts 和腳本之間的區(qū)別?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復(fù)導(dǎo)入頂級名稱的情況下構(gòu)造python包)
                  Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                  How to refresh sys.path?(如何刷新 sys.path?)
                  Distribute a Python package with a compiled dynamic shared library(分發(fā)帶有已編譯動態(tài)共享庫的 Python 包)
                  • <small id='COruf'></small><noframes id='COruf'>

                      <tfoot id='COruf'></tfoot><legend id='COruf'><style id='COruf'><dir id='COruf'><q id='COruf'></q></dir></style></legend>
                        <tbody id='COruf'></tbody>

                        <bdo id='COruf'></bdo><ul id='COruf'></ul>

                            <i id='COruf'><tr id='COruf'><dt id='COruf'><q id='COruf'><span id='COruf'><b id='COruf'><form id='COruf'><ins id='COruf'></ins><ul id='COruf'></ul><sub id='COruf'></sub></form><legend id='COruf'></legend><bdo id='COruf'><pre id='COruf'><center id='COruf'></center></pre></bdo></b><th id='COruf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='COruf'><tfoot id='COruf'></tfoot><dl id='COruf'><fieldset id='COruf'></fieldset></dl></div>

                          • 主站蜘蛛池模板: 久久久精品综合 | 久久婷婷av | 欧美黄色绿像 | 日本网站免费观看 | 欧美激情黄色 | 国产精品91视频 | 欧美精品一区二区三区四区 在线 | 国产欧美一区二区三区日本久久久 | 成人亚洲片 | 日一日操一操 | 久久99久久98精品免观看软件 | 色综合天天综合网国产成人网 | 国产精品久久久久久久久久久久冷 | 国产精品久久久久久久久大全 | 国产成人免费视频 | 69av网| 欧美激情一区 | 在线观看日本网站 | 日韩亚洲视频 | 亚洲在线一区 | 亚洲一区在线观看视频 | 国产亚洲欧美另类一区二区三区 | 一区二区亚洲 | 亚洲精品在线视频 | 国产成人精品一区二区三区 | 免费在线观看一区二区 | 国产三级日本三级 | 美国一级片在线观看 | 日日干日日射 | 99re热这里只有精品视频 | 成人中文字幕在线观看 | 日韩一区二区三区在线 | 久久亚洲一区二区 | 久久大| www.干| 99国产精品99久久久久久 | 久久夜色精品国产 | 午夜影院在线观看视频 | 国产视频二区 | 亚洲日本免费 | 国产精品美女在线观看 |