[Pythonmac-SIG] Double CLickable

Jack Jansen jack@oratrix.nl
Fri, 19 Jan 2001 10:00:54 +0100


> >I noticed that the demos execute upon double clicking.  How do I
> >make my source file (BBEdit) so that it will execute in this way.
> 
> One way is to go into the File Exchange control panel and associate 
> .py, .pyc, and .pyo extensions with Python.

I'm not sure that this will help a lot (unless newer version of BBEdit look in 
the File Exchange panel, my trusty old BBEdit Lite 4.1 doesn't). In 4.1 I have 
to go to the BBEdit preferences, File Types, and there add a PythonInterpreter 
file type.

> This brings to mind a minor gripe that I've developed in the course 
> of several months of working in Python on NT- I've set things up so 
> that .py is an executable and a script will run when double-clicked, 
> but if I right-click instead, I have the option to edit it instead, 
> either in PythonWin by default or in vim or visual studio as other 
> choices. I find that I miss this choice when working on the Mac and 
> am forever launching scripts that I really intended to edit. Does 
> anyone happen to know of a Mac contextual menu module that emulates 
> this behavior?

I looked into this when CM first came out and decided that it was doable, but 
never got around to actually doing it. If someone can provide the method to do 
this I'll gladly put it in the installer. The same, by the way, goes for 
adding the .py extension to the File Exchange (and the Internet Config) 
control panels.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm