doubling slashes in a string
Remco Gerlich
scarblac at pino.selwerd.nl
Mon Oct 9 09:35:34 EDT 2000
More information about the Python-list mailing list
Mon Oct 9 09:35:34 EDT 2000
- Previous message (by thread): doubling slashes in a string
- Next message (by thread): doubling slashes in a string
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Joshua Muskovitz <josh at open.com> wrote in comp.lang.python: > Bzzt. Thanks, but the point was to *double* the backslash. The intended > result is not a legal pathname. In fact, it is intended to go into yet > another interpreted language, and thus the backslashes needed to be escaped > (by doubling them). The original string was a valid path. Interestingly, > this is meant to work on a cross platform basis, and yet, only backslashes > need to be doubled, since they are the only special character needing to be > escaped. On a *nix box, the doubling is not necessary. Thus, the > split/join or replace is what is needed. I don't know if you can use it here, but slashes work just as well as backslashes under Windows. Remco Gerlich
- Previous message (by thread): doubling slashes in a string
- Next message (by thread): doubling slashes in a string
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list