u/Junior-Sock8789

▲ 47 r/Tkinter

IDOL - Python IDE/GUI Designer

I just started working on a Python IDE built towards beginners. Thanks for checking this out, i'm building this to try to get back into programming myself. Figured the best way to learn all the features of an IDE is build one yourself. This is pure python built using Tkinter.

Roadmap:
notepad-ide/ROADMAP.md at master · celltoolz/notepad-ide

Project:
celltoolz/notepad-ide: A full Python IDE & GUI Designer with professional-grade tools

u/Junior-Sock8789 — 5 days ago

[Challenge] Can you "Senior-ify" this 30-line Python script?

I’ve written a basic Library Manager that works perfectly fine, but it’s full of "code smells."

The Goal: Refactor this into something production-ready while keeping the logic simple. I'm looking for improvements in modularity, error handling, and Pythonic best practices. How would you handle the file I/O and the branching logic?

import json

def manage_library(action, data):
    if action == "add":
        try:
            f = open("books.txt", "a")
            f.write(data['title'] + "," + data['author'] + "," + str(data['year']) + "\n")
            f.close()
            print("Book added!")
        except:
            print("Error")
    elif action == "list":
        try:
            with open("books.txt", "r") as f:
                lines = f.readlines()
                for line in lines:
                    t, a, y = line.split(",")
                    print(f"Title: {t}, Author: {a}, Year: {y.strip()}")
        except FileNotFoundError:
            print("No books found.")

    elif action == "search":
        f = open("books.txt", "r")
        for line in f:
            if data.lower() in line.lower():
                print("Found: " + line)
        f.close()

# Example usage
manage_library("add", {"title": "The Great Gatsby", "author": "F. Scott Fitzgerald", "year": 1925})
manage_library("list", None)
reddit.com
u/Junior-Sock8789 — 5 days ago

I just started working on a Python IDE built towards beginners. Plan to eventually add learning modules. Thanks for checking this out, i'm building this to try to get back into programming myself. Figured the best way to learn all the features of an IDE is build one yourself 😉
Features:

  • Editor
  • GUI Designer
  • Breadcrumb Bar
  • Intelligence (LSP)
  • Navigation & Search
  • Split Editor
  • Git Integration
  • Terminal & Output
  • Debugger
  • AI Chat (Ollama qwen2.5-coder fully offline)
  • Package Manager
  • Learning Mode
  • Plus More...

Daily Commits! Just dropped the GUI Designer, have tons more to add to it including a components panel for things like:

  • threading.Timer — probably the most requested (periodic callbacks)
  • socket — basic TCP client/server skeleton
  • sqlite3 — connection + cursor setup with a simple query helper
  • smtplib / email — send-mail skeleton
  • csv / json — file read/write helpers
  • tkinter.filedialog / colorchooser

 

celltoolz/notepad-ide: A full Python IDE & GUI Designer with professional-grade tools

u/Junior-Sock8789 — 14 days ago