Ctrl + k

or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/ipython@9.5.x
tile.json

tessl/pypi-ipython

tessl install tessl/pypi-ipython@9.5.0

IPython: Productive Interactive Computing - An advanced interactive computing environment and command shell for Python.

Agent Success

Agent success rate when using this tile

86%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.09x

Baseline

Agent success rate without this tile

79%

task.mdevals/scenario-3/

Interactive Debugging Tool

Build a debugging utility that provides interactive Python shell capabilities for debugging applications at runtime.

Requirements

Your tool should support three main debugging modes:

1. Full Interactive Session Mode

Create a function launch_full_shell(initial_vars=None) that:

  • Launches a complete interactive Python environment
  • Accepts an optional dictionary of initial variables to inject into the shell namespace
  • Allows users to execute Python commands interactively
  • Returns control to the calling program when the user exits the shell

2. Embedded Debugging Mode

Create a function debug_here(header=None) that:

  • Drops into an interactive debugging shell at the current code location
  • Preserves all local variables from the calling scope
  • Displays an optional custom header message when the shell starts
  • Returns control to the program flow when debugging is complete

3. Shell Context Query

Create a function get_current_shell_info() that:

  • Returns a dictionary with information about the current shell environment
  • The dictionary should contain:
    • "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
  • Should work correctly whether called from within an interactive environment or from a regular Python script

Implementation

@generates

API

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
    """
    pass

Test Cases

  • launch_full_shell() successfully starts an interactive environment and initial variables are accessible @test
  • debug_here() preserves local variables when creating an embedded shell @test
  • get_current_shell_info() returns {"active": False, "type": None} when called outside an interactive shell @test
  • get_current_shell_info() returns {"active": True, "type": <shell_type>} when called inside an interactive shell @test

Dependencies { .dependencies }

IPython { .dependency }

Provides interactive shell management capabilities.

@satisfied-by