r/PythonLearning • • 2h ago

I built Pocket Editor: a portable, zero-dependency Python/Tkinter IDE with LSP autocomplete, GDB debugging, AI assistants, and LAN/tunnel team collaboration

Post image

Hey r/Python! I’ve been building Pocket Editor, a portable code editor and lightweight IDE written in Python 3.9+ and Tkinter.

The goal was to keep the core editor 100% standard library (python3 + tkinter—no Electron, no Chromium wrapper, and zero required pip dependencies just to launch), while letting you plug in full IDE workflows on demand via modular Python plugins.

Core Editor Features:

  • Fast & Portable: Split-pane editing, Command Palette (Ctrl+Shift+P), fuzzy Quick Open (Ctrl+P), atomic saves preserving BOM/newlines, 5-second crash-recovery snapshots, and a dark UI with vertical dockable plugin tabs.
  • Plugin Architecture: Drop .py files with register(api) into pocket_editor_plugins/. Plugins communicate through an event/service bus on the GUI thread while delegating heavy tasks to background workers. Includes an in-app Plugin Builder, Plugin Manager, and --safe-mode.
  • Built-in Terminal Runner: Bounded output buffer (200k chars) with full ANSI 16/256/RGB color parsing and automatic log-category highlighting (ERROR:, WARNING:, compiler file:line: patterns)—no external ANSI library required.

Optional IDE Plugins Included:

  • Python & JSON: Live background syntax diagnostics (using compile() / json in a worker without executing user code) + Black formatting.
  • C/C++ Tools: clangd LSP autocomplete, clang-format, compiler error underlines, and GDB debugging.
  • PHP Tools: Intelephense LSP completion + Prettier PHP formatting (isolated in a local tools/php Node folder so it never touches the core).
  • AI & Codex CLI: Native Google Gemini API, OpenAI/Ollama/OpenRouter/Groq/DeepSeek presets, plus a wrapper for local Codex CLI workflows.
  • Git & Team Collaboration: Visual Git client + a Team Project plugin that hosts project sync and group chat over LAN or an optional one-click cloudflared HTTPS relay using .team-invite files.
0 Upvotes

1 comment sorted by

1

u/riklaunim 2h ago

Some screenshots would be nice. "zero dependencies" approach is not always the best, as you are missing on some quality and handy third party widgets, libraries, not to mention trying to make tkinter look and feel good.