[python-win32] win32pipe and buffer size

Frank Guenther xeoicq at netscape.net
Tue Jul 12 18:09:05 CEST 2005



mhammond at skippinet.com.au wrote:

>>if __name__ == '__main__':
>>    child = subprocess.Popen(
>>        ['python', 'echo.py'],
>>    
>>
>
>Try adding "-u" as an option to Python - this will force Python to reopen
>stdout etc as unbuffered (ie, the problem is the client is buffering)
>
>Mark
>  
>

That is exactly the problem, but how can I get the text  which the 
buffering client prints to the screen?

The C++ Code looks like:
       
        printf ("1. Run Static  Tests contained in Sections 5  through 
9.\n");
        printf ("2. Run Dynamic Tests contained in Sections 10 through 
11.\n\n");
        printf ("Enter choice (1 or 2): ");
        scanf  ("%d", &nTestChoice);

If I use the program manually the stdout is displayed on the screen.

A solution would be to change the program, but I don't have the 
possibility to change it.
Is there an other way?

Tschau,
    Frank

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20050712/3589c47d/attachment.htm


More information about the Python-win32 mailing list