Hi, I am generating a file (zip or sfx) and serving it to the user like this:
fapp = FileApp(temp_exe_path) fapp.content_disposition(filename='%s' % temp_exe) return fapp(request.environ, self.start_response) if(os.path.exists(temp_exe_path)): os.remove(temp_exe_path) # raises exception that file is in use This works fine except when I want to clean up the generated file which raises a exception that it is still in use. In other web frameworks/languages the return call was blocking and I was able to delete the served dynamic file. Fapp seems to be running in a async like mode in relation to the controller. Anyone have any ideas? I was thinking of a thread that starts right after the call to fapp and sits in a loop until the file is not in use anymore. Thanks, Snorkel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
