py2exe setup script problem

P

Philipp Kruse

I am trying to create an executable version of a python script using
py2exe 0.5 (Python 2.3.4c1). The basic script looks something like this:

setup(
[...]
windows = [ 'src/__main__.py',
{ 'script': 'src/__main__.py',
'icon_resources': [(1, "data/small.ico")]}
],
)


After running py2exe I try to execute the created .exe file and -
nothing happens.


However, I tried changing the script to this:

setup(
[...]
console = ['src/__main__.py'],
)


Suddenly everything works fine. Even so, I simply need to get rid of
that console window.

I tried reading through the wiki and searched this group but found
nothing that could solve the problem.

Does anyone have an idea?


Philipp
 
L

Larry Bates

What do you expect to happen? If program creates
output, you need a console window to display it
(unless you use GUI interface). Without console
output has no where to go. I actually use this
to my advantage on some lights-out applications
that write all their output to log files.

Larry Bates
Syscon, Inc.
 
P

Philipp Kruse

From: Larry Bates
Date: 24.05.2004 17:37
------------------------------------------------------------

What do you expect to happen? If program creates
output, you need a console window to display it
(unless you use GUI interface). Without console
output has no where to go. I actually use this
to my advantage on some lights-out applications
that write all their output to log files.

I _do_ use a GUI interface. Let me be more precise as I obviously failed
to clear up some things.

If I use the console = [] attribute, the console window is created and
the GUI is started as intended, just as when I execute the .py-File.

However, using windows = [], doesn't show any signs of a running
programm other than the process running in the task-list which I have to
shut down manually.


HTH
Philipp
 
T

Thomas Heller

What do you expect to happen? If program creates
output, you need a console window to display it
(unless you use GUI interface). Without console
output has no where to go. I actually use this
to my advantage on some lights-out applications
that write all their output to log files.

I _do_ use a GUI interface. Let me be more precise as I obviously
failed to clear up some things.

If I use the console = [] attribute, the console window is created and
the GUI is started as intended, just as when I execute the .py-File.

However, using windows = [], doesn't show any signs of a running
programm other than the process running in the task-list which I have
to shut down manually.

There's a bug when using windows=[] which may be triggered when you
don't have an
import sys
in your main script. Reading the py2exe/boot_common.py file might give
you a hint. If you can, please get the py2exe CVS version and try with
this.

Thomas
 
P

Philipp Kruse

From: Thomas Heller
Date: 25.05.2004 21:19
------------------------------------------------------------
There's a bug when using windows=[] which may be triggered when you
don't have an
import sys
in your main script. Reading the py2exe/boot_common.py file might give
you a hint. If you can, please get the py2exe CVS version and try with
this.

Got the CVS version, installed it and everything works smoothly now,
thanks a lot.



Philipp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top