Equivalent of system()?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Max

    Equivalent of system()?

    Is there a Python equivalent of C++'s system()?

    TIA
  • Grant Edwards

    #2
    Re: Equivalent of system()?

    On 2008-02-23, Max <maxh.is.here@g mail.comwrote:
    Is there a Python equivalent of C++'s system()?
    The closest thing is probably system().

    It's in the os module.

    --
    Grant

    Comment

    • Jeff Schwab

      #3
      Re: Equivalent of system()?

      Max wrote:
      Is there a Python equivalent of C++'s system()?
      More or less. You probably want subprocess.Pope n:
      >>import subprocess
      >>subprocess.Po pen("echo hello", shell=True)
      hello
      <subprocess.Pop en object at 0x2ab8f3665d10>


      Comment

      • Max

        #4
        Re: Equivalent of system()?

        Thanks for the help!

        Comment

        • subeen

          #5
          Re: Equivalent of system()?

          This link may help: http://love-python.blogspot.com/2008...in-python.html

          On Feb 23, 10:44 am, Max <maxh.is.h...@g mail.comwrote:
          Is there a Python equivalent of C++'s system()?
          >
          TIA

          Comment

          Working...