Python py2exe更改应用程序名称输出

Python py2exe更改应用程序名称输出,python,py2exe,Python,Py2exe,我正在做我的第一个Python项目,我需要用py2exe编译。我编写了以下setup.py代码: from distutils.core import setup import py2exe import sys import os if len(sys.argv) == 1: sys.argv.append("py2exe") setup( options = {"py2exe": {"compressed": 1, "optimize": 2,"dll_excludes": "

我正在做我的第一个Python项目,我需要用py2exe编译。我编写了以下setup.py代码:

from distutils.core import setup
import py2exe
import sys
import os 

if len(sys.argv) == 1:
    sys.argv.append("py2exe")

setup( options = {"py2exe": {"compressed": 1, "optimize": 2,"dll_excludes": "w9xpopen.exe",'dist_dir': "myproject", "ascii": 0, "bundle_files": 1}},
       zipfile = None,

       console = [
        {
            "script": "myapplication.py",                    ### Main Python script    
            "icon_resources": [(0, "favicon.ico")]     ### Icon to embed into the PE file.
        }
    ],)

os.system('upx -9 dist/*.exe')
os.system("rmdir /s /q build")
os.system("del /q *.pyc")
安装代码正在运行,但我需要将已编译应用程序的名称从myapplication更改为project.exe。py2exe的哪些选项会更改输出应用程序的名称?

的“dest\u base”:“app\u name”
添加到您的控制台目录中,如下所示:


name
-参数设置为设置函数
setup(name=“project”,…
的参数。我在文档中很难找到它。您知道它的详细信息吗?
   console = [
    {
        "script": "myapplication.py",                    ### Main Python script    
        "icon_resources": [(0, "favicon.ico")], ### Icon to embed into the PE file.
        "dest_base" : "app_name"
    }]