On Mon, 7 Sep 2009 15:29:23 +1000
"jwither" <[email protected]> wrote:
> Given a string (read from a file) which contains raw escape sequences,
> (specifically, slash n), what is the best way to convert that to a parsed
> string, where the escape sequence has been replaced (specifically, by a
> NEWLINE token)?
I don't know what your actual requirement is but maybe this fits:
exec("print '%s'" % x)
--
D'Arcy J.M. Cain <[email protected]> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
--
http://mail.python.org/mailman/listinfo/python-list