KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a long-running Python process that is generating more data than I planned for. My results are stored in a list that will be serialized (pickled) and written to disk when the program completes -- if it gets that far. But at this rate, it's more likely that the list will exhaust all 1+ GB free RAM and the process will crash, losing all my results in the process. I plan to modify my script to write results to disk periodically, but I'd like to save the results of the currently-running process if possible. Is there some way I can grab an in-memory data structure from a running process and write it to disk? I found code.interact(), but since I don't have this hook in my code already, it doesn't seem useful to me ( Method to peek at a Python program running right now ). I'm running Python 2.5 on Fedora 8. Any thoughts? Thanks a lot. Shahin
Tags (comma-separated)
Save Edits
Cancel