why is os.getcwd() printing the path in all caps on win2k?

Mark Hadfield m.hadfield at niwa.co.nz
Wed Jan 23 17:10:15 EST 2002


"sameer" <sameer_ at email.com> wrote in message
news:6bd9f01b.0201222308.6be73d5e at posting.google.com...
> I believe it's a DOS compatibility issue.  i was planning on writing
> an installation script that would move the contents of the current
> directory to another directory.  I guess I'll have to find another
> way.  Looks like in dos mode, any case sensitivity is lost and
> everything is capitalized.

If you're on Windows 2000, then you're not using DOS and there is no "DOS
Mode". Windows 2000 has a command processor, cmd.exe, which is sometimes
called the DOS prompt, but it isn't, it's a Windows console application.
You're using Python which is also a Windows console application.

As somebody else suggested, it's probably to do with the file system of the
volume where your current directory is located. or perhaps some obscure
Registry setting. On my Windows 2000 system, with two NETS disks, file name
and directory case are preserved. (This is important to me because I connect
to Unix machines.)

Are you moving files around on a single Windows system, or to another
Windows system? Then case changes (however irritating they might be)
shouldn't matter. Windows is (ideally) case-preserving but case-insensitive.

As all OS's should be-ly yours

---
Mark Hadfield
m.hadfield at niwa.co.nz  http://katipo.niwa.co.nz/~hadfield
National Institute for Water and Atmospheric Research






More information about the Python-list mailing list