rtilley wrote: > Larry Bates wrote: >> How about not naming files with leading and trailing spaces on >> the Mac? Seems like a bad habit that needs breaking ;-). >> >> -Larry Bates > > Users will be users! Tell that to the guys and gals on Macs who like to > make a folder sort based on the number of spaces they've placed in the > front of the filenames :)
Sounds like you should change leading/trailing spaces to something like underlines instead of stripping them off the filename. That way you preserve the character positions, visually the filenames are very close. Problem is that underlines sort to bottom instead of to the top of a list of files. On second thought, if you replace spaces with dashes they will sort correctly, but they will look odd. Pick your poison. -Larry -- http://mail.python.org/mailman/listinfo/python-list