Michael Droettboom wrote: > Jouni K. Seppänen wrote: > >> "John Hunter" <[EMAIL PROTECTED]> writes: >> >> >> >>> On 7/10/07, Michael Droettboom <[EMAIL PROTECTED]> wrote: >>> >>> >> I'm seeing a bug on OS X, whose file system is by default >> case-preserving but not case-sensitive: >> >> 458 -> fontdictObject = self.embedTTF( >> 459 filename, self.used_characters[filename]) >> >> Here self.used_characters has a key starting with '/Users/jks/...' but >> filename is '/users/jks/...'. I'm not sure how to fix this cleanly. >> I though os.path.normcase would help, but it doesn't: >> >> >> > Thanks for that. The Ps backend has the same problem. I'll do a little > research and see what a common solution to this might be. > > I changed the code to use the file's (st_ino, st_dev) pair as a key, rather than the path. This is cached to prevent lots of little stat calls. This approach is reported to work on "Macintosh, Unix, and Windows", but I've only tested on Linux and OS-X. Please let me know if it solves your issue.
Along the way, I found an interesting discussion about why normcase does what it does on OS-X. (Summary: because file names are case sensitive on OS-X, but not the default HFS+ filesystem that Macs ship with as their System volume.) http://mail.python.org/pipermail/python-list/2006-January/360098.html Cheers, Mike ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel