Strange "feature" involving double slashes in Win98
Peter Hansen
peter at engcorp.com
Tue Sep 14 21:03:44 EDT 2004
Carlos Ribeiro wrote:
> On Tue, 14 Sep 2004 18:16:59 -0400, Peter Hansen <peter at engcorp.com> wrote:
>
>>Do you have pywin32 (win32all) installed? Try this one instead:
>> win32api.GetFullPathName('c://work')
>>
>>This does the same as abspath does above, on mine.
>
> You're right. That's what I got now:
>
> PythonWin 2.3.2 (#49, Nov 13 2003, 10:34:54) [MSC v.1200 32 bit
> (Intel)] on win32.
>>>>import win32api
>>>>win32api.GetFullPathName('c://work')
>
> 'c:\\\\work'
>
> It seems that either ActivePython uses a different implementation for
> os.abspath(), or the code changed between 2.3.2 and 2.3.4. The last
> time I checked ActivePython was still using 2.3.2 -- I'll check it out
> again, and upgrade if a newer version is available.
I reach a different conclusion. Note that when I said "this
does the same as abspath does above", I meant that *my* output
for the GetFullPathName() call is actually this:
'c:\\work'
In other words, it appears to be an OS difference. What flavour
and version of Windows are you running? I'm using XP Pro SP2.
-Peter
More information about the Python-list
mailing list