r/PythonLearning • • 5d 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.
1 Upvotes

4 comments sorted by

1

u/riklaunim 5d 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.

1

u/Chemical_Plum_collab 3d ago

Thanks for the constructive feedback! I agree that zero dependencies isn't always the best approach, especially when it comes to UI quality and advanced widgets.

The main idea behind Pocket Editor is to keep the core lightweight, portable, and independent while providing an extensible plugin architecture. Plugins can use third-party libraries whenever needed, without forcing every user to install unnecessary dependencies.

The goal isn't to avoid external libraries at all costs, but to give users the freedom to decide what features and dependencies they need.

I also agree that Tkinter's appearance could be improved. I'll share some screenshots to better demonstrate the editor and its capabilities.

I really appreciate your suggestions!

1

u/riklaunim 3d ago

Fast and portable may not be for Python when it comes to big desktop apps, but at the same time no-binary can help with macOS ban on sideloading etc. There is a wide range of IDEs already available so you are entering a category with many competitors. And "next gen" IDEs like Orca aren't even about classical code writing features, things are moving really quickly.

1

u/Chemical_Plum_collab 3d ago

I agree that the IDE landscape is evolving rapidly, and there are already many excellent alternatives.

However, Pocket Editor isn't intended to compete directly with large IDEs. The idea is to provide a lightweight, modular, and customizable editor where plugins can extend its capabilities and communicate with each other while keeping the core simple.

I'd really encourage you to give Pocket Editor a try before judging its potential. I'd be interested to hear your feedback after experiencing its architecture, performance, and plugin system firsthand.

It's an open-source project, and constructive feedback like yours is always welcome. Thanks for sharing your perspective!