def run_and_exit(command_class):
cmd = command_class(sys.argv[<NUM_LIT:1>:])<EOL>if cmd.error:<EOL><INDENT>print('<STR_LIT>'.format(cmd.error))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>sys.exit(cmd.run())<EOL><DEDENT>
A shortcut for reading from sys.argv and exiting the interpreter