Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!nx01.iad01.newshosting.com!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.044 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'python': 0.08; '>>>>': 0.09; 'skip:o 50': 0.09; '[gcc': 0.16; 'linux2': 0.16; 'subject:named': 0.16; 'cc:addr:python-list': 0.16; '>>>': 0.16; 'exists.': 0.19; 'subject:not': 0.21; 'cc:2**0': 0.21; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'message- id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.30; "skip:' 10": 0.32; 'apr': 0.32; 'does': 0.32; 'anyone': 0.33; 'url:in': 0.33; 'folder': 0.35; 'file': 0.36; 'but': 0.37; 'received:google.com': 0.38; 'received:209.85.161': 0.38; 'received:209.85': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; 'received:209': 0.40; 'skip:o 30': 0.63; 'here.': 0.66; '8bit%:19': 0.67; 'why?': 0.73; '2.7.1': 0.84; 'subject:skip:o 10': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=5J6cmSo5XKdSBwrOFMEZ8WjPNuqR2bEtuBbzdn38tlc=; b=RPipt+cwABP7myJQ0t8JWJy3Kfxpm0IeGUOuskiItxMznCCpW3naDfMaCSItDjHaNF bjJOTM3CDAgVuwk7ZTvFkKLCMexv3/57wjCKTFcPygF/uTjE9XphZtRFZvoc3JpvMT9z XmYpHSPvWzYEuhUSQWQtU5mrsucEo6flH55Bw= MIME-Version: 1.0 In-Reply-To: <0bf400a3-735c-487a-8d74-feb3b56be99b@g5g2000prn.googlegroups.com> References: <0bf400a3-735c-487a-8d74-feb3b56be99b@g5g2000prn.googlegroups.com> Date: Tue, 19 Jul 2011 10:11:35 +0530 Subject: Re: os.path.isdir do not work for Foder named '2011-07-03' From: Kushal Das To: Nulpum Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311050497 news.xs4all.nl 23953 [2001:888:2000:d::a6]:37478 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9849 2011/7/19 Nulpum : > 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\=EC=A1=B0=EC=B0=BD=EC=A4=80\Desktop\logs") > True >>>> os.path.isdir("C:\Users\=EC=A1=B0=EC=B0=BD=EC=A4=80\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 --=20 http://fedoraproject.org http://kushaldas.in