First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
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]
2 | No.2 Revision |
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]