tessl install tessl/pypi-ipython@9.5.0IPython: 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%
Build a code execution logger that tracks and logs all code executed in an IPython session, including execution timing and success/failure status.
Your logger should:
The logger should automatically activate when imported and integrate seamlessly with the IPython shell without requiring manual setup by the user.
@generates
def get_execution_log():
"""
Retrieves the execution log.
Returns:
list: List of dictionaries, each containing:
- 'execution_count': int, the execution number
- 'code': str, the executed code
- 'start_time': float, timestamp when execution started
- 'end_time': float, timestamp when execution ended
- 'duration_ms': float, execution duration in milliseconds
- 'status': str, either 'success' or 'error'
"""
pass
def display_log():
"""
Displays the execution log in a formatted, human-readable way.
Shows execution count, duration, status, and code snippet for each entry.
"""
pass
def clear_log():
"""
Clears all entries from the execution log.
"""
passx = 1 + 1) creates a log entry with status 'success' @test1 / 0) creates a log entry with status 'error' @testProvides interactive shell and event hook capabilities for tracking code execution.
@satisfied-by