dynamically generating temporary files through python/cgi

Michael Hoffman cam.ac.uk at mh391.invalid
Thu Apr 28 08:10:15 EDT 2005


Michael Hoffman wrote:

> The easiest way, in my mind would be to store the files in a directory 
> according to the hour they were requested, for example, a file generated 
> between 2 p.m. and 3 p.m. today:
> 
> http://www.example.com/temp/20050428T14/d41d8cd98f00b204e9800998ecf8427e.html 

Depending on the filesystem you use, generating thousands of files in a 
single directory might be somewhat inefficient. So you might want to 
make subdirectories based on the MD5 digest instead, like this:

http://www.example.com/temp/20050428T14/d4/1d/8cd98f00b204e9800998ecf8427e.html 

-- 
Michael Hoffman



More information about the Python-list mailing list