Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #9849

Re: os.path.isdir do not work for Foder named '2011-07-03'

References <0bf400a3-735c-487a-8d74-feb3b56be99b@g5g2000prn.googlegroups.com>
Date 2011-07-19 10:11 +0530
Subject Re: os.path.isdir do not work for Foder named '2011-07-03'
From Kushal Das <kushaldas@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1235.1311050497.1164.python-list@python.org> (permalink)

Show all headers | View raw


2011/7/19 Nulpum <changjun.cho@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

os.path.isdir do not work for Foder named '2011-07-03' Nulpum <changjun.cho@gmail.com> - 2011-07-18 21:25 -0700
  Re: os.path.isdir do not work for Foder named '2011-07-03' Kushal Das <kushaldas@gmail.com> - 2011-07-19 10:11 +0530
  Re: os.path.isdir do not work for Foder named '2011-07-03' Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-19 14:42 +1000
    Re: os.path.isdir do not work for Foder named '2011-07-03' Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-07-19 08:15 +0200
      Re: os.path.isdir do not work for Foder named '2011-07-03' Changjun <changjun.cho@gmail.com> - 2011-07-19 01:25 -0700
      Re: os.path.isdir do not work for Foder named '2011-07-03' Terry Reedy <tjreedy@udel.edu> - 2011-07-19 13:51 -0400
    Re: os.path.isdir do not work for Foder named '2011-07-03' Thomas Jollans <t@jollybox.de> - 2011-07-19 08:30 +0200
      Re: os.path.isdir do not work for Foder named '2011-07-03' Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-19 17:26 +1000
        Re: os.path.isdir do not work for Foder named '2011-07-03' Ethan Furman <ethan@stoneleaf.us> - 2011-07-19 07:22 -0700
    Re: os.path.isdir do not work for Foder named '2011-07-03' Nulpum <changjun.cho@gmail.com> - 2011-07-19 00:21 -0700
  Re: os.path.isdir do not work for Foder named '2011-07-03' Michael Hrivnak <mhrivnak@hrivnak.org> - 2011-07-19 00:42 -0400
  Re: os.path.isdir do not work for Foder named '2011-07-03' Rob Williscroft <rtw@rtw.me.uk> - 2011-07-19 04:56 +0000
  Re: os.path.isdir do not work for Foder named '2011-07-03' Grant Edwards <invalid@invalid.invalid> - 2011-07-19 14:21 +0000

csiph-web