io.FDCapture API [rev. 38799]

class FDCapture():

Capture IO to/from a given os-level filedescriptor.

methods:

def __init__(self, targetfd, tmpfile=None):

*no docstring available*

def done(self):

unpatch and clean up, returns the self.tmpfile (file object)

def maketmpfile(self):

create a temporary file

def setasfile(self, name, module=<module 'sys' (built-in)>):

patch <module>.<name> to self.tmpfile

def unsetfiles(self):

unpatch all patched items

def writeorg(self, str):

write a string to the original file descriptor