Using Py2Exe without command line
问题 Is it possible to compile a python script with py2exe without calling py2exe from the command line? >Python setup.py py2exe I'd like to run it all from a script, but haven't found a way to do so. 回答1: at the beginig of the setup.py import sys if len(sys.argv) == 1: sys.argv.append("py2exe") this way, if setup.py is called without args or with a double click, it will start the packaging 来源: https://stackoverflow.com/questions/15551527/using-py2exe-without-command-line