title: python - How to redirect the errors to /dev/null?
body: <p>I have this fun in my python script:</p>
  
  <pre><code>def start_pushdata_server(Logger):
      Logger.write_event("Starting pushdata Server..", "INFO")
      retcode, stdout, stderr = run_shell(create_shell_command("pushdata-server 
  start"))
  </code></pre>
  
  <p>we want to redirect the standard error from pushdata-server binary to /dev/null.</p>
  
  <p>so we edit it like this:</p>
  
  <pre><code>def start_pushdata_server(Logger):
      Logger.write_event("Starting pushdata Server..", "INFO")
      retcode, stdout, stderr = run_shell(create_shell_command("pushdata-server 
  start 2&gt;/dev/null"))
  </code></pre>
  
  <p>But adding the <code>2&gt;/dev/null</code>  in the python code isn't valid.</p>
  
  <p>So how we can in the python code to send all errors from "pushdata-server 
  start" to null?</p>