title: Exit the python function in case of error, and need to pass the exit value to batch file
body: <pre><code>if ("FATAL_ERROR" == level):
  send_mail()
  sys.exit()
  </code></pre>
  
  <p>Can anyone help with the above Exit function, as we have to pass the exit value to the batch file once it receives <strong>error</strong>?</p>
  
  <p>send mail is the function written in the script, which send the mail to the user when a fatal error occurs...System.error is typing mistake... it's actually sys.exit()...i want whenever "fatal error occurs" it come out and pass the exit value to the batch file...we tried we the sys.exit() but it's not working...pls suggest with some more functions</p>