Closed GoogleCodeExporter closed 9 years ago
Confirmed, it's a real bug, thanks very much for the report.
I'll aim to fix this soon.
Original comment by tart...@gmail.com
on 15 Oct 2010 at 2:03
Hmm, the fix doesn't seem adequate to me.
I also use colorama 0.1.18, on Arch Linux 2.6.38 x86_64, python 2.7.1
Oscar did not mention which file should be changed, but the string
'self.wrapped.write(Style.RESET_ALL)' only appeared in one location, so I
edited reset_all(self) in
/usr/lib/python2.7/site-packages/colorama/ansitowin32.py with the suggested
change.
I also removed the corresponding .pyo and .pyc file.
I run my python program without attaching it to a terminal, and it still
contains bunches of color codes.
Example code:
from colorama import Fore, Back, Style, init
init()
print Back.GREEN + Fore.BLUE + str + Style.RESET_ALL
When I run this as python2 test.py (stdout == tty) it emits the sequences,
hence i see the colors.
However, when I run it as python2 test.py | cat - (stdout is a pipe)
or: python2 test.py > somefile.txt
it still emits the sequences, which is not what it should do.
Any idea when a new colorama release will include the proper fix?
Original comment by dplaeti...@intec.ugent.be
on 20 Apr 2011 at 9:57
Hey. Acknowledged, and thanks for the comment. What you say makes sense. There
isn't a schedule, but I have a couple of long weekends coming up - I'll make
some time for this then.
Original comment by tart...@gmail.com
on 20 Apr 2011 at 10:08
hmm why did google not inform me about your followup..
anyway, looking forward to that change, have a nice day.
Dieter
Original comment by dplaeti...@intec.ugent.be
on 9 May 2011 at 2:22
Patch submitted by Oscar Lester was applied by Daniel Griffith. Nice work guys!
Original comment by tart...@gmail.com
on 19 Jun 2011 at 6:47
Original comment by tart...@gmail.com
on 19 Jun 2011 at 6:47
Great! Thanks for accepting the "patch". My last name is "Lesta" actually, but
Lester sounds cooler :-P.
Take care, and thanks for colorama!
Oscar.
Original comment by oscar.le...@gmail.com
on 24 Jun 2011 at 8:51
Oops! Spelling fixed. :-)
Original comment by tart...@gmail.com
on 25 Jun 2011 at 10:27
Original issue reported on code.google.com by
oscar.le...@gmail.com
on 7 Oct 2010 at 3:49