IPython: Productive Interactive Computing - An advanced interactive computing environment and command shell for Python.
86
Build a debugging utility that provides interactive Python shell capabilities for debugging applications at runtime.
Your tool should support three main debugging modes:
Create a function launch_full_shell(initial_vars=None) that:
Create a function debug_here(header=None) that:
Create a function get_current_shell_info() that:
"active": boolean indicating if running inside an interactive shell"type": string with the shell type name (e.g., "InteractiveShell", "TerminalInteractiveShell") or None if not in a shell@generates
def launch_full_shell(initial_vars=None):
"""
Launch a full interactive Python shell with optional initial variables.
Args:
initial_vars: Optional dictionary of variables to make available in the shell namespace
"""
pass
def debug_here(header=None):
"""
Drop into an interactive debugging shell at the current code location,
preserving local scope.
Args:
header: Optional header message to display when the shell starts
"""
pass
def get_current_shell_info():
"""
Get information about the current shell environment.
Returns:
dict: Dictionary with 'active' (bool) and 'type' (str or None) keys
"""
passlaunch_full_shell() successfully starts an interactive environment and initial variables are accessible @testdebug_here() preserves local variables when creating an embedded shell @testget_current_shell_info() returns {"active": False, "type": None} when called outside an interactive shell @testget_current_shell_info() returns {"active": True, "type": <shell_type>} when called inside an interactive shell @testProvides interactive shell management capabilities.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-ipythondocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10