Show More
@@ -28,7 +28,7 b'' | |||
|
28 | 28 | scan Python source code and re-emit it with no changes to its original |
|
29 | 29 | formatting (which is the hard part). |
|
30 | 30 | |
|
31 |
$Id: PyColorize.py 22 |
|
|
31 | $Id: PyColorize.py 2274 2007-04-26 14:41:43Z jdh2358 $""" | |
|
32 | 32 | |
|
33 | 33 | __all__ = ['ANSICodeColors','Parser'] |
|
34 | 34 | |
@@ -133,7 +133,12 b' class Parser:' | |||
|
133 | 133 | string.""" |
|
134 | 134 | |
|
135 | 135 | string_output = 0 |
|
136 |
if out == 'str' or self.out == 'str' |
|
|
136 | if out == 'str' or self.out == 'str' or \ | |
|
137 | isinstance(self.out,cStringIO.OutputType): | |
|
138 | # XXX - I don't really like this state handling logic, but at this | |
|
139 | # point I don't want to make major changes, so adding the | |
|
140 | # isinstance() check is the simplest I can do to ensure correct | |
|
141 | # behavior. | |
|
137 | 142 | out_old = self.out |
|
138 | 143 | self.out = cStringIO.StringIO() |
|
139 | 144 | string_output = 1 |
@@ -1,3 +1,9 b'' | |||
|
1 | 2007-04-26 Fernando Perez <Fernando.Perez@colorado.edu> | |
|
2 | ||
|
3 | * IPython/PyColorize.py (Parser.format2): fix state-handling | |
|
4 | logic. I still don't like how that code handles state, but at | |
|
5 | least now it should be correct, if inelegant. Closes #146. | |
|
6 | ||
|
1 | 7 | 2007-04-25 Ville Vainio <vivainio@gmail.com> |
|
2 | 8 | |
|
3 | 9 | * Extensions/ipy_which.py: added extension for %which magic, works |
General Comments 0
You need to be logged in to leave comments.
Login now