title: ps -o cmd=<PID> Not Give Same Output From Python
body: <p>From Python:</p>
  
  <pre><code>output = os.popen("ps -o cmd=1").read()
  print output
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>1
  /bin/bash
  python myPython.pyc
  sh -c ps -o cmd=1
  ps -o cmd=1
  </code></pre>
  
  <p>But when I run that command from terminal it returns what I want:</p>
  
  <pre><code>/sbin/init
  </code></pre>
  
  <p>Also, when I run "ls -l" command from python, it returns correct thing.</p>
  
  <hr>
  
  <p>My main purpose is finding name of process from its PID in Python.
  What should I do ?</p>