[wxPython-mac] Re: [Pythonmac-SIG] Wanted: working example of CFBundleTypeRole Shell

Kevin Altis altis@semi-retired.com
Fri, 8 Mar 2002 11:56:49 -0800


> From: Michael J. Barber
>
> >> Couldn't it be set up so that in the Finder case, when you double-click
> >> on a .py file, the Python.app bundle would actually pass the script and
> >> its arguments to the command line interface, then shut down?
> >
> > What about setting up a new file extension for this behaviour?  For
> > example
> > a .pya for python application, or reuse the .pyw from MSW?
> >
> How about .py for opening in the IDE, and .pyc for running it?

The other problem with .pyc and .pywc (compiled version of .pyw) is that
those files will not automatically be created unless a module is imported.
distutils will automatically create compiled (.pyc) and optimized compiled
(.pyo) files during an installation, but when you're developing, you are
unlikely to have them for scripts that never get imported. None of the main
PythonCard sample scripts are compiled, demo.py in the wxPython distribution
is not compiled, etc. There doesn't seem to be much of a speed increase in
using the compiled or optimized compiled files, so I don't think people
worry about them too much.

ka