Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you have access to the program's source-code, you can add this functionality relatively easily. </p> <p>See <a href="http://code.activestate.com/recipes/576515/">Recipe 576515</a>: <code>Debugging a running python process by interrupting and providing an interactive prompt (Python)</code></p> <p>To quote:</p> <blockquote> <p>This provides code to allow any python program which uses it to be interrupted at the current point, and communicated with via a normal python interactive console. This allows the locals, globals and associated program state to be investigated, as well as calling arbitrary functions and classes.</p> <p>To use, a process should import the module, and call listen() at any point during startup. To interrupt this process, the script can be run directly, giving the process Id of the process to debug as the parameter.</p> </blockquote> <hr> <p>Another implementation of roughly the same concept is provided by <a href="http://code.google.com/p/rfoo/">rconsole</a>. From the documentation:</p> <blockquote> <p>rconsole is a remote Python console with auto completion, which can be used to inspect and modify the namespace of a running script.</p> <p>To invoke in a script do:</p> </blockquote> <pre><code>from rfoo.utils import rconsole rconsole.spawn_server() </code></pre> <blockquote> <p>To attach from a shell do:</p> </blockquote> <pre><code>$ rconsole </code></pre> <blockquote> <p>Security note: The rconsole listener started with spawn_server() will accept any local connection and may therefore be insecure to use in shared hosting or similar environments!</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload