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


Groups > comp.lang.python > #64544

Case insensitive exists()?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <larry.martell@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.024
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'string': 0.09; 'os.path': 0.09; 'for,': 0.16; 'subject:Case': 0.16; 'subject:exists': 0.16; 'subject:insensitive': 0.16; 'there?': 0.16; 'to:name:python- list@python.org': 0.22; 'this?': 0.23; 'string,': 0.24; 'compare': 0.26; 'switch': 0.26; 'message-id:@mail.gmail.com': 0.30; 'existence': 0.31; 'anyone': 0.31; 'file': 0.32; 'but': 0.35; 'received:google.com': 0.35; 'to:addr:python-list': 0.38; 'files': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'name': 0.63; 'different': 0.65
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=K+elAWRUpny0VWipsHpJncHbPkArhA1lQqQemQSojTs=; b=WnQFDYu8Ns9TQrxV2aK/+YSTSC3f9O05vT0g8mkTn4v/S1JWr+Oy0Q7TDjyz5gnnhe 42lvlIsmkZyRsdwkREQylH/1yKKWyEFayEKNCak6uxmoFjcODYdoWQ0x2RzsXYiwUaHA 6+w7hcgmX9VxvL/vRDu272tMDEvpRos27+0QZu36zi6gvSaNxYFGNybIvc2e6PV0OpwL s9hRqj3drP/x35WsK/dLPPfWPrSXffCLdoYCfpUkhn9BwbqFi0v7m+TfYt3XF1pp54Y3 gkhNilDaG3+ix2VVvPMWMm3ZreC/nHQyHOzkOj35vFHY16iuqpyES39CYkaVI5yGyi1p azbw==
MIME-Version 1.0
X-Received by 10.58.187.98 with SMTP id fr2mr32066vec.38.1390438699339; Wed, 22 Jan 2014 16:58:19 -0800 (PST)
Date Wed, 22 Jan 2014 17:58:19 -0700
Subject Case insensitive exists()?
From Larry Martell <larry.martell@gmail.com>
To "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5853.1390438708.18130.python-list@python.org> (permalink)
Lines 7
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1390438708 news.xs4all.nl 2897 [2001:888:2000:d::a6]:45286
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:64544

Show key headers only | View raw


I have the need to check for a files existence against a string, but I
need to do case-insensitively. I cannot efficiently get the name of
every file in the dir and compare each with my string using lower(),
as I have 100's of strings to check for, each in a different dir, and
each dir can have 100's of files in it. Does anyone know of an
efficient way to do this? There's no switch for os.path that makes
exists() check case-insensitively is there?

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


Thread

Case insensitive exists()? Larry Martell <larry.martell@gmail.com> - 2014-01-22 17:58 -0700
  Re: Case insensitive exists()? Roy Smith <roy@panix.com> - 2014-01-22 20:08 -0500
    Re: Case insensitive exists()? Larry Martell <larry.martell@gmail.com> - 2014-01-22 18:18 -0700
      Re: Case insensitive exists()? Roy Smith <roy@panix.com> - 2014-01-22 20:27 -0500
        Re: Case insensitive exists()? Larry Martell <larry.martell@gmail.com> - 2014-01-22 21:24 -0700
        Re: Case insensitive exists()? Chris Angelico <rosuav@gmail.com> - 2014-01-23 15:29 +1100
        Re: Case insensitive exists()? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-01-23 15:43 +0000
        Re: Case insensitive exists()? Larry Martell <larry.martell@gmail.com> - 2014-01-23 12:02 -0700
      Re: Case insensitive exists()? Dan Sommers <dan@tombstonezero.net> - 2014-01-23 07:51 +0000
  Re: Case insensitive exists()? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-23 12:06 +0000
  Re: Case insensitive exists()? Grant Edwards <invalid@invalid.invalid> - 2014-01-23 14:58 +0000

csiph-web