Re: Duplex communication with pipes - is possible ?

2006-06-26 Thread Dara Durum
Hi ! See this shortened, simplified example. It is not working, but I don't understand why... # Client Process import os, sys from subprocess import Popen, PIPE from time import sleep, time from cPickle import loads, dumps from binascii import hexlify, unhexlify from base64 import

Re: Duplex communication with pipes - is possible ?

2006-06-20 Thread Dara Durum
Hi ! Ahhh ! It's working ! This is the simple client code: if 'C' in sys.argv: #sys.stdout=open(r'c:\tpp2client.log','w') print clt start while 1: head=sys.stdin.read(4) print clt head,[head] if head.lower()=='quit': break dsize=int(head)

Re: Duplex communication with pipes - is possible ?

2006-06-20 Thread Daniel Dittmar
Dara Durum wrote: Now I trying with packet size decreasing. Are PIPE-s can handle the binary data packets, or I need to convert them with base64 ? In the client, you need to set the mode of sys.stdin to binary, otherwise, you get the DOS translation of linefeeds. See

Duplex communication with pipes - is possible ?

2006-06-16 Thread Dara Durum
Hi ! I want to create a Process Pool Object. I can hold started processes, and can communicate with them. I tryed with many ipc methods, but every of them have bug or other problem. Sockets are unavailabe (because Windows Firewall hold them). I think I will use pipe. The object's pseudocode:

Re: Duplex communication with pipes - is possible ?

2006-06-16 Thread Daniel Dittmar
Dara Durum wrote: Hi ! I want to create a Process Pool Object. I can hold started processes, and can communicate with them. I tryed with many ipc methods, but every of them have bug or other problem. Sockets are unavailabe (because Windows Firewall hold them). I think I will use pipe.

Re: Duplex communication with pipes - is possible ?

2006-06-16 Thread alisonken1
snip readlines () will try to read until the stream/socket is closed. Try to read only one line. This of course means that you cannot sent \n as part of the data, you have to escape them somehow. snip If I remember correctly, if you want to pass '\n' so readline won't stop, you should be