2011/7/19 Nulpum <changjun....@gmail.com>: > I want to make sure that folder exists. > > '2011-07-03' is really exists. but 'os.path.isdir' say false > > Does anyone know why? > > > >>>> os.path.isdir("C:\Users\조창준\Desktop\logs") > True >>>> os.path.isdir("C:\Users\조창준\Desktop\logs\2011-07-03") > False Works here. Are you sure that it is not a file ?
>>> os.path.isdir('/tmp/2011-07-03') True Python 2.7.1 (r271:86832, Apr 12 2011, 16:15:16) [GCC 4.6.0 20110331 (Red Hat 4.6.0-2)] on linux2 Kushal -- http://fedoraproject.org http://kushaldas.in -- http://mail.python.org/mailman/listinfo/python-list