Emacs question
William Annis
annis at biostat.wisc.edu
Fri Jan 14 08:48:15 EST 2000
From: "Fredrik Lundh" <fredrik at pythonware.com>:
>William Annis wrote:
>> "Fredrik Lundh" <fredrik at pythonware.com> writes:
>>
>> > # -*-python-*-
>> >
>> > or
>> >
>> > # -*- Mode: Python; tab-width: 4 -*-
>>
>> Those all work, but as I recall those work only on the first
>> line of the file. A quick test seems to confirm this.
>
>well, Daryl asked for something to put "at the
>top of the file", so I didn't think I had to point
>that out ;-)
Well, that's certainly true. I suppose I should have
mentioned in passing that I've had trouble with some operating systems
trying to parse this:
#!/usr/bin/env python -- # -*- python -*-
Solaris has no problem with this. Linux bleats bitterly about it,
which was something of a nightmare when we started using Linux last
year. I assumed Daryl wanted to write executable scripts and forgot
to mention the line above is not exactly portable, and thus my
preference for the other trick.
I love it when my mind skips ahead to the punchline. Perhaps
it's time to work on reducing my caffeine intake again... :)
--
wm
More information about the Python-list
mailing list