python-tee
python-tee copied to clipboard
Not for Python 3 ?!?
setup.py has only:
"Programming Language :: Python :: 2.7",
See: https://github.com/algrebe/python-tee/commit/75582710ea0bc5e52614393c90803a6edcb84396#r30382013
Seems it didn't work with Python 3:
with tee.StdoutTee(log_file_path):
File "/usr/local/lib/python3.6/site-packages/tee/tee.py", line 69, in __enter__
self.fp = open(self.filename, self.mode, self.buff)
ValueError: can't have unbuffered text I/O
that's a pity
@jedie Thanks for reporting this!
Looks like version specific code might have to be written for the call to open
.
It's actually just a bad default value. If you set buff=-1
(which is the default in python 2 & 3 and therefore imho should be the default here) it works fine under python 3.