Popen4 -> null lines on Windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Patrick L. Nolan

    Popen4 -> null lines on Windows

    We have an application that works on Linux. It has to be ported
    to Windows XP, and there's one bug that's driving me crazy.
    There's a number-crunching program written in C++. It is invoked
    by a Tkinter python script. The script uses the threading
    module to separate out the heavy processing. The worker thread
    uses popen4 to run the C++ program and capture its standard
    output. This output is sent to the master thread through a
    queue and displayed by the gui.

    As I said, it works on Linux. On XP, every call to readline()
    on the program's stdout returns only a zero-length string.
    We are confident that the C++ program doesn't behave that
    way. We have tried both popen2.popen4 and win32pipe.popen 4.

    Does this sound familiar to anyone?

    --
    * Patrick L. Nolan *
    * W. W. Hansen Experimental Physics Laboratory (HEPL) *
    * Stanford University *
  • vincent wehren

    #2
    Re: Popen4 -> null lines on Windows

    "Patrick L. Nolan" <pln@cosmic.sta nford.edu> schrieb im Newsbeitrag
    news:bsqil0$l3i $1@news.Stanfor d.EDU...
    | We have an application that works on Linux. It has to be ported
    | to Windows XP, and there's one bug that's driving me crazy.
    | There's a number-crunching program written in C++. It is invoked
    | by a Tkinter python script. The script uses the threading
    | module to separate out the heavy processing. The worker thread
    | uses popen4 to run the C++ program and capture its standard
    | output. This output is sent to the master thread through a
    | queue and displayed by the gui.
    |
    | As I said, it works on Linux. On XP, every call to readline()
    | on the program's stdout returns only a zero-length string.
    | We are confident that the C++ program doesn't behave that
    | way. We have tried both popen2.popen4 and win32pipe.popen 4.
    |
    | Does this sound familiar to anyone?

    The output doesn't contain any low values by any chance? Does this also
    happen when the "mode" flag is set to "b" for binary?

    Vincent Wehren


    |
    | --
    | * Patrick L. Nolan *
    | * W. W. Hansen Experimental Physics Laboratory (HEPL) *
    | * Stanford University *


    Comment

    • Patrick L. Nolan

      #3
      Re: Popen4 -&gt; null lines on Windows

      vincent wehren <vincent@visual trans.de> wrote:[color=blue]
      > "Patrick L. Nolan" <pln@cosmic.sta nford.edu> schrieb im Newsbeitrag
      > news:bsqil0$l3i $1@news.Stanfor d.EDU...
      > | We have an application that works on Linux. It has to be ported
      > | to Windows XP, and there's one bug that's driving me crazy.
      > | There's a number-crunching program written in C++. It is invoked
      > | by a Tkinter python script. The script uses the threading
      > | module to separate out the heavy processing. The worker thread
      > | uses popen4 to run the C++ program and capture its standard
      > | output. This output is sent to the master thread through a
      > | queue and displayed by the gui.
      > |
      > | As I said, it works on Linux. On XP, every call to readline()
      > | on the program's stdout returns only a zero-length string.
      > | We are confident that the C++ program doesn't behave that
      > | way. We have tried both popen2.popen4 and win32pipe.popen 4.
      > |
      > | Does this sound familiar to anyone?[/color]
      [color=blue]
      > The output doesn't contain any low values by any chance? Does this also
      > happen when the "mode" flag is set to "b" for binary?[/color]

      It works the same with both "b" and "t".
      --
      * Patrick L. Nolan *
      * W. W. Hansen Experimental Physics Laboratory (HEPL) *
      * Stanford University *

      Comment

      Working...