[python-win32] file descriptor issues using msvcrt.open_osfhandle()+os.fdopen()

2011-12-17 Thread Scott Leerssen
Greetings! Apologies in advance for the length of this post; after many days of scouring Python and Windows news groups, I've seen reports of issues similar to mine, but no cause or resolution other than re-trying an operation. I'm in no way a Windows programmer; I've spent my entire career o

Re: [python-win32] file descriptor issues using msvcrt.open_osfhandle()+os.fdopen()

2011-12-17 Thread Amaury Forgeot d'Arc
2011/12/17 Scott Leerssen > Closing the PyHANDLE leaves the file object with an invalid descriptor, > and closing the file object leaves the PyHANDLE with an invalid descriptor, > but only sometimes After open_osfhandle(), the handle is owned by the file object, and should not be closed when th

Re: [python-win32] file descriptor issues using msvcrt.open_osfhandle()+os.fdopen()

2011-12-17 Thread Scott Leerssen
On Dec 17, 2011, at 11:36 AM, Amaury Forgeot d'Arc wrote: > 2011/12/17 Scott Leerssen > Closing the PyHANDLE leaves the file object with an invalid descriptor, and > closing the file object leaves the PyHANDLE with an invalid descriptor, but > only sometimes > > After open_osfhandle(), the ha

Re: [python-win32] file descriptor issues using msvcrt.open_osfhandle()+os.fdopen()

2011-12-17 Thread Amaury Forgeot d'Arc
2011/12/17 Scott Leerssen > I did see that, but I interpreted that to mean that the PyHANDLE would be > dereferenced from the underlying Windows file handle, > It's the other way round: the PyHandle just forgets the win32 handle value, and will not close it in its __del__. -- Amaury Forgeot d'

Re: [python-win32] file descriptor issues using msvcrt.open_osfhandle()+os.fdopen()

2011-12-17 Thread Scott Leerssen
On Dec 17, 2011, at 12:25 PM, Amaury Forgeot d'Arc wrote: > 2011/12/17 Scott Leerssen > I did see that, but I interpreted that to mean that the PyHANDLE would be > dereferenced from the underlying Windows file handle, > > It's the other way round: the PyHandle just forgets the win32 handle va

Re: [python-win32] send message remote host

2011-12-17 Thread pacopyc pacopyc
Yes, I'm thinking about "net send" of Windows ___ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32