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
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)
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
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:
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.
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