Mailing List Archive

Weird commandline behaviour with SunOS 5.5.1
Dear Python community!

On a SunOS 5.5.1 virtual machine I observed, that commandline
parameters to scripts seem to get mixed up or misinterpreted:

Entering "python script.py -r" at the shell prompt does call
python correctly but the interpreter will barf because there
is no valid option named "-r" for Python itself. Python will
then stop with a helpful message about allowed options to the
invocation of the our beloved interpreter. According to the
documentation, this should have never happened since options
after the scriptname should be given to the script instead of
the interpreter.

Changing the invocatione to "python script.py %r" (e.g.) does
help, but I'm a little reluctant to use kludges like changing
the option indicator from something widely used to a nonstan-
dard character.

This interpreter was compiled using "configure" without any
additional options except a special path for installation.

I observed this originally with Python 1.4 but the problem is
still there in 1.52. I originally attributed it to stupidity
on my part, but now I'm unsure whom to blame. Is this a shell
misbehaving or misconfigured or is it a pythonic problem?

Thanks in advance for pointers to documentation I missed or
for any helpful hints.

Best regards,

Jo.