cygnusnow / ulipad

Automatically exported from code.google.com/p/ulipad
0 stars 0 forks source link

length of sys.argv #246

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. we have the following code in .py
   if len(sys.argv)>1:
        solver = Solver(resultsDir = sys.argv[1])
    else:
        solver = Solver()
2. use F5 to run the file in ulipad
3. it will assume sys.argv, hence we got resultsDir=

What is the expected output? What do you see instead?
it should go to Solver() branch and use a default resultsDir. I can go to
terminal windows and do python a.py, then it follows the else branch.

What version of the product are you using? On what operating system?
ubuntu

Please provide any additional information below.

Original issue reported on code.google.com by ycw...@gmail.com on 19 May 2010 at 3:01

GoogleCodeExporter commented 9 years ago
So how do you input after "python a.py", and print the sys.argv to see what's 
it?

Original comment by limo...@gmail.com on 19 May 2010 at 3:09