Re: len(sys.argv) in (3,4)

2005-08-12 Thread Tim Roberts
Daniel Schüle <[EMAIL PROTECTED]> 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 It's an installati

Re: len(sys.argv) in (3,4)

2005-08-12 Thread infidel
It might make more sense if you could find out exactly what that one argument contains. -- http://mail.python.org/mailman/listinfo/python-list

Re: len(sys.argv) in (3,4)

2005-08-12 Thread infidel
> Nope. But since you're running this on a very peculiar OS, I just can > guess that this very peculiar OS consider all args to be one same string... It depends on what you're coding with. If you're writing a Win32 program in C/C++ (and by extension, Visual Basic), the WinMain() function passes a

Re: len(sys.argv) in (3,4)

2005-08-12 Thread Magnus Lycka
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

Re: len(sys.argv) in (3,4)

2005-08-11 Thread Bruno Desthuilliers
John Machin a écrit : > bruno modulix wrote: > (snip) >> >> Nope. But since you're running this on a very peculiar OS, I just can >> guess that this very peculiar OS consider all args to be one same >> string... > > > NOT SO: Your cap key got stuck ? (snip) > For *any* OS: More than one CLI

Re: len(sys.argv) in (3,4)

2005-08-11 Thread John Machin
bruno modulix wrote: > Daniel Schüle wrote: > >>Hello >> >>I wrote a simple module, which is also supposed to be used as standalone >>program >>after considering how to avoid multiple if's I came up with this idea >> >>if __name__ == "__main__": >>if len(sys.argv) not in (3,4): >>prin

Re: len(sys.argv) in (3,4)

2005-08-11 Thread Daniel Schüle
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 -- http://mail.python.org/mailman/listinfo/python-list

Re: len(sys.argv) in (3,4)

2005-08-11 Thread Daniel Dittmar
Daniel Schüle wrote: > if __name__ == "__main__": > if len(sys.argv) not in (3,4): > print "usage: prog arg1 argv2 [-x]" > # etc ... > > while develeoping I had my interpeter running and reloaded module > now since I am ready, I wanted to run it from cmd windows shell > but it alwa

Re: len(sys.argv) in (3,4)

2005-08-11 Thread bruno modulix
Daniel Schüle wrote: > Hello > > I wrote a simple module, which is also supposed to be used as standalone > program > after considering how to avoid multiple if's I came up with this idea > > if __name__ == "__main__": > if len(sys.argv) not in (3,4): > print "usage: prog arg1 argv2

len(sys.argv) in (3,4)

2005-08-11 Thread Daniel Schüle
Hello I wrote a simple module, which is also supposed to be used as standalone program after considering how to avoid multiple if's I came up with this idea if __name__ == "__main__": if len(sys.argv) not in (3,4): print "usage: prog arg1 argv2 [-x]" # etc ... while develeoping