[python-win32] win32pipe Usage

Tim Golden tim.golden at viacom-outdoor.co.uk
Thu Mar 11 06:15:31 EST 2004


Neil> Looking at the win32api documentation on the ActiveState website, 
Neil> there are a number of classes I can use (one of them being pyHANDLE).

Neil> However I cannot find which module the classes are defined in, 
Neil> is there any information (I've done google searches - to no avail) 
Neil> which will tell me where these classes are defined so that I can
import 
Neil> them?

pyHANDLE is something of a special case, I suspect, since I can't
think of a situation in which you're going to create it yourself:
it'll always be returned from a call to, CreateFile etc. Once you
have the handle, the documentation which I assume you've seen for
the pyHANDLE object itself applies, although there's not much one
can usefully do with it except close it and refer to its [handle]
property which is the real Win32 Handle.

Are there other classes you can't find out about? If so, what are
they? I find the ActiveState CHM docs to be pretty good on the
whole. And, in case you haven't already looked, the Mark Hammond &
Andy Robinson book "Python Programming on Win32" is a must-have.
(At least via Safari: http://safari.oreilly.com/1565926218).

Ultimately, search the source, but that needs more time
than most people have when they're in a hurry!

Neil> I'm attempting to write a python program which 
Neil> will talk to a Named Pipe created by another process.  
Neil> I can do this successfully with win32pipe.CallNamedPipe(), 
Neil> however this method connects and disconnects to the pipe 
Neil> on each transaction.  Does anyone know how to connect to 
Neil> an existing named pipe and leave that connection 
Neil> open for a period of time (then closing when completed).

Yes, I saw your post on c.l.py earlier. No experience of my own,
I'm afraid, and I don't have time to experiment just at the moment.
Could you post some useful code? Ideally using Python at both ends
of the pipe, but at least showing the sequence of events from the
Python perspective?

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-win32 mailing list