FWIW, your code works correctly for me in all respects with Python 2.5 on Windows XP Pro. I no longer have Python 2.4.x installed, so can't easily do a comparison.
Perhaps the problem has something to do with Python 2.5 with Windows 2K. -Martin On Dec 17 2006, 4:29 pm, "klappnase" <[EMAIL PROTECTED]> wrote: > Hi all, > yesterday I installed Python-2.5 and python-2.4.4 on my windows2k box. > When trying to use os.path.exists() to detect which drives are present > on the system I noticed that > these behave differently: > > Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] > on win32 > Type "copyright", "credits" or "license()" for more information. > > >>> import os > >>> for char in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ': if > >>> os.path.exists('%s:\\' % char): > print '%s:\\' % char > > A:\ > C:\ > D:\ > E:\ > > ########################################### > > Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit > (Intel)] on win32 > Type "copyright", "credits" or "license()" for more information. > > >>> import os > >>> for char in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ': if > >>> os.path.exists('%s:\\' % char): > print '%s:\\' % char > > C:\ > > When I insert a floppy into A: os.path.exists('A:\\') will return True > on Python-2.5, too. > Does anyone know, is this inconsistent behavior a bug or a new feature? > > I also noticed that theTixbinaries are no longer present in 2.5, does > anyone know if it is > planned to remove them pemanently? > > Thanks in advance > > Michael -- http://mail.python.org/mailman/listinfo/python-list