Re: [Tutor] Problem with converting Python to EXE using py2exe

2009-04-11 Thread Dave Angel
Dave Angel wrote: In C++, you wouldn't want the full path to the source file, but the full path to the .EXE file. That can be gotten in Windows, by using GetModuleHandle(0), and some other function on that handle. Sorry I don't remember the name of the second function, but I haven't done an

Re: [Tutor] Problem with converting Python to EXE using py2exe

2009-04-11 Thread Dave Angel
Alan Gould wrote: Good idea, I forgot that in Python you can find the full path that way. Too used to working in C/C++ where the file macro only gives the filename... In C++, you wouldn't want the full path to the source file, but the full path to the .EXE file. That can be gotten in Windo

Re: [Tutor] Problem with converting Python to EXE using py2exe

2009-04-11 Thread Alan Gauld
"Dave Angel" wrote To use a relative path base = pic(file=root+"/base.gif") I would get 'root' this way, rather than requiring anything to be set up by the install (registry, environment vars, config): Good idea, I forgot that in Python you can find the full path that way. Too used to w

Re: [Tutor] Problem with converting Python to EXE using py2exe

2009-04-11 Thread Dave Angel
ALAN GAULD wrote: > That's a great idea Mr. Gauld! > But I have no idea how to do that... > can you maybe write a small example for a newb like me?? pretty please with cheese on top?? > > > base = pic(file="base.gif") > > > > > > Now, I'm just wondering... for the "base.gif" part, would

Re: [Tutor] Problem with converting Python to EXE using py2exe

2009-04-11 Thread ALAN GAULD
> That's a great idea Mr. Gauld! > But I have no idea how to do that... > can you maybe write a small example for a newb like me?? pretty please with > cheese on top?? > > > base = pic(file="base.gif") > > > > > > Now, I'm just wondering... for the "base.gif" part, would it be better > > > to

Re: [Tutor] Problem with converting Python to EXE using py2exe

2009-04-10 Thread Alan Gauld
"Chris Lee" wrote _tkinter.TclError: Couldn't open "base.gif": no such file or directory ... I linked an image to the python file, but the exe can't find it.. (right?) Correct > base = pic(file="base.gif") Now, I'm just wondering... for the "base.gif" part, would it be better to write

[Tutor] Problem with converting Python to EXE using py2exe

2009-04-10 Thread Chris Lee
Hi tutors, So I finally made my program. When I run it with python, it works perfectly! But when I convert it to an executable using py2exe (correctly), I get an error: Traceback (most recent call last): File "oentry.py", line 52, in File "Tkinter.pyc", line 3270, in __init__