Python+Expect+Win32 = Not Possible?

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

    Python+Expect+Win32 = Not Possible?

    Hi,

    Is it still the case there is no practical Expect-like module for
    win32? I know that cygwin can support pexpect, but that isn't an
    option here --- I have to use a native win32 Python version.

    Are there alternatives, or is it simply not an option to replicate
    Expect on win32 with python?

    All I'm trying to do is start a couple processes, wait for each to say
    "done" on stdout and then quit (or timeout if something went wrong).

    TIA,
    -T

  • half.italian@gmail.com

    #2
    Re: Python+Expect+W in32 = Not Possible?

    On Sep 12, 9:27 pm, gamename <namesagame-use...@yahoo.co mwrote:
    Hi,
    >
    Is it still the case there is no practical Expect-like module for
    win32? I know that cygwin can support pexpect, but that isn't an
    option here --- I have to use a native win32 Python version.
    >
    Are there alternatives, or is it simply not an option to replicate
    Expect on win32 with python?
    >
    All I'm trying to do is start a couple processes, wait for each to say
    "done" on stdout and then quit (or timeout if something went wrong).
    >
    TIA,
    -T
    I had planned on using telnet to do the same thing on windows. I
    don't think I ever proved it, but I'm pretty sure it will work.



    ~Sean

    Comment

    • gamename

      #3
      Re: Python+Expect+W in32 = Not Possible?

      On Sep 13, 1:42 am, half.ital...@gm ail.com wrote:
      On Sep 12, 9:27 pm, gamename <namesagame-use...@yahoo.co mwrote:
      >
      Hi,
      >
      Is it still the case there is no practical Expect-like module for
      win32? I know that cygwin can support pexpect, but that isn't an
      option here --- I have to use a native win32 Python version.
      >
      Are there alternatives, or is it simply not an option to replicate
      Expect on win32 with python?
      >
      All I'm trying to do is start a couple processes, wait for each to say
      "done" on stdout and then quit (or timeout if something went wrong).
      >
      TIA,
      -T
      >
      I had planned on using telnet to do the same thing on windows. I
      don't think I ever proved it, but I'm pretty sure it will work.
      Thanks, Sean. The problem is that telnet is generally disabled on
      most hosts nowadays.

      Comment

      • Philem

        #4
        Re: Python+Expect+W in32 = Not Possible?

        On Sep 13, 12:27 am, gamename <namesagame-use...@yahoo.co mwrote:
        Hi,
        >
        Is it still the case there is no practical Expect-like module for
        win32? I know that cygwin can support pexpect, but that isn't an
        option here --- I have to use a native win32 Python version.
        >
        Are there alternatives, or is it simply not an option to replicate
        Expect on win32 with python?
        >
        All I'm trying to do is start a couple processes, wait for each to say
        "done" on stdout and then quit (or timeout if something went wrong).
        >
        TIA,
        -T
        You could try this link: http://www.activestate.com/Products/.../features.plex
        and see if that gives you what you need.

        Luck!
        -J

        Comment

        • Tim Golden

          #5
          Re: Python+Expect+W in32 = Not Possible?

          gamename wrote:
          On Sep 13, 1:42 am, half.ital...@gm ail.com wrote:
          >On Sep 12, 9:27 pm, gamename <namesagame-use...@yahoo.co mwrote:
          >>
          >>Hi,
          >>Is it still the case there is no practical Expect-like module for
          >>win32? I know that cygwin can support pexpect, but that isn't an
          >>option here --- I have to use a native win32 Python version.
          >>Are there alternatives, or is it simply not an option to replicate
          >>Expect on win32 with python?
          >>All I'm trying to do is start a couple processes, wait for each to say
          >>"done" on stdout and then quit (or timeout if something went wrong).
          >>TIA,
          >>-T
          >I had planned on using telnet to do the same thing on windows. I
          >don't think I ever proved it, but I'm pretty sure it will work.
          >
          Thanks, Sean. The problem is that telnet is generally disabled on
          most hosts nowadays.
          I'm not sure whether the need you describe above "start a
          couple [of] processes, wait for each to say 'done' and
          then quit (or timeout...)" is *all* of your requirements
          or just an example. And are these processes running on
          remote machines? Or just locally?

          Depending on those things, maybe there are other ways
          to do what you want under Windows?

          (I've checked back through the archives and I can't find
          any earlier posts describing the requirement more clearly).

          TJG

          Comment

          • gamename

            #6
            Re: Python+Expect+W in32 = Not Possible?

            On Sep 13, 4:18 am, Tim Golden <m...@timgolden .me.ukwrote:
            gamename wrote:
            On Sep 13, 1:42 am, half.ital...@gm ail.com wrote:
            On Sep 12, 9:27 pm, gamename <namesagame-use...@yahoo.co mwrote:
            >
            >Hi,
            >Is it still the case there is no practical Expect-like module for
            >win32? I know that cygwin can support pexpect, but that isn't an
            >option here --- I have to use a native win32 Python version.
            >Are there alternatives, or is it simply not an option to replicate
            >Expect on win32 with python?
            >All I'm trying to do is start a couple processes, wait for each to say
            >"done" on stdout and then quit (or timeout if something went wrong).
            >TIA,
            >-T
            I had planned on using telnet to do the same thing on windows. I
            don't think I ever proved it, but I'm pretty sure it will work.
            >
            Thanks, Sean. The problem is that telnet is generally disabled on
            most hosts nowadays.
            >
            I'm not sure whether the need you describe above "start a
            couple [of] processes, wait for each to say 'done' and
            then quit (or timeout...)" is *all* of your requirements
            or just an example. And are these processes running on
            remote machines? Or just locally?
            >
            Good question. That's part of the requirements. The rest are: The
            processes need to be async (i.e. the script doesn't stop while waiting
            for the process to complete). They also need some kind of timeout
            mechanism so that the processes don't run forever. All processes are
            local.
            Depending on those things, maybe there are other ways
            to do what you want under Windows?
            >
            (I've checked back through the archives and I can't find
            any earlier posts describing the requirement more clearly).
            >
            TJG

            Comment

            • gamename

              #7
              Re: Python+Expect+W in32 = Not Possible?

              On Sep 13, 4:51 am, Philem <jimrtho...@gma il.comwrote:
              On Sep 13, 12:27 am, gamename <namesagame-use...@yahoo.co mwrote:
              >
              Hi,
              >
              Is it still the case there is no practical Expect-like module for
              win32? I know that cygwin can support pexpect, but that isn't an
              option here --- I have to use a native win32 Python version.
              >
              Are there alternatives, or is it simply not an option to replicate
              Expect on win32 with python?
              >
              All I'm trying to do is start a couple processes, wait for each to say
              "done" on stdout and then quit (or timeout if something went wrong).
              >
              TIA,
              -T
              >
              You could try this link:http://www.activestate.com/Products/.../features.plex
              and see if that gives you what you need.
              It absolutely gives me what I need. But the requirement is to use
              Python specifically. :) Tcl is a great language, but not an option in
              this case.
              >
              Luck!
              -J

              Comment

              • Cameron Laird

                #8
                Re: Python+Expect+W in32 = Not Possible?

                In article <1189681397.349 994.126130@57g2 000hsv.googlegr oups.com>,
                gamename <namesagame-usenet@yahoo.co mwrote:
                >On Sep 13, 1:42 am, half.ital...@gm ail.com wrote:
                >On Sep 12, 9:27 pm, gamename <namesagame-use...@yahoo.co mwrote:
                >>
                Hi,
                >>
                Is it still the case there is no practical Expect-like module for
                win32? I know that cygwin can support pexpect, but that isn't an
                option here --- I have to use a native win32 Python version.
                >>
                Are there alternatives, or is it simply not an option to replicate
                Expect on win32 with python?
                >>
                All I'm trying to do is start a couple processes, wait for each to say
                "done" on stdout and then quit (or timeout if something went wrong).
                >>
                TIA,
                -T
                >>
                >I had planned on using telnet to do the same thing on windows. I
                >don't think I ever proved it, but I'm pretty sure it will work.
                >
                >Thanks, Sean. The problem is that telnet is generally disabled on
                >most hosts nowadays.

                Comment

                Working...