Parsing strings?
Michael Hudson
mwh at python.net
Mon Apr 14 02:54:29 EDT 2003
tweedgeezer at hotmail.com (Jeremy Fincher) writes:
> Is there any way to turn a string (in Python format, escapes and all)
> into an actual Python string without using eval()?
>
> I.e., I'd like to turn the four-character string "\\x00" into the
> one-character Python string "\x00" without using eval(). Is there any
> way to do that?
Don't think so -- and if there is, Lib/compiler/transformer.py would
like to know...
Cheers,
M.
--
Wise frogs would take sanctuary in the cool moistness of the cat's
milk-dish, from where they would watch you. It's worrying being
watched by a milk-dish. -- Tanuki the Raccoon-dog, asr
More information about the Python-list
mailing list