Python os.EX_USAGE Constant
Example
Exit code if command was used incorrectly:
#Import os Library
import os
# Exit code
os._exit(os.EX_USAGE)
Try it Yourself »
Definition and Usage
The os.EX_USAGE
exits code when the command was used incorrectly, such as the wrong number of arguments, a bad flag, a bad syntax in a parameter, etc.
Note: Available only on UNIX platforms.
Syntax
os.EX_USAGE
Technical Details
Return Value: | None |
---|---|
Python Version: | 2.3 |