len(sys.argv) in (3,4)
lycka at carmen.se
Fri Aug 12 13:22:18 CEST 2005
Daniel Schüle wrote:
> I just tried the same code at home and it worked fine
> it has to do with windows .. some settings or whatever
> (python 2.4.1 installed on both)
> maybe someone have experienced the same problem
> and had more luck in solving the puzzle
First of all: "Windows" is a whole family of OSes,
and not all members have any blood relations. The
NT family is probably more related to VMS than to
Secondly: There is an association mechanism (I don't
have access to Windows at work, but you can find it
in some Explorer menu) where you define what the OS
does when you try to fire off a file with a certain
extension. That mechanism defines if and how the OS
passes command line arguments.
It might we work better if you run "python x.py y z"
instead of just "x.py y z".
This might give a hint...
More information about the Python-list