print string as raw string

Mirko Dziadzka mirko.dziadzka at gmail.com
Tue Feb 17 04:03:29 EST 2009


Hi all

I'm trying to find a way to output strings in the raw-string format, e.g.

print_as_raw_string(r"\.") should output r"\." instead of "\\."

Is there a better way than writing your own print function? Some magic
encoding?


    Mirko




More information about the Python-list mailing list