Unrecognized escape sequences in string literals
Duncan Booth
duncan.booth at invalid.invalid
Mon Aug 10 05:41:52 EDT 2009
Steven D'Aprano <steven at REMOVE.THIS.cybersource.com.au> wrote:
> Or perhaps they should follow bash's lead, and map \C to C for every
> character. If there were no special escapes at all, Windows
> programmers wouldn't keep getting burnt when they write
> "C:\\Documents\today\foo" and end up with something completely
> unexpected.
>
> Oh wait, no, that still wouldn't work, because they'd end up with
> C:\Documentstodayfoo. So copying bash doesn't work.
>
There is of course no problem at all so long as you stick to writing your
paths as MS intended them to be written: 8.3 and UPPERCASE
>>> "C:\DOCUME~1\TODAY\FOO"
'C:\\DOCUME~1\\TODAY\\FOO'
:^)
--
Duncan Booth http://kupuguy.blogspot.com
More information about the Python-list
mailing list