RE: py2exe question

From: Jimmy Retzlaff (jimmy_at_retzlaff.com)
Date: 11/01/03


Date: Sat, 1 Nov 2003 09:35:01 -0800
To: <python-list@python.org>

Alex Martelli wrote:
> achrist@easystreet.com wrote:
> > Alex Martelli wrote:
> >> achrist@easystreet.com wrote:
> >>
> >> > The py2exe says that a console app should have the --console
option
> >> > and a windows app should have the --windows option.
> >> >
> >> > What is the way to py2exe a python program that uses both console
and
> >> > windows gui?
> >> > Haven't tried, but logically it should be a console -- this
doesn't
> >> > restrict
> >> what OTHER modules you can import, it just uses the equivalent of a
.py
> >> script run with python.exe rather than a .pyw run with pythonw.exe,
> i.e.
> >> a "DOS box" console does appear when the program is run.
> >
> > Logically, you don't need these switches. Outside of py2exe a *.py
> > gets a console and can open gui windows, a *.pyw is a pure gui
> > program. Why the switches atall? IDK? Thought I'd ask.
>
> The switches let you control what goes on explicitly, just as
> you can control it explicitly by choosing one or the other of
> the two interpreters (python.exe or pythonw.exe) at a command
> prompt. I don't know what you mean by the 'idk' question.

I think Al's point may be that if you run py2exe on a .pyw script it
should automatically use the pythonw.exe stub and if you run it on a .py
script it should use the python.exe stub. I wouldn't care for that
behavior unless I could override it with the switches. I always use a
.py extension when developing my GUI apps so I can see console output
which is very handy for debugging output and seeing any unhandled
exceptions. When I deploy my GUI app, I don't want the user bothered by
a console so I explicitly ask for a windows only app.

> > I'm having a little trouble getting a py2exe executable to run on
> > a machine wo python installed. Just wondered if this has anything
to
> > do with it.
>
> I don't see the connection.

As mentioned earlier (was it another thread?), temporarily letting
py2exe display a console can aid in debugging py2exe specific problems
by letting you see unhandled exceptions and other output. Once things
are working then turn the console off again. I do have vague memories of
hearing about people having problems with some buffers filling up if
there is no console and there is a significant amount of console output.
Temporarily turning on the console would let you know if you have tons
of console output that might expose such a problem. I don't, however,
see how this kind of thing would differ between machines with and
without Python installed.

Jimmy



Relevant Pages

  • Re: UAV Crash in Arizona (Long)
    ... along the Arizona border as part of border patrols and a third will be ... The crash resulted from loss of control after the ground computer- ... The control for the throttle on one console is identical to ... The Predator then descended below the minimum altitude for the C-band ...
    (rec.aviation.soaring)
  • Re: Keyboard and Mouse sucks [was Re: Why Xbox 360 or any console instead of PC?]
    ... Mouse and keyboard control sucks ass for gaming. ... involves aiming and actually moving the gun), I prefer the modern game ... penalty (in the case of console games such as Unreal Tournament III ...
    (alt.games.video.xbox)
  • Re: VESA BIOS
    ... about as badly as your Linux mouse code. ... switches to a user-specified graphical video mode when the browser ... and then switches back when the browser exits. ... Switching from a console running Links to another console, including X, works fine. ...
    (alt.lang.asm)
  • Re: Virtual Mixing Console
    ... you would actually try mixing a live show on screen with a mouse is ... Why use a TT24 just for a control surface? ... the same effect by putting up a stereo pair of mics in front of the ... I thought you were a digital console ...
    (rec.audio.pro)
  • Re: Virtual Mixing Console
    ... you would actually try mixing a live show on screen with a mouse is ... Why use a TT24 just for a control surface? ... the same effect by putting up a stereo pair of mics in front of the ... I thought you were a digital console ...
    (rec.audio.pro)