Posts

Showing posts with the label Python for Beginners

Build a Simple Blog Application with Python and CustomTkinter

Image
Demo : Click Video ðŸ‘‡ðŸ‘‡ðŸ‘‡ Code : Libraries Required: cmd => pip install customtkinter import sqlite3 from tkinter import * from tkinter import messagebox import customtkinter as ctk # Database setup conn = sqlite3.connect('blog.db') cursor = conn.cursor() cursor.execute(''' CREATE TABLE IF NOT EXISTS posts (     id INTEGER PRIMARY KEY AUTOINCREMENT,     title TEXT NOT NULL,     content TEXT NOT NULL,     created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); ''') conn.commit() # Functions def create_post():     title = title_entry.get()     content = content_entry.get("1.0", "end-1c")          if title and content:         cursor.execute("INSERT INTO posts (title, content) VALUES (?, ?)", (title, content))         conn.commit()         messagebox.showinfo("Success", "Post created successfully!")         title_entry.delete...

Modern MS Paint in Python using Tkinter - Advanced Drawing App

Image
Demo : Click Video ðŸ‘‡ðŸ‘‡ðŸ‘‡ Description: Python Tkinter se apna khud ka MS Paint banao! 🖌 Yeh advanced project zaroor try karo! 🔥 Content: 🔥 Python Tkinter se MS Paint banane ka best project! Aaj hum ek Modern MS Paint banayenge Python Tkinter ka use karke. Yeh app brush, eraser, shapes, color picker, save, open aur clear canvas jaise features ke sath aata hai. Aap isse customize bhi kar sakte ho! 🎨 🚀 Features: ✔️ Brush & Eraser Tool ✔️ Rectangle, Circle, & Line Drawing ✔️ Color Picker ✔️ Save & Open Image Support ✔️ Clear Canvas Function Code : import tkinter as tk from tkinter import filedialog, colorchooser, messagebox from PIL import Image, ImageDraw, ImageTk import os class ModernMSPaint:     def __init__(self, root):         self.root = root         self.root.title("MS Paint Advanced")         self.root.geometry("1200x700")                ...