Andrew Moffat provides several examples of how useful PBS can be, including this one dealing with Exceptions:
Exceptions are dynamically generated based on the return code of the command. This lets you catch a specific return code, or catch all error return codes through the base class ErrorReturnCode:try: print ls("/some/non-existant/folder") except ErrorReturnCode_2: print "folder doesn't exist!" create_the_folder() except ErrorReturnCode: print "unknown error" exit(1)-- Andrew Moffat
Other examples provided by Moffat on his GitHub page include:
- Executing Commands
- Finding Commands
- Commandline Arguments
- Weirdly-names Commands
PBS requires Python 2.5.1 or higher and has been released under the Apache License 2.0.