On Sat, Sep 25, 2010 at 1:36 AM, James Y Knight <foom at fuhm.net> wrote: > > An OSX code sketch is available here (summary: call FSPathMakeRef to get an > FSRef from a path string, then FSRefMakePath to make it back into a path, > which will then have the correct case). And note that it only works if the > file actually exists. > > > http://stackoverflow.com/questions/370186/how-do-i-find-the-correct-case-of-a-filename > > It would indeed be useful to have that be available in Python. > There is a much simpler way: >>> from Carbon import File >>> File.FSRef('/tmp/foo').as_pathname() '/private/tmp/Foo' Note that this is much slower compared to os.path.exists. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20101003/9c2faae1/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4