Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is because the list sys.argv contains only one element, that is your python script name, 'E:\007\21.py'.

Since python index starts from 0, the list element sys.argv[1] is actually the second element of the list sys.arg.

so you should use the following:

case_root = os.path.splitext(sys.argv[0])[0]

This is because the list sys.argv contains only one element, that is your python script name, 'E:\007\21.py'.

Since python index starts from 0, the list element sys.argv[1] is actually the second element of the list sys.arg.

so you should use the following:

case_root = os.path.splitext(sys.argv[0])[0]

oh, in that case you should use:

case_root = os.path.splitext(CASE)[0]