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 always prints "usage ..." > I added print len(sys.arg) and it prints 1 though I am provinding more > than 1 value
Add import sys print sys.argv at the top of the script before any other import. Maybe one of the modules you're importing messes with sys.argv Daniel -- http://mail.python.org/mailman/listinfo/python-list