doubling slashes in a string

Grant Edwards ge at nowhere.none
Mon Oct 9 10:39:32 EDT 2000


In article <39de8a48_3 at corp.newsfeeds.com>, Joshua Muskovitz wrote:

>Man, I just have to say, I *love* python.  I was struggling with the problem
>of how to take a pathname and double all of the backslashes in it, so that
>(for example):
>
>c:\foo\bar\zingo.walla.walla --> c:\\foo\\bar\\zingo.walla.walla

I find it much easier to use forward slashes.

-- 
Grant Edwards                   grante             Yow!  ... I have read the
                                  at               INSTRUCTIONS...
                               visi.com            



More information about the Python-list mailing list