python-tee
python-tee copied to clipboard
this does not work for subprocess stdout too
with tee.StdoutTee('/tmp/testtee.log'):
subprocess.call('ls .', stdout=sys.stdout, shell=True)
``
raises:
c2pwrite = stdout.fileno()
AttributeError: 'StdoutTee' object has no attribute 'fileno'
I think better way to do this maybe just subclass the file object.