Closed Killah-Chicken closed 3 years ago
I think one should consider using from __future__ import print_function
.
At this point bottle only supports Python2.7 so it's safe.
https://docs.python.org/2/library/__future__.html
I believe the code here should work for you.
@Killah-Chicken if you use python3 give this a shot.
Fixed in 5e2efb6a
If
sys.stdout is None or sys.stderr is None
, importing bottle causes anAttributeError
. It is caused by this piece of code (bottle.py line 118), because attribute write of NoneType could not be found:I was wondering that
sys.stdout
could be set toNone
, but found: stackoverflow: stdout = NoneI could fix it with setting and "empty" lambda to
_stdout
and_stderr