Is a Scripts directory an anti-pattern in Python? If so, what's the right way to import?

后端 未结 4 989
醉酒成梦
醉酒成梦 2021-02-19 01:31

I\'ve always created scripts directories in every project I\'ve built because they\'re useful for putting infrequently used executable scripts. In Python, I\'ll always put an

4条回答
  •  不思量自难忘°
    2021-02-19 01:58

    Setuptools can create scripts automatically if you give it a list of entry points (i.e. main() functions). If you're already using Setuptools, it's very easy to turn on. Then you can merge your scripts directory with your other packages.

提交回复
热议问题