Processes/pipes cross platform issue - popen*() hangs using "rsh/rlogin" (not working in Windows vs.

Discussion in 'Python' started by David H, Dec 3, 2004.

  1. David H

    David H Guest

    Background.

    I'm running on WinXP w/ MS Services for Unix installed (to give
    rsh/rlogin ability), both Python 2.3 and 2.4 version. In linux, I'm
    running RHEE with python2.3 version. The code below works fine for me
    in linux, but in WinXP the popen*() command "hangs". More
    specifically, I get an apparent python prompt (without the '>>> ', but
    whatever I type has no effect, and hitting return does a CR but not
    the additional LF, so I just type over what I had just typed). The
    only way I can exit is with CTRL-BREAK, and rerun python. I've tried
    the various flavors of popen[2|3|4], and the subprocess module in
    python2.4, all with the same "bug".

    Also, rsh/rlogin from windows DOS prompt work just fine.



    Can anyone clue me in as to how to make this work in windows, or an
    equivalent solution?

    The gist of what I'm doing is this
    -------------
    import os
    p = os.popen3("rsh LINUX_MACHINE.com -l USER")
    p[0].writelines(["touch rsh_as_USER.txt\n",])
    p[0].close()

    In linux, the target machine will then have the .txt file touch'ed.

    Thanks.
    -Dave
     
    David H, Dec 3, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Black
    Replies:
    2
    Views:
    451
    Steve Christensen
    Sep 9, 2004
  2. Kevin Walzer

    Question about pipes/os.popen

    Kevin Walzer, Sep 15, 2006, in forum: Python
    Replies:
    4
    Views:
    1,457
    Donn Cave
    Sep 15, 2006
  3. Alex
    Replies:
    0
    Views:
    383
  4. Philipp Pagel

    os.popen and broken pipes

    Philipp Pagel, Feb 9, 2007, in forum: Python
    Replies:
    5
    Views:
    1,676
    Donn Cave
    Feb 9, 2007
  5. Corey_G

    pipes from forked processes

    Corey_G, Jul 6, 2004, in forum: Perl Misc
    Replies:
    2
    Views:
    110
    Corey_G
    Jul 6, 2004
Loading...

Share This Page