P
Peng Yu
I have the following python code snippet. I'm wondering what command I
should use to terminate the program if the arguments are not right.
#!/usr/bin/env python
import sys
import os
if len(sys.argv) <= 1:
print "usage:", os.path.basename(sys.argv[0]), '<something>'
return ## what command should be used here to terminate the program?
should use to terminate the program if the arguments are not right.
#!/usr/bin/env python
import sys
import os
if len(sys.argv) <= 1:
print "usage:", os.path.basename(sys.argv[0]), '<something>'
return ## what command should be used here to terminate the program?