[Python-au] RE: Processes and pipes; newbie alert
abulka at bigpond.net.au
Thu Dec 30 01:49:39 CET 2004
Not sure about the win32 reference but I am soon planning to build some
interprocess communication myself - and being inexperienced in this field
myself, was watching this thread with interest.
I was perhaps hoping to create a generic module (strategy or bridge design
pattern) where I could communicate between two processes using either
talk via regular text files ?
http requests and periodic polling
The flexibility of a switchable solution would be that I would have the
option of running the processes on another machines altogether, and have the
option of communicating using internet protocols too.
So I guess personally I would love a reference on "the varieties of inter
process communication" in python, and how these techniques compare to
techniques (e.g remoting in .NET) in other languages and frameworks.
Any pointer appreciated.
From: python-au-bounces at python.net [mailto:python-au-bounces at python.net] On
Behalf Of Jon
Sent: Thursday, 30 December 2004 11:38 AM
To: python-au at python.net
Subject: [Python-au] Re: python-au Digest, Vol 18, Issue 8
I've solved my own problem, well the python one anyway.
In the master I need to use win32pipe.CreateNamedPipe to create a pipe
yielding a PyHandle Then I invoke the slave process
the slave process connects to the pipe using win32file.CreateFile
In the master I use win32pipe.ConnectNamedPipe to tell me when the slave has
connected I can then read and write to the pipe as I'd expect and the
win32pipe.PeekNamedPipe function works as I expect.
A good reference book on the win32 API would have made it easier than
bouncing between the ActiveState referenece and the MSDN library; any
> Subject: [Python-au] Processes and pipes; newbie alert
> I have a program launchs a seperate processes and I can send commands
> and get response back. But it is blocking and I'd like to be able to
> there is a response ready before I try and read the pipe.
> I think that win32pipe.PeekNamedPipe would do it but when I use it I
> get a type error that says "TypeError: The object is not a PyHANDLE
> object". The documentation seems sparse so after spending a bit of
> time playing. and searched the archives with no joy so I thought I'd
python-au maillist - python-au at starship.python.net
More information about the python-au