On May 5, 10:02 am, Scott David Daniels <scott.dani...@acm.org> 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. :) Consider:

/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/usbkey/and/FILE1
/my/path/to/usbkey/and/file1==/my/path/to/usbkey/AND/FILE1
but
/my/path/to/usbkey/and/file1!=/my/path/TO/usbkey/AND/FILE1

so to do this right I'd need to establish which parts of the path are
case insensitive. being able to retrieve the actual path from an
equivalent representation would be so much simpler.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to