import statement is case sensitive

Tim Peters tim.one at home.com
Thu Feb 22 17:33:29 EST 2001


[Alex Martelli]
> ...
> In Windows, you cannot _directly_ rename a file or directory
> to change its case (a Windows bug, I'd say); you have to
>     rename Foo tempname
>     rename tempname foo
> because trying to directly do
>     rename Foo foo
> will fail.

Here under Win98SE:

>dir/b fo*

>md Foo
>dir/b fo*
Foo

>ren Foo foo
>dir/b fo*
foo

>rd foo
>echo blah > FOO
>dir/b fo*
FOO

>ren FOO fOo
>dir/b fo*
fOo

>
So, works fine for me, whether it's a directory or a file.  Certainly
possible that this varies across Windows flavors.





More information about the Python-list mailing list