Latest recipes tagged "case_insensitive"http://code.activestate.com/recipes/tags/case_insensitive/new/2009-04-25T15:48:50-07:00ActiveState Code RecipesREAL case insensitive string replace (Python) 2009-04-25T15:48:50-07:00Jonas Haaghttp://code.activestate.com/recipes/users/4169206/http://code.activestate.com/recipes/576715-real-case-insensitive-string-replace/ <p style="color: grey"> Python recipe 576715 by <a href="/recipes/users/4169206/">Jonas Haag</a> (<a href="/recipes/tags/case/">case</a>, <a href="/recipes/tags/case_insensitive/">case_insensitive</a>, <a href="/recipes/tags/replace/">replace</a>, <a href="/recipes/tags/str/">str</a>). Revision 2. </p> <p>REAL case insensitive version of <code>str.replace</code> that keeps the letter case of the original expression (Doesn't only replace <code>Foo</code> and <code>foo</code> to <code>...foo...</code> but to <code>...Foo..</code> and <code>...foo...</code>).</p> Case insensitive filename on *nix systems - return the correct case filename (Python) 2008-11-25T16:27:13-08:00Campbell Bartonhttp://code.activestate.com/recipes/users/4168177/http://code.activestate.com/recipes/576571-case-insensitive-filename-on-nix-systems-return-th/ <p style="color: grey"> Python recipe 576571 by <a href="/recipes/users/4168177/">Campbell Barton</a> (<a href="/recipes/tags/case/">case</a>, <a href="/recipes/tags/case_insensitive/">case_insensitive</a>, <a href="/recipes/tags/convert/">convert</a>, <a href="/recipes/tags/filename/">filename</a>, <a href="/recipes/tags/path/">path</a>, <a href="/recipes/tags/sensitive/">sensitive</a>, <a href="/recipes/tags/windows/">windows</a>). Revision 9. </p> <p>When dealing with windows paths on a *nix system sometimes youll need to resolve case insensitive paths. While using a fat filesystem or making everything lowercase would work. this function means you can get python to take a case insensitive path and return the path with the correct case (if it exists).</p>