Skip to main content

An IDLE-like debugger to allow for real-time command injection for debugging and testing python code

Project description

Live Interactive Python Console

You can finally test your code in real time without using idle!

A fully-featured, live Python console GUI built with CustomTkinter and Tkinter, featuring:

  • Python syntax highlighting via Pygments

  • Autocomplete for keywords, built-ins, and local/global variables

  • Thread-safe execution of Python code

  • Output capturing for stdout and stderr

  • Multi-line input with auto-indentation

  • Clickable history of previous commands

Features

Syntax Highlighting

  • Real-time syntax highlighting using Pygments and the Monokai style.

  • Highlights Python keywords, built-ins, and expressions in the console.

Autocomplete

  • Suggests keywords, built-in functions, and variables in scope.

  • Popup list appears after typing at least 2 characters.

  • Only inserts the missing portion of a word.

  • Navigate suggestions with Up/Down arrows, confirm with Tab/Return.

Multi-Line Input

  • Supports Shift+Enter for inserting a new line with proper indentation.

  • Automatically detects incomplete statements and continues the prompt.

Thread-Safe Execution

  • Executes user code in a separate thread to prevent GUI freezing.

  • Captures both stdout and stderr output and prints them in the console.

  • Supports both expressions (eval) and statements (exec).

Clickable History

  • Hover previous commands to see them highlighted.

  • Click to copy them back to the prompt for editing or re-execution.

Easy Integration

  • Automatically grabs caller frame globals and locals if not provided.

  • Can be used standalone or embedded in larger CustomTkinter applications.

Installation

pip install customtkinter pygments

Tkinter is included with Python on most platforms.

Usage

from liveConsole import InteractiveConsole
InteractiveConsole().mainloop()
  • Type Python commands in the >>> prompt and see live output.

Keyboard Shortcuts

Key Action
Enter Execute command (if complete)
Shift+Enter Insert newline with auto-indent
Tab Complete the current word / show suggestions
Up/Down Navigate suggestion list
Escape Hide suggestions
Mouse Click Select previous command from history

Customization

  • Appearance mode: Dark mode is default (ctk.set_appearance_mode("dark"))

  • Font: Consolas, 12pt by default, configurable in InteractiveConsoleText constructor

  • Syntax Highlighting Style: Change Pygments style by modifying get_style_by_name("monokai")

License

MIT License – free to use, modify, and distribute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

liveconsole-1.0.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

liveconsole-1.0.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file liveconsole-1.0.0.tar.gz.

File metadata

  • Download URL: liveconsole-1.0.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for liveconsole-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bf11c191b0f09da000eba7e75fc2f84b5a6485b15aaf3592999fc5fe8a867c57
MD5 0a25e4bbd6ace031bc757f46ceaa63e1
BLAKE2b-256 9d6d81c58c2a1c9785531991841fb5249d3fd756c1602595050353e9c19d0ce2

See more details on using hashes here.

File details

Details for the file liveconsole-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: liveconsole-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for liveconsole-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 601e5db6b6eb24a9cb2e35813b18097f7f7376723f07dda146ed2353c982e743
MD5 54dfb7d32f5044b8c71d96398d805e82
BLAKE2b-256 4ffd80a55a70e1a5d8c1f75833629b486d776c92b6f7af10b13fc0d6ffe9f1e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page