[Tutor] Pythonpath

Magnus Lycka magnus@thinkware.se
Wed Dec 11 14:20:06 2002


At 11:51 2002-12-11 -03-30, Adam Vardy wrote:
>Wednesday, December 11, 2002, 11:27:29 AM, you wrote:
>
> >> At 11:03 2002-12-11 -03-30, Adam Vardy wrote:
> >>How do I set a Pythonpath?
>
> >> What OS? (Don't say Windows, that's several OS's)
>
>Windows XP Pro.

Hm...I'll have to look at my wife's computer.

Control Panel => System => Advanced [Tab] => Environment
Variables [Button near bottom]
(if I'm back-translating names correctly from Swedish.)

The setting will only affect processes started after you
have applied that change.

> >>And does Python have command line options?
>
>H:\python>>python -h
>
>Yeah, I tried 'python /?', but just gave an error.

Well, in most operating systems where Python works, /?
means "all files in the root directory with a file name
that is one character long".

Fortunately, Python follows standards, not DOS absurdities.
It works on almost every OS under the sun as you might know.
(Is Python still available on more platforms than Java?)

The really stupid design decision in DOS wasn't to use
"/" for command switches though, but to use the character
that C etc used for escape sequences "\". I guess the reason
they did that was because "/" was used for the switches, but
surely they could have found a way to use ":" as separator
(which is what some other OS's that don't use / do).

Microsoft is trying to back out of this now, and allow /
as well as \ as directory separator in paths, but they
have these absurd situations where you have to use / in
some situations \ on others and \\ in some. There are
even situations where you might need to use both \ and / in
different parts of the same path to make things work. :(
This is a non-problem in all non-Microsoft OS's as far as
I know. It belongs to the same mistakes as 8.3 filenames
and file allocation tables.


-- 
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se