Table of Contents

Class: Process Twisted-0.17.4/twisted/internet/win32.py

A process that integrates with the Twisted event loop.

If your subprocess is a python program, you need to:

  • Run python.exe with the -u command line option - this turns on unbuffered I/O. Buffering stdout/err/in can cause problems, see e.g. http://support.microsoft.com/default.aspx?scid=kb;EN-US;q1903

  • If you don't want Windows messing with data passed over stdin/out/err, set the pipes to be in binary mode:

            import os, sys, mscvrt
            msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
            msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
            msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
    

Base Classes   
abstract.FileDescriptor
Methods   
__init__
closeStdin
connectionLost
connectionLostNotify
doReadErr
doReadOut
doWrite
write
  __init__ 
__init__ (
        self,
        command,
        args,
        environment,
        path,
        )

  closeStdin 
closeStdin ( self )

Close the process' stdin.

  connectionLost 
connectionLost ( self )

Shut down resources.

  connectionLostNotify 
connectionLostNotify ( self )

Will be called 3 times, by stdout/err threads and process handle.

  doReadErr 
doReadErr ( self )

Runs in thread.

  doReadOut 
doReadOut ( self )

Runs in thread.

  doWrite 
doWrite ( self )

Runs in thread.

  write 
write ( self,  data )

Write data to the process' stdin.


Table of Contents

This document was automatically generated on Sat Apr 20 01:30:49 2002 by HappyDoc version 2.0