[Twisted-Python] twisted.internet.process for Win32

Andrew Bennetts andrew-twisted at puzzling.org
Sat Mar 9 05:19:45 MST 2002


On Fri, Mar 08, 2002 at 09:50:48AM -0500, Itamar Shtull-Trauring wrote:
> I've attached my current code, which seems to be working. This will
> hopefully be checked in today, but some testing by others would be useful.

I'm not sure if it works on Win98 -- is this error harmless?
---
D:\PYTHON22\PYTHON.EXE
creating process
process created
ok, made process object
connection lost
Exception in thread Thread-3:
Traceback (most recent call last):
  File "D:\PYTHON22\lib\threading.py", line 408, in __bootstrap
    self.run()
  File "D:\PYTHON22\lib\threading.py", line 396, in run
    apply(self.__target, self.__args, self.__kwargs)
  File "process_win32.py", line 175, in doReadErr
    task.schedule(self.handleError, data)
AttributeError: Process instance has no attribute 'handleError'
---

And now on to me... :)

On Sat, Mar 09, 2002 at 10:16:55PM +1100, Andrew Bennetts wrote:
> (It *should* be easy to get it down to one thread by using
> WaitForMultipleObjects, but we'll see...)

I'm attaching a version which should work with only one thread per process,
not three (and with some work, could be limited to one thread overall).

However, I'm getting the following error:

---
Exception in thread Thread-1:
Traceback (most recent call last):
  File "D:\PYTHON22\lib\threading.py", line 408, in __bootstrap
    self.run()
  File "D:\PYTHON22\lib\threading.py", line 396, in run
    apply(self.__target, self.__args, self.__kwargs)
  File "process_win32.py", line 158, in waitOnPipe
    val = win32event.WaitForMultipleObjects(handles, 0,
api_error: (6, 'WaitForMultipleObjects', 'The handle is invalid.')
---

Anyone have any idea as to what the problem might be?

-Andrew.





More information about the Twisted-Python mailing list