Path: csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'correct.': 0.07; 'debugging': 0.07; 'rename': 0.07; 'see.': 0.07; 'app,': 0.09; 'slow.': 0.09; 'cc:addr:python-list': 0.11; 'django': 0.11; 'jan': 0.12; '23,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'query,': 0.16; 'subject:Case': 0.16; 'subject:exists': 0.16; 'subject:insensitive': 0.16; 'apps': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'input': 0.22; 'coding': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; "i've": 0.25; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'matching': 0.30; 'said,': 0.30; 'message-id:@mail.gmail.com': 0.30; 'serve': 0.31; 'easy,': 0.31; 'larry': 0.31; 'run': 0.32; 'guess': 0.33; 'could': 0.34; 'problem': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'done': 0.36; 'entry': 0.36; "i'll": 0.36; 'too': 0.37; 'list': 0.37; 'files': 0.38; 'issue': 0.38; 'pm,': 0.38; 'users': 0.40; 'serving': 0.60; 'simply': 0.61; 'back': 0.62; 'name': 0.63; 'high': 0.63; 'today': 0.64; 'revealed': 0.68; 'user,': 0.69; 'receive': 0.70; 'browser.': 0.78; 'informed': 0.78; 'working,': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=8PKl+7laP8GwIvdDGl6P2Lac9DeHWvQUebpJYIfRVpc=; b=Hel3qfznxSKi4a7EiNBleSBbPGfSetzdbvrjY8QtURJpUInU56YvSO7I2deJ36S3J7 A30Y3Qpoch8yxRi1gdUwbFrUBO2r9p2QqAUqRuAzlPwB9ud6m1vJgD2dwigR4sXOHHJ/ 4sQx9ogGhtJ0gYjxIeb27m/UJgn5Eo5TI01hxqFwdNLE9FvfAXfX8jsULh6gfH3CDcyM ofU7FTj812zo4SVJivzJgtkGoGSNH1SSpmIXaeHtm/urE0lr+8tA3XOGuStIURXN9xVA kVahRQsg4hycgpOd93ifwynWwnBPTTS2HevS4bLb7gfmPxKHBlXZosh2Lc5UGourIcfJ TRgg== MIME-Version: 1.0 X-Received: by 10.66.118.71 with SMTP id kk7mr5892842pab.14.1390451363988; Wed, 22 Jan 2014 20:29:23 -0800 (PST) In-Reply-To: References: Date: Thu, 23 Jan 2014 15:29:23 +1100 Subject: Re: Case insensitive exists()? From: Chris Angelico Cc: "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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1390451367 news.xs4all.nl 2973 [2001:888:2000:d::a6]:33495 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64566 On Thu, Jan 23, 2014 at 3:24 PM, Larry Martell wrote: > I am writing something that is part of a django app, that based on > some web entry from the user, I run a query, get back a list of files > and have to go receive them and serve them up back to the browser. My > script is all done and seem to be working, then today I was informed > it was not serving up all the images. Debugging revealed that it was > this case issue - I was matching with exists(). As I've said, coding a > solution is easy, but I fear it will be too slow. Speed is important > in web apps - users have high expectations. Guess I'll just have to > try it and see. Would it be a problem to rename all the files? Then you could simply lower() the input name and it'll be correct. ChrisA