def _exec(self, command, jobnum, linenum, batchfile):
        """Execute a command in a subshell, die on errors"""
        print('     Starting job: %s\nExecuting command: %s\n' \
              % (jobnum, command))
        rv = os.system(command)
        if (rv):
            print('Problem running job...\n'
                  'File: %s\n'
                  ' Job: %d\n'
                  'Line: %d\n'
                  '...dieing!' % (batchfile, jobnum, linenum))
            sys.exit(rv)
Execute a command in a subshell, die on errors
recipes/Python/496897_Running_Batch_Commands/recipe-496897.py