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\pro gram.
When I run the program for the interpreter, just as a .py, everything works
just as it should. However, when I compile the main source as an .exe, and
say let a friend try the program. It fails because it is missing the .ico.
The catch, is I don't want to have it have to installed, at least at this
point, I want it to be able to just run. So how can I make it just run from
any computer with the files not being in the immediate directory. If that is
not possible, how can I put them in the immediate directory and still make
it work. Because that directory may change a lot so the path will change.
Just a few questions. I hope someone out there can help me out!
--
View this message in context: http://www.nabble.com/py2exe-issues-...p18493908.html
Sent from the Python - python-list mailing list archive at Nabble.com. 5 2116
On Jul 16, 1:37*pm, Alexnb <alexnbr...@gma il.comwrote:
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\pro gram.
When I run the program for the interpreter, just as a .py, everything works
just as it should. However, when I compile the main source as an .exe, and
say let a friend try the program. It fails because it is missing the .ico..
The catch, is I don't want to have it have to installed, at least at this
point, I want it to be able to just run. So how can I make it just run from
any computer with the files not being in the immediate directory. If thatis
not possible, how can I put them in the immediate directory and still make
it work. Because that directory may change a lot so the path will change.
Just a few questions. I hope someone out there can help me out!
--
View this message in context:http://www.nabble.com/py2exe-issues-...cons-tp1849390...
Sent from the Python - python-list mailing list archive at Nabble.com.
Put the part of the code that needs the ico file(s) into a try/except
block. You could also try reading the py2exe wiki and tutorials. This
one looks like it has relevant data: http://www.py2exe.org/index.cgi/CustomIcons
Mike
Mike Driscoll wrote:
On Jul 16, 1:37Â*pm, Alexnb <alexnbr...@gma il.comwrote:
>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\pr ogram. When I run the program for the interpreter, just as a .py, everything works just as it should. However, when I compile the main source as an .exe, and say let a friend try the program. It fails because it is missing the .ico. The catch, is I don't want to have it have to installed, at least at this point, I want it to be able to just run. So how can I make it just run from any computer with the files not being in the immediate directory. If that is not possible, how can I put them in the immediate directory and still make it work. Because that directory may change a lot so the path will change..
Just a few questions. I hope someone out there can help me out! -- View this message in context:http://www.nabble.com/py2exe-issues-...cons-tp1849390... Sent from the Python - python-list mailing list archive at Nabble.com.
Put the part of the code that needs the ico file(s) into a try/except
block. You could also try reading the py2exe wiki and tutorials. This
one looks like it has relevant data: http://www.py2exe.org/index.cgi/CustomIcons
Mike
-- http://mail.python.org/mailman/listinfo/python-list
Well, that may solve the icon problem. But what about getting pictures in
there?
--
View this message in context: http://www.nabble.com/py2exe-issues-...p18495626.html
Sent from the Python - python-list mailing list archive at Nabble.com.
Alexnb wrote:
Mike Driscoll wrote:
> On Jul 16, 1:37Â*pm, Alexnb <alexnbr...@gma il.comwrote:
>>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\p rogram. When I run the program for the interpreter, just as a .py, everything works just as it should. However, when I compile the main source as an .exe, and say let a friend try the program. It fails because it is missing the .ico. The catch, is I don't want to have it have to installed, at least at this point, I want it to be able to just run. So how can I make it just run from any computer with the files not being in the immediate directory. If that is not possible, how can I put them in the immediate directory and still make it work. Because that directory may change a lot so the path will change.
Just a few questions. I hope someone out there can help me out! -- View this message in context:http://www.nabble.com/py2exe-issues-...cons-tp1849390... Sent from the Python - python-list mailing list archive at Nabble.com.
Put the part of the code that needs the ico file(s) into a try/except block. You could also try reading the py2exe wiki and tutorials. This one looks like it has relevant data:
http://www.py2exe.org/index.cgi/CustomIcons
Mike -- http://mail.python.org/mailman/listinfo/python-list
Well, that may solve the icon problem. But what about getting pictures in
there?
Okay, the icon fix didn't really fix it, what it did was make the .exe have
the icon as the little picture for the shortcut, but it isn't really a
shortcut. Whatever. But, I went and ran it on another computer and this was
the error log it created right off the bat.
Traceback (most recent call last):
File "The GUI.py", line 696, in <module>
File "Tkinter.py c", line 1515, in wm_iconbitmap
_tkinter.TclErr or: bitmap "C:\Documen ts and Settings\Alex\M y
Documents\PYTHO N\DictionaryApp \Windows.ico" not defined
--
View this message in context: http://www.nabble.com/py2exe-issues-...p18495836.html
Sent from the Python - python-list mailing list archive at Nabble.com.
On Jul 16, 3:22*pm, Alexnb <alexnbr...@gma il.comwrote:
Alexnb wrote:
Mike Driscoll wrote:
On Jul 16, 1:37*pm, Alexnb <alexnbr...@gma il.comwrote: 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\pr ogram. When I run the program for the interpreter, just as a .py, everything works just as it should. However, when I compile the main source as an .exe, and say let a friend try the program. It fails because it is missing the .ico. The catch, is I don't want to have it have to installed, at least at this point, I want it to be able to just run. So how can I make it just run from any computer with the files not being in the immediate directory. If that is not possible, how can I put them in the immediate directory and still make it work. Because that directory may change a lot so the path will change.
>Just a few questions. I hope someone out there can help me out! -- View this message in context:http://www.nabble.com/py2exe-issues-...cons-tp1849390... Sent from the Python - python-list mailing list archive at Nabble.com..
Put the part of the code that needs the ico file(s) into a try/except
block. You could also try reading the py2exe wiki and tutorials. This
one looks like it has relevant data:
>http://www.py2exe.org/index.cgi/CustomIcons
Mike
-- http://mail.python.org/mailman/listinfo/python-list
Well, that may solve the icon problem. But what about getting pictures in
there?
Okay, the icon fix didn't really fix it, what it did was make the .exe have
the icon as the little picture for the shortcut, but it isn't really a
shortcut. Whatever. But, I went and ran it on another computer and this was
the error log it created right off the bat.
Traceback (most recent call last):
* File "The GUI.py", line 696, in <module>
* File "Tkinter.py c", line 1515, in wm_iconbitmap
_tkinter.TclErr or: bitmap "C:\Documen ts and Settings\Alex\M y
Documents\PYTHO N\DictionaryApp \Windows.ico" not defined
--
View this message in context:http://www.nabble.com/py2exe-issues-...cons-tp1849390...
Sent from the Python - python-list mailing list archive at Nabble.com.
Crumb! I actually use a GUI wrapper for py2exe called GUI2Exe which
makes this sort of thing much easier. Unfortunately, it also makes me
less knowledgeable. You can check it out here: http://xoomer.alice.it/infinity77/main/GUI2Exe.html
Also, there's a distutils group and a py2exe group. Both of them would
know a lot more about how to do this. https://lists.sourceforge.net/lists/...o/py2exe-users http://www.python.org/community/sigs...tils-sig/list/
Mike
Alexnb wrote:
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\pro gram.
When I run the program for the interpreter, just as a .py, everything works
just as it should. However, when I compile the main source as an .exe, and
say let a friend try the program. It fails because it is missing the .ico.
The catch, is I don't want to have it have to installed, at least at this
point, I want it to be able to just run. So how can I make it just run from
any computer with the files not being in the immediate directory. If that is
not possible, how can I put them in the immediate directory and still make
it work. Because that directory may change a lot so the path will change.
Just a few questions. I hope someone out there can help me out!
Windows can't read minds. The icon's/pictures have to either be in the same
directory as the .exe or the .exe has to have a way to find them in another
folder (e.g. via .ini config file).
Takw a few minutes and go to: http://jrsoftware.org/isinfo.php
It is a free Windows installer that I use to take py2exe, icons, pictures,
..ini files, documentation, etc and wrap it all up into a nice, neat package that
can be distributed as a single .exe. It will take a couple of hours, but it
will be hours well spent (especially if you think you will do this more than once).
Larry This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Kathleen Kudzma |
last post by:
I'm having a problem with py2exe for Python 2.3. I got fixed the
Lookuperror no codec search functions registered: can't find encoding by
following the instructions on the py2exe page (added -packages encodings
--force-imports encodings). This resolved the codec error. When I tried to
create an exe with py2exe I still got the following...
|
by: John Carter |
last post by:
Does anyone know how to embed PIL into a py2exe program.
As far as I can tell PIL is not finding its plugins for Image I/O,
they are imported dynamically as required. So I cant load or save
pictures
I tried making a copy of the plugin files to the application
directory, but I've had no luck in making the code see the files
I'd be...
|
by: Grant Edwards |
last post by:
I'm trying in vain to set the icon for the executable generated
by py2exe. According to various sources there are two answers:
1) Do it on the command line:
python setup.py py2exe --icon foo.ico
That generates a usage error:
error: --icon not recognized
|
by: Dave Guenthner |
last post by:
I wrote my first Python script today and was very impressed at how
concise the code was and development time. In addition, I am using
the latest stable version of Python from ActiveState.com. Anyway,
when I compiled my file to an exectuable I was horrified to see a
"dist" folder with all kinds of co-reqs etc that had to be distributed
in...
|
by: kdahlhaus |
last post by:
Is anyone aware of issues with Py2exe and extensions compiled with
cygwin/mingw for Python 2.3? I have an extension that wraps access to
some C DLLs. The generated executable always segfaults at startup,
although things work fine when running through the normal python
interpreter. I had a guess that perhaps the issue stems from my...
| |
by: MLH |
last post by:
If I choose a command button on a form in design view,
open the properties box and click the Picture property
and its wiz button, I'm presented with a lengthy list of
pictures. Everything from Add Table, Address Book,
Airplane to Underline, Undo, Undo (Rewind). I would
like to know where they are stored. I thought it might be
c:\program...
|
by: Durumdara |
last post by:
Hi !
I have an application that I compile to exe.
1.)
I want to compile main.ico into exe, or int zip. Can I do it ?
2.)
Can I compile the result to my specified directory, not into the dist ?
I want to structure my projects like this:
|
by: mimenko |
last post by:
Hello,
I'd want to show and hide the same icons (pictures) on a web page that contains several icons. Some are identical, some are different (for ex : 3 items "A", 4 items "B", 2 items "C").
Is it possible to make radio buttons or check cases to show all the same items on the page (and to hide them if no action is done on the buttons) ?
(I'd...
|
by: flarefight |
last post by:
I have created an app using python and then converting it to an exe
using py2exe, and have the following code:
"icon_resources":
in my py2exe setup file, the appFavicon works fine and it sets that as
the app icon thats fine, but the program creates data files (like
documents) and i wanted them to have a different icon...
I package my...
|
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. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
| |