CLI

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

    #1

    CLI

    I want to do programmatic terminal commands on unix with python - i.e.
    I want my program to issue commands to start and stop scripts, other
    programs, etc. I'm sure this must be fairly straightforward , but
    haven't been able to find a reference for it. Any help?

  • Sybren Stuvel

    #2
    Re: CLI

    mwt enlightened us with:[color=blue]
    > I want to do programmatic terminal commands on unix with python[/color]

    If you want to use a real terminal, search for pty. If you just want
    to start and stop scripts, check the popen2 module.


    Sybren
    --
    The problem with the world is stupidity. Not saying there should be a
    capital punishment for stupidity, but why don't we just take the
    safety labels off of everything and let the problem solve itself?
    Frank Zappa

    Comment

    • Rene Pijlman

      #3
      Re: CLI

      mwt:[color=blue]
      >I want to do programmatic terminal commands on unix with python - i.e.
      >I want my program to issue commands to start and stop scripts, other
      >programs, etc. I'm sure this must be fairly straightforward , but
      >haven't been able to find a reference for it. Any help?[/color]



      --
      René Pijlman

      Comment

      • Carl Cerecke

        #4
        Re: CLI

        mwt wrote:[color=blue]
        > I want to do programmatic terminal commands on unix with python - i.e.
        > I want my program to issue commands to start and stop scripts, other
        > programs, etc. I'm sure this must be fairly straightforward , but
        > haven't been able to find a reference for it. Any help?
        >[/color]

        Try:

        pexpect.sourcef orge.net

        Cheers,
        Carl.

        Comment

        Working...