五、Py2exe支持的参数(通过python setup_py2exe.py py2exe --help 可以打印出来,但是这些参数我也没用过,有空再摸索摸索) Global options: --verbose (-v) run verbosely (default) --quiet (-q) run quietly (turns verbosity off) --dry-run (-n) don't actually do anything --help (-h) show detailed help message Options for 'py2exe' command: --optimize (-O) optimization level: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0] --dist-dir (-d) directory to put final built distributions in (default is dist) --excludes (-e) comma-separated list of modules to exclude --dll-excludes comma-separated list of DLLs to exclude --ignores comma-separated list of modules to ignore if they are not found --includes (-i) comma-separated list of modules to include --packages (-p) comma-separated list of packages to include --compressed (-c) create a compressed zipfile --xref (-x) create and show a module cross reference --bundle-files (-b) bundle dlls in the zipfile or the exe. Valid levels are 1, 2, or 3 (default) --skip-archive do not place Python bytecode files in an archive, put them directly in the file system --ascii (-a) do not automatically include encodings and codecs --custom-boot-script Python file that will be run when setting up the runtime environment usage: setup_py2exe.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup_py2exe.py --help [cmd1 cmd2 ...] or: setup_py2exe.py --help-commands or: setup_py2exe.py cmd --help 六、高级,其实也不高级
看那个编译脚本中的这句:setup(console=["HelloPy2exe.py"]),setup还支持很多参数,windows(一个windows界面程序),data_filse(打包其他的文件)……以后再说说。