Re: Problem with case insensitive volumes

2009-05-06 Thread spillz
On May 5, 10:24 pm, "Gabriel Genellina" wrote: > I use this function on Windows to obtain the true case name of a file: very nice. I think the python bindings to the gnome GIO library *might* provide what I need on the linux side. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with case insensitive volumes

2009-05-05 Thread Gabriel Genellina
En Tue, 05 May 2009 12:55:13 -0300, spillz escribió: /my/path/to/usbkey/and/file everything up to "/my/path/to/usbkey" is case sensitive. only the "and/ file" is case insensitive. but my list of stored paths might include all images under "/my". thus /my/path/to/usbkey/and/file1==/my/path/to/

Re: Problem with case insensitive volumes

2009-05-05 Thread spillz
On May 5, 10:02 am, Scott David Daniels wrote: > What is so tough about something like: > > base, dirs, files = next(os.walk(dirn))  # older: os.walk(dirn).next() > current = dict((name.upper() for name in dirs + files) > ... > changed = some_name == current[some_name.upper()] > ... not so fast.

Re: Problem with case insensitive volumes

2009-05-05 Thread Scott David Daniels
spillz wrote: os;walk will tell you the correct case for each node. So if it gives you a different case than the stored form, you have your answer. Thanks, although I was hoping that wouldn't be the answer (I have to compare a LOT of files). What is so tough about something like: base, dirs

Re: Problem with case insensitive volumes

2009-05-05 Thread spillz
> os;walk will tell you the correct case for each node.   So if it gives > you a different case than the stored form, you have your answer. Thanks, although I was hoping that wouldn't be the answer (I have to compare a LOT of files). -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with case insensitive volumes

2009-05-04 Thread Dave Angel
dmoore wrote: Does anyone know of a way to get the unique pathname for files stored on FAT32 or other case insensitive drives? For example: os.path.samefile('/media/usbkey/file1.jpg','/media/usbkey/FILE1.jpg') returns True but, is there a simple way to determine whether '/media/usbkey/ file1.

Problem with case insensitive volumes

2009-05-04 Thread dmoore
Does anyone know of a way to get the unique pathname for files stored on FAT32 or other case insensitive drives? For example: os.path.samefile('/media/usbkey/file1.jpg','/media/usbkey/FILE1.jpg') returns True but, is there a simple way to determine whether '/media/usbkey/ file1.jpg' or '/media/