Python programmers love a challenge, so I thought I would throw this one to the lazyweb.
I have an app that generates a large sequence of files, the nature of which is unimportant. What is important is generating a location to store them. To keep the directory structure manageable there should be no more than 100 files plus sub-directories in any given directory. For instance if there are 99 files in a directory, then there is only room for one more file or a directory -- bringing the total to 100. There is an additional requirement that the directory structures should be as flat as possible, i.e.
foo/bar for the nth item is preferable over
foo/bar/baz. To summarize the requirements: continue reading…