- Регистрация
- 1 Мар 2015
- Сообщения
- 1,481
- Баллы
- 155
If you’ve been coding in Python for a while, you’ve likely fallen into a trap:"The future isn’t just about AI writing code. It’s about AI showing us parts of Python we’ve ignored for years."
You Google the same things.
You pip install the same libraries.
You forget the built-in ones.
But then I asked ChatGPT a weird question:
What followed was a journey. One that took me through dusty corners of http.server, asyncio, sched, collections, dataclasses, and more—modules that have quietly gotten upgrades but remain tragically underused.“What can I build using only Python’s standard library that feels futuristic?”
And guess what? GPT loves this stuff. It will build weird, brilliant tools using only what’s already inside your Python install.
? The Challenge: Build 5 Useful Tools Using Zero External Libraries
This became a game for me.
? Rule: No pip installs.
Just use what comes in the box.
I gave GPT five prompts. Here's what it built—and what you can learn from them.
1. ? Local File Explorer Over HTTP (No Flask)
Prompt:
Result:“Serve the current folder over HTTP with clickable file links. Don’t use Flask.”
GPT whipped up a working file server using http.server and some basic HTML templating.
import http.server
import socketserver
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORT), Handler) as httpd:
print(f"Serving at :{PORT}")
httpd.serve_forever()
? What you learn:
- http.server is criminally underrated for local tools.
- Combine it with os and you can build dashboards, image browsers, or PDF previewers.
2.info: Add --cgi flag to enable running .py files like old-school CGI scripts.
Prompt:
GPT combined sched, smtplib, and email.message.“Create a scheduler that runs a job every 30 minutes and emails me a summary.”
import sched, time, smtplib
from email.message import EmailMessage
scheduler = sched.scheduler(time.time, time.sleep)
def send_email():
msg = EmailMessage()
msg.set_content("This is your 30-minute task update.")
msg["Subject"] = "Task Alert"
msg["From"] = "you@example.com"
msg["To"] = "target@example.com"
with smtplib.SMTP("localhost") as s:
s.send_message(msg)
scheduler.enter(1800, 1, send_email)
scheduler.enter(0, 1, send_email)
scheduler.run()
? What you learn:
- sched is simpler than cron, cross-platform, and easy to embed.
- You can build cron alternatives or personal email bots.
3. ?️? Use services like Mailgun or SendGrid with an API key instead of localhost.
Prompt:
import os, time“Scan a folder and list all files that haven’t been modified in 6 months.”
cutoff = time.time() - 6 * 30 * 24 * 60 * 60 # 6 months
for f in os.listdir("."):
if os.path.isfile(f):
mtime = os.path.getmtime(f)
if mtime < cutoff:
print(f)
? What you learn:
- os.path.getmtime() + time.time() = powerful file intelligence
- Could be extended into a cleanup wizard
4. ? Build a Tiny JSON Database? Pro tip: Wrap this into a CLI using argparse and add a --delete flag with confirmation.
Prompt:
import json, sys, os“Create a JSON-based database to store key-value pairs via CLI.”
DB_FILE = "db.json"
def load():
return json.load(open(DB_FILE)) if os.path.exists(DB_FILE) else {}
def save(data):
with open(DB_FILE, "w") as f:
json.dump(data, f)
cmd, *args = sys.argv[1:]
data = load()
if cmd == "get":
print(data.get(args[0], "Not found"))
elif cmd == "set":
data[args[0]] = args[1]
save(data)
print("Saved.")
elif cmd == "delete":
data.pop(args[0], None)
save(data)
print("Deleted.")
? What you learn:
- No need for SQLite or Mongo for basic tasks
- Perfect for quick automations and prototyping
Prompt:
import os, time“Check internet connection every 10 seconds and play a sound if offline.”
while True:
status = os.system("ping -c 1 8.8.8.8 > /dev/null 2>&1")
if status != 0:
os.system("afplay /System/Library/Sounds/Basso.aiff") # Mac sound
time.sleep(10)
? What you learn:
- Combine shell commands + Python for powerful system tools
- You can extend this to reboot modems, log downtimes, etc.
Most developers race to install external packages. But many of your daily needs are already solved in the standard library—you just forgot.
What GPT gives you is a new way to see the old tools. A fresh set of eyes on a 30-year-old language.
? Want More Curated Tools Like This?"GPT doesn’t just write code. It reminds you how powerful Python already is."
Visit – a playground for power users who want to build smarter, faster:
- ?
- ?
- ?
- ?
? Final Thoughts: Use GPT as Your Python Tour GuideBookmark it now:
Here’s the real takeaway:
Don’t just use GPT to write code you already know.
Use it to show you code you’ve never seen.
Next time you open your terminal, try this:
or“Show me how to use Python's contextlib to build a resource manager.”
Let AI lead. Let curiosity follow.“Can I build a Slack bot using only http.client?”
And always, always peek inside the box before reaching for pip.
? 10 Awesome Courses You’ll Actually Enjoy
If you're the kind of person who likes peeling back the layers of computing, tech history, and programming weirdness—these curated learning kits will absolutely fuel your curiosity.
Each is a self-contained, text-based course you can read, study, or even remix into your own learning journey:
- ?
- ?️
- ?
- ?️
- ?
- ?
- ?
- ?
- ?
? Each one is packed with insights, stories, and lessons—great for developers, tech writers, and anyone fascinated by the hidden history and culture of tech.
? Featured Learning Kit
Here’s one course you shouldn’t miss:
You know Windows. You know Linux. Now meet the OSes they don’t want you to touch.Most people only ever interact with a sanitized surface. But behind the curtain lives a wild ecosystem of forgotten, forbidden, and experimental operating systems—built by rebels, tinkerers, and visionaries.Explore: Mythical and misunderstood: TempleOS, SerenityOS, Plan 9, BeOS, AmigaOS, SkyOS. Security-first outliers: Qubes OS, Genode, Redox, SeL4, Singularity, Barrelfish. Retro-futurist visions: NeXTSTEP, MINIX, Haiku, DR-DOS, CP/M, GEOS, MorphOS. Research lab relics: Multics, TENEX, Mach, Fuchsia, Exokernel, Amoeba, Spring. Stripped-down madness: MenuetOS, KolibriOS, Inferno, Phantom OS, A2, ToaruOS. Embedded + real-time beasts: FreeRTOS, ChibiOS, Contiki, TinyOS, HelenOS. These aren’t just alt-OSes. They’re alt-realities.If you’ve ever wondered what computing could look like if it weren’t monopolized—this is your underground tour.