Interact with system command prompt

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

    #1

    Interact with system command prompt

    Hi all. I would like to know if there's some python framework able to
    interact with system command prompt (cmd.exe or /bin/sh, depending on
    the system) from python.
    I need something that supports key/path auto completion by pressing TAB
    button and the possibility to use interactive programs like ftp, gpg or
    even vi.
    I would like to write a remote shell application the best featured as
    possible and I'm wondering if Python is able to emulate the
    functionalities of applications like telnet or ssh.

    Thanks in advance for your helping.

  • Diez B. Roggisch

    #2
    Re: Interact with system command prompt

    billie wrote:
    Hi all. I would like to know if there's some python framework able to
    interact with system command prompt (cmd.exe or /bin/sh, depending on
    the system) from python.
    I need something that supports key/path auto completion by pressing TAB
    button and the possibility to use interactive programs like ftp, gpg or
    even vi.
    I would like to write a remote shell application the best featured as
    possible and I'm wondering if Python is able to emulate the
    functionalities of applications like telnet or ssh.
    Check out IPython.




    Diez

    Comment

    • billie

      #3
      Re: Interact with system command prompt


      Diez B. Roggisch ha scritto:
      billie wrote:
      >
      Hi all. I would like to know if there's some python framework able to
      interact with system command prompt (cmd.exe or /bin/sh, depending on
      the system) from python.
      I need something that supports key/path auto completion by pressing TAB
      button and the possibility to use interactive programs like ftp, gpg or
      even vi.
      I would like to write a remote shell application the best featured as
      possible and I'm wondering if Python is able to emulate the
      functionalities of applications like telnet or ssh.
      >
      Check out IPython.
      >

      >
      >
      Diez
      Thank you. It seems to me a powerful tool. I'll try to play with it.

      Comment

      • billie

        #4
        Re: Interact with system command prompt

        Uhm... It seems that IPython got some problems:


        In details:
        >Note that this does not make IPython a full-fledged system shell. In particular, it has >no job control, so if you type Ctrl-Z (under Unix), you'll suspend pysh itself, not the >process you just started.
        >What the shell profile allows you to do is to use the convenient and powerful syntax of >Python to do quick scripting at the command line.

        Comment

        • Diez B. Roggisch

          #5
          Re: Interact with system command prompt

          billie wrote:
          Uhm... It seems that IPython got some problems:

          >
          In details:
          >
          >>Note that this does not make IPython a full-fledged system shell. In
          >>particular, it has >no job control, so if you type Ctrl-Z (under Unix),
          >>you'll suspend pysh itself, not the >process you just started.
          >
          >>What the shell profile allows you to do is to use the convenient and
          >>powerful syntax of >Python to do quick scripting at the command line.

          Might be. But it could provide some insight into how to solve your problem.

          Diez

          Comment

          • Fernando Perez

            #6
            Re: Interact with system command prompt

            billie wrote:
            Uhm... It seems that IPython got some problems:

            >
            In details:
            >
            >>Note that this does not make IPython a full-fledged system shell. In
            >>particular, it has >no job control, so if you type Ctrl-Z (under Unix),
            >>you'll suspend pysh itself, not the >process you just started.
            >
            >>What the shell profile allows you to do is to use the convenient and
            >>powerful syntax of >Python to do quick scripting at the command line.
            Note that these are simply limitations of what has been done out of
            developer interest, not fundamental ones of design. I'm not in the
            business of writing system shells, so I (nor anyone else) never implemented
            full-fledged job control.

            If you do it and send it in, we'll be happy to include it. And I suspect
            IPython does a LOT of stuff already that you'll spend a fair amount of time
            rewriting from scratch, so perhaps helping in to fill in the missing pieces
            might be a good investment of your time.

            Cheers,

            f (ipython lead developer)

            Comment

            Working...