Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Help wanted in piping in Windows

Reply
Thread Tools

Help wanted in piping in Windows

 
 
Apple Grew
Guest
Posts: n/a
 
      06-23-2005
I want to develope a Winboard like application which will support
Winboard protocol. For that I require to know how to handle piping in
Python. I seperated out module popen2, but when I use
fileObject.readline() then it halts the program if the sub-process is
waiting for user input; will executing the readline() part in a seperate
thread be helpful? My target platform is Windows.

Links to helpful web resources and sample Python codes will be highly
appreciated.

Regards,
Apple
 
Reply With Quote
 
 
 
 
Thomas Guettler
Guest
Posts: n/a
 
      06-24-2005
Am Fri, 24 Jun 2005 01:28:38 +0530 schrieb Apple Grew:

> I want to develope a Winboard like application which will support
> Winboard protocol. For that I require to know how to handle piping in
> Python. I seperated out module popen2, but when I use
> fileObject.readline() then it halts the program if the sub-process is
> waiting for user input; will executing the readline() part in a seperate
> thread be helpful? My target platform is Windows.
>
> Links to helpful web resources and sample Python codes will be highly
> appreciated.


Piping on Windows is not much different than on Unix. You
should only have *one* open file descriptor. If the subprocess
needs to read from stdin, then stdout and stderr should be
redirected to a file. Otherwise you can get deadlocks, because
the buffers have a finit size.

AFAIK ">file" and "2>file" does work on windows.

On Unix you can the module "select".

HTH,
Thomas

--
Thomas Güttler, http://www.thomas-guettler.de/


 
Reply With Quote
 
 
 
 
Peter Hansen
Guest
Posts: n/a
 
      06-24-2005
Thomas Guettler wrote:
> AFAIK ">file" and "2>file" does work on windows.


Not, unfortunately (at least in the past), on Windows 98.

That might no longer matter, however. How many people are still stuck
using Windows 98? Given that in one year you won't even be able to get
support from Microsoft's update site (such as if you have to reinstall),
isn't it time to move on?

to Linux...

-Peter
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with a piping error virdo Python 4 06-10-2011 10:34 PM
HELP WANTED HELP WANTED HELP WANTED Harvey ASP .Net 1 07-16-2004 01:12 PM
HELP WANTED HELP WANTED HELP WANTED Harvey ASP .Net 0 07-16-2004 10:00 AM
Piping to windows command line .rb file doesn't work Mills Thomas (app1tam) Ruby 1 10-15-2003 01:02 AM
Piping data into Python on the command line - Windows 2000 Christian Long Python 3 06-26-2003 08:28 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57