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

Chris Barker Chris.Barker@noaa.gov
Fri, 08 Mar 2002 10:11:14 -0800


Kevin Ollivier wrote:
> > > > The finder case (doubleclicking a
> > > > .py file) I'm not so sure anymore that what you want if you double
> > > > click a .py file is running it, a case could be made that you really
> > > > want to open it in the IDE.

Personally, I've always thought this was a fundemental flaw in the MacOS
paradime: the one-to-one file-application association. While it makes
sense for applications with propriatary formats like a MS Word adn the
like, it never has fit well with how I work. More often than not a file
contians data, and I might want to work with that data in any number of
applications. Or, as in this case, the file is a script, so it might be
either edited or run (and could well be editied in more than one
application).

Right now I'm using KDE on Linux, and it works great: you can have a
primary association that will launch and app on clicking, and any number
of secondary associations that you can choose by right clicking. YOu can
, of course, also specify the app when you right click.

Enough ranting. I had hoped OS-X would have come up woth something
better. IN any case, if you have a one-to-one association with a *.py
file, I certainly hope the OS gives you a way to choose that
association. Differnet people are going to want different things.

I do like the idea of the defaults being: *.py--editor of your choice
(maybe defaulting to the IDE), and *.pyc--The interpreter. This fits
well with all other compiled language development: the source code is
edited, the compiled code is run.

I suppose we still  have the question of whether it should bring up a
terminal window or not, but maybe *.pyw would make sense for supressing
that, and being compatable with windows. Another option is to do what I
always do on Linux: if I want a terminal window, I start the script form
a terminal window.

On *nix, by the way, the distiction between a source file and an
executable is whether the executable permission bit is set. If it is,
then typing it on the command line (or clicking on it in a file manager,
depending on the file manager, will run it. Perhaps this could be used
by OS-X as well, though I still think the File manager should provide an
easy way to make the choice each time you click the file.

-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer
                                    		
NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@noaa.gov