Re:Interactive shell to a running Python process
by thelastnode on Sunday December 11, 2011 @06:00PM
(#3341416)
What are the consequences of running this in production? What's the performance hit like, is it unsafe, etc.?
[ Parent
| on HN ]
Re:Interactive shell to a running Python process
by masklinn on Sunday December 11, 2011 @07:13PM
(#3341604)
> is it unsafe, etc.?
As the readme notes, it's completely unsafe if you perform any mutation operation.
As to the performance hit, I'd expect almost none when not in use for long-running processes: it spawns a thread, and that thread will then wait on a socket accept, no connection, no resources spent. You'll still be paying in memory for the server thread, but that's it (the server thread only creates two objects, an rlcompleter.Completer instance and a function).
Re:Interactive shell to a running Python process
by anonymoushn on Sunday December 11, 2011 @06:58PM
(#3341560)
We've been using rfoo to do this. It doesn't seem to impact performance when you're not using it. When you are using it, it's unsafe if you do unsafe things. We primarily use it for debugging by passively inspecting the messed-up portion of the server's state.