a couple IDLE questions
Gordon McMillan
gmcm at hypernet.com
Sat Sep 11 14:09:11 EDT 1999
Magnus L. Hetland wrote:
> Guido van Rossum <guido at cnri.reston.va.us> writes:
>
> > "Mark Hammond" <MHammond at skippinet.com.au> writes:
> [...]
> > > Maybe, but really, is it worth the effort? How many times do you
> > > need to edit Python source that does not live in a .py/.pyw file?
>
> This happens quite a lot for me...
>
> >
> > The design of features like this is all open to suggestion. I don't
> > particularly like the -*- python -*- convention (it's visual
> > pollution in my eyes), but the mechanism that decides could be made
> > configurable, and there could be a manual override.
>
> How about scanning the #!-line? If it seems to be a python executable
> (i.e. the path ends in python) then this is probably a
> python-script... Then you wouldn't need two separate identifying
> mechanisms...
Modules don't usually start with #!. Windows/Mac scripts don't
usually start with #!. Even many of my *nix scripts don't, because
I'm not in the habit of relying on it - having Python in oddball places
(or multiple installations) on some systems cured me of that habit.
- Gordon
More information about the Python-list
mailing list