<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Julian and Thomas,<br>
    <br>
    Thanks for the comments!<br>
    Cheers,<br>
    Zolt&aacute;n<br>
    <br>
    On 02/06/2012 08:22 PM, Thomas Kluyver wrote:
    <blockquote
cite="mid:CAOvn4qjutVQB+0VprPQLckqJx2Y2SivTpEOTP1YGsiYMjmuFiQ@mail.gmail.com"
      type="cite">
      <meta http-equiv="Context-Type" content="text/html;
        charset=ISO-8859-1">
      <div>On 6 February 2012 19:15, Julian Taylor <span>&lt;<a
            moz-do-not-send="true"
            href="mailto:jtaylor.debian@googlemail.com">jtaylor.debian@googlemail.com</a>&gt;</span>
        wrote:<br>
        <blockquote>
          <div>use the subprocess module instead of os.system:<br>
            <br>
            import subprocess<br>
            print subprocess.check_output(["./test"])<br>
          </div>
        </blockquote>
      </div>
      <br>
      To explain some more about the difference: when you do os.system,
      it's not capturing stdout/stderr from the new process. In the
      terminal, this works, because stdout and stderr just go directly
      to the terminal, without Python ever knowing about them. In the
      notebook, it doesn't, because the kernel can only forward
      stdout/stderr that it knows about.<br>
      <br>
      subprocess.check_output() captures stdout and returns it. If you
      need to capture stderr as well, refer to the docs: <a
        moz-do-not-send="true"
        href="http://docs.python.org/library/subprocess#subprocess.check_output">http://docs.python.org/library/subprocess#subprocess.check_output</a><br>
      <br>
      Thomas<br>
      <br>
    </blockquote>
  </body>
</html>