[Pythonmac-SIG] Fwd: [wxPython-mac] downside to just always using pythonw?

Jack Jansen Jack.Jansen@oratrix.com
Sun, 2 Feb 2003 23:32:29 +0100


I'm forwarding this message that Kevin Altis sent to the wxPython 
mailing list earlier today, and I'd like to get feedback on it.

On first thought I think I agree with it (the gist is: "make 
PythonLauncher always use pythonw, so the only difference between its 
treatment of .py and .pyw files is that the former get a console 
window"). There are some drawbacks (if you are developing a script that 
will eventually run in a windowless environment you will not notice it 
if your script calls to the window manager), but I think the advantage 
of more comprehensible behavior for novices outweighs that. Note that 
this would only mean that the default app for .py scripts would change, 
you'll always be able to change it back.

Begin forwarded message:

> From: "Kevin Altis" <altis@semi-retired.com>
> Date: zon feb 2, 2003  00:00:53 Europe/Amsterdam
> To: "Wxpython-Mac" <wxpython-mac@lists.wxwindows.org>
> Subject: [wxPython-mac] downside to just always using pythonw?
> Reply-To: wxPython-mac@lists.wxwindows.org
>
> I know that via the PythonLauncher we can automatically have scripts 
> with a
> .pyw extension run with pythonw. However, most scripts brought over 
> from
> Linux and Windows designed to run with wxPython are unlikely to have 
> the
> .pyw extension set. Normally, the .pyw extension is only useful under
> Windows when you want to suppress the console window being displayed 
> such as
> when you run a script from the Explorer by double-clicking the file.
>
> So, either you train Mac OS X Python users to rename GUI scripts to 
> .pyw,
> provide some utility to do the conversion, or setup PythonLauncher to 
> run
> .py scripts by default with pythonw. The latter seems the simplest. 
> The vast
> majority of the scripts I'll be running are GUI scripts and I also 
> need to
> work on files out of cvs where it is not practical to rename the files 
> to
> .pyw. I can always manually choose to use python instead of pythonw in 
> the
> Terminal or hold down the Option/Alt key to bring up PythonLauncher if 
> I
> specifically need to use /usr/local/bin/python.
>
> The question then becomes what are the downsides and likely errors that
> would occur by just always using /usr/local/bin/pythonw instead of
> /usr/local/bin/python? Is it simply a matter of using more memory and 
> slower
> script startup because extra libs are loaded? I think we might want to 
> make
> pythonw the default for even .py scripts if those are the only issues, 
> the
> user can always change the Preference back to python.
>
> If someone could spell out the differences and/or suggest alternative
> approaches to using pythonw and .pyw scripts that would be welcome. 
> Right
> now I forsee endless messages on the mailing lists and c.l.py from 
> confused
> users when scripts don't run or run, but don't work correctly because 
> parts
> of the framework are unavailable.
>
> ka
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-mac-unsubscribe@lists.wxwindows.org
> For additional commands, e-mail: wxPython-mac-help@lists.wxwindows.org
>
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -