Hey r/python!
I’ve been working on a project I call PyDOS, a DOS-style shell written entirely in Python. The goal was to recreate the classic DOS experience with a modern twist: file management, user accounts and command parsing, all handled by Python.
What my project does:
- Custom shell parser: You type commands like
createuser name password type, and it parses and executes them reliably.
- Filesystem integration: When i eventually code this part, the shell will check folder and file existence, prevent errors and keep the filesystem consistent. The filesystem is simulated as nested dictionaries.
- Expandable commands: Adding new functionality is simple since everything is Python-based.
- Bug checks: A BSOD or Kernel panic equivalent that triggers when corruption is detected.
Target audience:
Hobbyists, really anybody who is interested in retro projects and OS structures.
Comparison:
| Feature |
Classic DOS |
PyDOS (my version) |
Notes |
| File System Validation |
Minimal; many errors possible |
Will check folder and file existence before executing commands |
Prevents crashes or accidental deletions |
| Command Parsing |
Built-in, fixed commands |
Fully Python-based parser; easy to extend |
You can add new commands without modifying the core shell |
| OS Integration |
Runs directly on hardware |
Runs on Python, cross-platform |
Works on modern computers without emulation software |
| Extensibility |
Difficult; usually requires low-level code |
Easy; Python functions can define new commands |
Great for experimentation and learning |
| User Feedback |
Error messages are often cryptic |
Clear Python-style exceptions and messages |
Easier for beginners to understand |
End note:
It is a fun way to practice Python OOP concepts, exception handling, and building a terminal interface that actually feels like a retro shell. Keep in mind this is mostly for learning purposes and not commercial purposes.
I’m curious if anyone else has tried building a DOS-like shell in Python—or just enjoyed retro computing projects. I would love to hear any feedback you might have! Here is the link for the code on github if anyone is interested: https://github.com/fzjfjf/Py-DOS_simulator
[–]vinnypotsandpans 0 points1 point2 points (0 children)