Generating filesystem paths from a fixed string It's clever, but makes me vomit a little:

file = '0123456789abcdef123'

path = os.sep.join([ file[ x:(x+2) ] for x in range(0,5,2) ])
Is there are reason you're not just doing:

path = os.sep.join([file[0:2], file[2:4], file[4:6]])


I think that my version is a little easier to parse (as a human), but if you need to extend the number of groups, your code is more extensible.

Edit: and if we're looking for things that are easy to read but not necessarily the best way to do it...

slash = os.sep
path = file[0:2] + slash + file[2:4] + slash + file[4:6]