473,587 Members | 2,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

py2exe - change name of exe created

I have a setup script like this;

setup(windows = [{"script":"mypr ogram.py",
"icon_resources ":[(0,"nabbitt.ico ")],
"other_resource s": [(24,1,manifest)]}
],
name = "Nabbitt ver 0.1",
data_files = [("",rootdata )],
zipfile = None,
options = {"py2exe": {
"compressed " : 1,
"dll_exclud es": ["w9xpopen.e xe"], #should also exclude
MSVCR71.dll
"bundle_fil es": 3 # 1=Single .exe, 2=.exe with
pythonXX.dll
}
},
)

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

I have a setup script like this;

setup(windows = [{"script":"mypr ogram.py",
"icon_resources ":[(0,"nabbitt.ico ")],
"other_resource s": [(24,1,manifest)]}
],
name = "My Program ver 0.1",
data_files = [("",rootdata )],
zipfile = None,
options = {"py2exe": {
"compressed " : 1,
"dll_exclud es":
["w9xpopen.e xe"],
"bundle_fil es": 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**********@g mail.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.e xe')

--
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":"mypr ogram.py",
"icon_resources ":[(0,"nabbitt.ico ")],
"other_resource s": [(24,1,manifest)]}
],
name = "My Program ver 0.1",
data_files = [("",rootdata )],
zipfile = None,
options = {"py2exe": {
"compressed " : 1,
"dll_exclud es":
["w9xpopen.e xe"],
"bundle_fil es": 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":"mypr ogram.py",
"icon_resources ":[(0,"nabbitt.ico ")],
"dest_base" : "MyBestProgram" ,
"other_resource s": [(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":"mypr ogram.py",
"icon_resources ":[(0,"nabbitt.ico ")],
"other_resource s": [(24,1,manifest)]}
],
name = "My Program ver 0.1",
data_files = [("",rootdata )],
zipfile = None,
options = {"py2exe": {
"compressed " : 1,
"dll_exclud es":
["w9xpopen.e xe"],
"bundle_fil es": 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":"mypr ogram.py",
"icon_resources ":[(0,"nabbitt.ico ")],

"dest_base" : "MyBestProgram" , "other_resource s": [(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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2979
by: RJS | last post by:
Hi all, I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32- py2.2). Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222. In the sample below, commenting out "import numarray" allows the exe to run. Left in, I get "4.exe has generated errors" etc. I'm going around and around and there isn't much on Google....
2
3666
by: Thomas Heller | last post by:
"Brad Clements" <bkc@murkworks.com> writes: > Once again I apologize for posting this py2exe question in the ctypes list. ;-) In the long run, this will be the wrong forum. I suggest comp.lang.python (or should a py2exe mailing list be created?). And I'm cc'ing to python-list. > > I need to ship a Windows service in py2exe, but I also...
3
6587
by: Marc | last post by:
Hi all, I know that to hide a console normally you simply change the extension from .py to .pyw. That's simple enough. However I can't seem to accomplish the same thing after freezing the program. I've tried building the setup file with the python script as a .pyw file, but it crashes and doesn't give me a reason. This is of course because...
1
2583
by: Funduk | last post by:
Hello, So I've been playing with Python and Pygame for a while and I decided I wanted to make a real executable so I could send that stuff over to my friends to show off my <sarcasm>maad skillz</sarcasm>. Everything was going great I went and got all the newest software (including Distutils and PY2EXE) and read the docs on making a setup...
4
3583
by: Werner Merkl | last post by:
Hi, we have written a Python EXE program, which should run via AUTORUN.INF from a CD/DVD (Windows of course). For this CD/DVD we us a imaging tool from Microsoft, which seam to generate a pure ISO 9660 level 1 image.
1
338
by: mitsura | last post by:
Hi, I just installed py2exe to create a binary of my Python script. However, py2exe does not seem to create a binary from my .py script. This is what I have done: I create a setup.py script: " # setup.py from distutils.core import setup import py2exe
0
13453
bartonc
by: bartonc | last post by:
You can find the original author of the script by ggling " Py2Exe version 6.3 setup" The cool thing about this is that it calls py2exe, just in case you're uncomfortable with the command line. I had to search hi and lo for the example of how to exclude Tkinter. Coming soon: scipy includes and numpy include that gets rid of complaints of missing...
5
2018
by: Doug Morse | last post by:
Hi, I have an application that runs just fine using the standard Python distro interpreter (v2.5.1 on WinXP) but throws the following exception when run as an executable built with py2exe. My questions are: (a) does anyone have any thoughts on why this exception is occurring and what to do about it, and (b) more generally, why would a...
5
2117
by: Alexnb | last post by:
Hello I am sure most of you are familiar with py2exe. I am having a bit of a problem. See the program has a few pictures involved and the .ico it uses for the windows. However, the pictures are stored in the same directory as the source, something like: C:\Docs and settings\me\My docs\python\program. When I run the program for the...
0
7915
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8205
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2347
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.