简体   繁体   English

在不使用命令行的情况下使用Py2Exe

[英]Using Py2Exe without command line

Is it possible to compile a python script with py2exe without calling py2exe from the command line? 是否可以使用py2exe编译python脚本而无需从命令行调用py2exe?

>Python setup.py py2exe

I'd like to run it all from a script, but haven't found a way to do so. 我想从脚本中运行所有程序,但是还没有找到一种方法。

at the beginig of the setup.py 在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 这样,如果在不使用args或双击的情况下调用setup.py,它将开始打包

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM