Yes exactly. My script is used to process large data files. What got me trying to do this in the first place was that after processing maybe 20k items, the script starts to misbehave (well, at least, it stops updating the summary text like it should...) so I wanted to embed pdb to have a look whats going on, but I didn't want to terminate the processing either. Then I though, while I'm at it, why not add in a number of commands (such as printing memory usage details like buffer sizes and such).
At first I thought Ctrl-C would be the simplest way to drop into a menu, but of course it turns out I was wrong :-D A thread would work and might be what I'll use if I still need the original functionality. Telnet connectivity would be pretty awesome, but overkill for this particular app. 2009/1/5 Michael Twomey <[email protected]>: > > True, I'd forgotten about this completely. If you have a main loop > which dispatches calls to functions then you can handle the exception > in the function call, optionally poke at with a debugger and then > continue on with the main loop (having let that individual call fail). > There's a certain level of complexity which can creep in for a > decreasing amount of payoff though :) > > For maximum hairiness and fun I'd recommend looking at embedding a > command loop which you can telnet into. Much more fun (look at > twisted's manhole for an example). > > mick > > > > -- Daniel Kersten. Leveraging dynamic paradigms since the synergies of 1985. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Python Ireland" 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.ie/group/pythonireland?hl=en -~----------~----~----~----~------~----~------~--~---
