The format of filename

Neil Cerutti horpner at yahoo.com
Thu Oct 26 13:26:22 CEST 2006


On 2006-10-26, Tim Roberts <timr at probo.com> wrote:
> Neil Cerutti <horpner at yahoo.com> wrote:
>>
>>Some experimentation shows that Python does seem to provide
>>*some* translation. Windows lets me use '/' as a path separator,
>>but not as the name of the root of a partition name. But perhaps
>>this a peculiarity of the commands themselves, and not of Windows
>>path names in particular.
>>
>>  C:\PYTHON24>CD /
>>  The syntax of the command is incorrect.
>>  
>>  C:\PYTHON24>CD \
>>  C:\>EDIT /PYTHON24/README
>>  The syntax of the command is incorrect.
>
> The Windows APIs all accept either forward slashes or back, and
> have done so clear back to Windows 3.0.  However, the Windows
> command shells do not.  That's what you're seeing here.

Well, kudos to Windows then for making Python look really smart
while making itself look like a dufus. ;-)

Seriously, experiments show the forward slash is OK as a
seperator, it just can't be root.

-- 
Neil Cerutti



More information about the Python-list mailing list