title: Python return code for os.system() and subprocess.call() command
body: <p>I am running python on windows server.</p>
  
  <p>I want the return code for os.system , so that i can check whether robocopy was successful or not. </p>
  
  <pre><code>a=os.system('robocopy \\\\aucb-net-01\\d$ \\\\nasc01\\rem\\aucb-net-01 /E /MIR')
  </code></pre>
  
  <p>will <code>"a"</code> have any value ? can i print it ? like this  print <code>("a",a)</code></p>
  
  <p>and then I can decide whether the robocopy was successful or not. </p>
  
  <p>Also how can I run above robocopy with  subprocess.call()  command?  And also get the return code.  </p>
  
  <p>thanks everyone for reading my post. </p>