【问题标题】:Can I add comments to a pip requirements file?我可以在 pip 要求文件中添加注释吗?
【发布时间】:2012-02-27 21:46:09
【问题描述】:

我想在 pip 需求文件中为几个包添加 cmets。 (只是为了解释为什么该软件包在列表中。)我可以这样做吗?

我在想象类似的东西

Babel==0.9.5 # translation
CherryPy==3.2.0 # web server
Creoleparser==0.7.1 # wiki formatting
Genshi==0.5.1 # templating

【问题讨论】:

    标签: python comments pip


    【解决方案1】:

    当然可以,只需使用#

    pip docs:

    以# 开头的行被视为注释并被忽略。空格后跟 # 会导致 # 和该行的其余部分被视为注释。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-09-26
      • 1970-01-01
      • 2011-01-25
      • 2011-09-02
      • 2016-10-17
      • 1970-01-01
      • 2011-10-09
      • 1970-01-01
      相关资源
      最近更新 更多