简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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