Making a string raw

Chris Barker chrishbarker at attbi.com
Tue Dec 4 14:10:33 EST 2001


Rune Nesheim wrote:
> 
> Could any of you lot tell me how to convert a string stored in
> avariable to a raw string?

There is no such thing, the concept of "raw" strings, only applies to
literals.

ie:

s = r'\this'
and 
s = '\\this'

create exactly the same object.

Give a little more detail about what problem you are trying to solve,
and we may be able to help you.

-Chris


-- 
Christopher Barker,
Ph.D.                                                           
ChrisHBarker at home.net                 ---           ---           ---
http://members.home.net/barkerlohmann ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------



More information about the Python-list mailing list