['']
Traceback (most recent call last):
File "/home/kawashima/nim/test.py", line 23, in <module>
in_x = float(sys.argv[1]) # Python ERROR
IndexError: list index out of range
Using argparse also cause the same error.
This issue does not occur with the following code. But our system using argparse, so we can't use this solution.
from sys import argv #this line is changed
from sample import convertAxis
print(argv) #['test2.py', '1', '2'] it's OK
in_x = float(argv[1])
in_y = float(argv[2])
out_x, out_y = convertAxis(in_x, in_y)
print (out_x == in_x * 2) #True
print (out_y == in_y * 2) #True
Thank you for providing such a wonderful library.
In some conditions, python command line argutments dissapeare. Is this bug or intended behaviour?
sample.nim
test.py
execute
result
Using
argparse
also cause the same error.This issue does not occur with the following code. But our system using
argparse
, so we can't use this solution.my env
reference
164
294