how to use the string '\\.\'
Duncan Booth
duncan.booth at invalid.invalid
Mon Apr 9 10:32:24 EDT 2007
"Gabriel Genellina" <gagsl-py2 at yahoo.com.ar> wrote:
> En Mon, 09 Apr 2007 08:21:44 -0300, Duncan Booth
><duncan.booth at invalid.invalid> escribió:
>
>> <kelvin.you at gmail.com> wrote:
>>
>>> print r'\\.\'
>>
>> See the FAQ:
>> http://www.python.org/doc/faq/general/#why-can-t-raw-strings-r-strings
>> -end-with-a-backslash
>
> This form is not included in the FAQ alternatives (should it?):
>
> print r'\\.' '\\'
>
>
Yes it is. It is just the first of the FAQ suggestions using single quotes
instead of double quotes. If you wanted to add another one then I would go
for:
os.path.normpath("/this/is/my/dos/dir")
although it doesn't work with the particular example in question here.
More information about the Python-list
mailing list