我在python 2.7上试过这个
import sys
a = int (sys.argv [1])
b = int (sys.argv [2])
c = a + b
结果如下:
Traceback (most recent call last):
File "C:\gispy\Sample_scripts\ch02\add_version2.py", line 8, in <module>
a = int (sys.argv [1])
IndexError: list index out of range