How to build a single python file from multiple scripts?

前端 未结 8 1754
终归单人心
终归单人心 2020-12-24 01:30

I have a simple python script, which imports various other modules I\'ve written (and so on). Due to my environment, my PYTHONPATH is quite long. I\'m also using Python 2.

8条回答
  •  既然无缘
    2020-12-24 02:21

    Use stickytape module

    stickytape scripts/blah --add-python-path . > /tmp/blah-standalone
    

    This will result with a functioning script, but not necessarily human-readable.

提交回复
热议问题