Making a string raw

Rune Nesheim rune at nesheim.net
Tue Dec 4 13:14:58 EST 2001


Could any of you lot tell me how to convert a string stored in
avariable to a raw string?

I know I create a raw string this way:

spam = R'hello'

But if I don't know what the string is going to contain, for example
if I fetch from a Tkinter text-box to the variable 'eggs' and want to
convert 'eggs' into a raw string.



More information about the Python-list mailing list