Gregory (Grisha) Trubetskoy
grisha at modpython.org
Wed Jun 2 15:56:15 EDT 2004
On Wed, 2 Jun 2004, Eric Walstad wrote: > req.register_cleanup() looks like a good match. I doubt I would have ever > found register_cleanup on my own! Do you have any tips on how to tell when > the cleanup process has completed? I'm currently checking for the existence > of the generated iso file, but there's a brief period where the file exists > (os.path.exists) but has not been completely written yet. That's probably > not a problem, but might be if I try to stream the file to the client while > it's being written by mkisofs (that's my next hurdle). Checking > os.path.exists just feels like a bit of a hack, that's all. Any thoughts? Probably the easiest thing would be to write to a temporary file name and rename it when its done. Grisha
|