[Pythonmac-SIG] \r in string causes eval to fail
Michael Hudson
mwh at python.net
Wed Sep 15 20:28:40 CEST 2004
"Chris Barker" <Chris.Barker at noaa.gov> writes:
> Michael Hudson wrote:
>
>> Semi-seriously, I'd guess that everyone who's bumped into this has
>> found it easier to normalize the line feeds in Python than hack the
>> parser (it's a little scary).
>
> Would you need to hack the parser? I'd be inclined to simply put a
> filter in before the parser, just like I'd do in user code:
>
> CodeString = FixLineFeeds(CodeString)
> eval(CodeString)
Did you read what I said?
Cheers,
mwh
--
The above comment may be extremely inflamatory. For your
protection, it has been rot13'd twice.
-- the signature of "JWhitlock" on slashdot
More information about the Pythonmac-SIG
mailing list