469,268 Members | 1,002 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,268 developers. It's quick & easy.

py2exe - change name of exe created

I have a setup script like this;

setup(windows = [{"script":"myprogram.py",
"icon_resources":[(0,"nabbitt.ico")],
"other_resources": [(24,1,manifest)]}
],
name = "Nabbitt ver 0.1",
data_files = [("",rootdata)],
zipfile = None,
options = {"py2exe": {
"compressed" : 1,
"dll_excludes": ["w9xpopen.exe"], #should also exclude
MSVCR71.dll
"bundle_files": 3 # 1=Single .exe, 2=.exe with
pythonXX.dll
}
},
)

Sep 7 '07 #1
4 4819
Sorry for the double post, sent it to quickly.

I have a setup script like this;

setup(windows = [{"script":"myprogram.py",
"icon_resources":[(0,"nabbitt.ico")],
"other_resources": [(24,1,manifest)]}
],
name = "My Program ver 0.1",
data_files = [("",rootdata)],
zipfile = None,
options = {"py2exe": {
"compressed" : 1,
"dll_excludes":
["w9xpopen.exe"],
"bundle_files": 3
}
},
)
Note that every thing works fine with this and creates an exe program
called
"myprogram.exe"

I would like to setup program to create an output called;
"MyBestProgram.exe"

IS that at all possible ?

Geoff.

Sep 7 '07 #2
On 2007-09-07, imageguy <im**********@gmail.comwrote:
Note that every thing works fine with this and creates an exe
program called "myprogram.exe"

I would like to setup program to create an output called;
"MyBestProgram.exe"

IS that at all possible ?
ADD this to the end of your script:

import os
os.rename('dist/myprogram.exe','dist/MyBestProgram.exe')

--
Grant Edwards grante Yow! Zippy's brain cells
at are straining to bridge
visi.com synapses ...
Sep 7 '07 #3
imageguy schrieb:
Sorry for the double post, sent it to quickly.

I have a setup script like this;

setup(windows = [{"script":"myprogram.py",
"icon_resources":[(0,"nabbitt.ico")],
"other_resources": [(24,1,manifest)]}
],
name = "My Program ver 0.1",
data_files = [("",rootdata)],
zipfile = None,
options = {"py2exe": {
"compressed" : 1,
"dll_excludes":
["w9xpopen.exe"],
"bundle_files": 3
}
},
)
Note that every thing works fine with this and creates an exe program
called
"myprogram.exe"

I would like to setup program to create an output called;
"MyBestProgram.exe"

IS that at all possible ?
Yes. Use a 'dest_base' key in the dictionary, like so:
setup(windows = [{"script":"myprogram.py",
"icon_resources":[(0,"nabbitt.ico")],
"dest_base": "MyBestProgram",
"other_resources": [(24,1,manifest)]}
....

'dest_base' is the basename of the destination program that py2exe creates.

Thomas

Sep 7 '07 #4
On Sep 7, 11:22 am, Thomas Heller <thel...@ctypes.orgwrote:
imageguy schrieb:


Sorry for the double post, sent it to quickly.
I have a setup script like this;
setup(windows = [{"script":"myprogram.py",
"icon_resources":[(0,"nabbitt.ico")],
"other_resources": [(24,1,manifest)]}
],
name = "My Program ver 0.1",
data_files = [("",rootdata)],
zipfile = None,
options = {"py2exe": {
"compressed" : 1,
"dll_excludes":
["w9xpopen.exe"],
"bundle_files": 3
}
},
)
Note that every thing works fine with this and creates an exe program
called
"myprogram.exe"
I would like to setup program to create an output called;
"MyBestProgram.exe"
IS that at all possible ?

Yes. Use a 'dest_base' key in the dictionary, like so:
setup(windows = [{"script":"myprogram.py",
"icon_resources":[(0,"nabbitt.ico")],

"dest_base": "MyBestProgram", "other_resources": [(24,1,manifest)]}

...

'dest_base' is the basename of the destination program that py2exe creates.

Thomas- Hide quoted text -

- Show quoted text -
Thanks.
I really appreciate the response.
Where would I find that in the docs ? Thought I had searched
everywhere.

G.

Sep 7 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by RJS | last post: by
2 posts views Thread by Thomas Heller | last post: by
1 post views Thread by Funduk | last post: by
4 posts views Thread by Werner Merkl | last post: by
1 post views Thread by mitsura | last post: by
5 posts views Thread by Doug Morse | last post: by
5 posts views Thread by Alexnb | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.