PythOS
- 6 Devlogs
- 42 Total hours
A Linux distro written almost completely in Python!!
A Linux distro written almost completely in Python!!
Alright. So in the past 8 hours, I’ve been working on the KMSDRM rendering for PythOS’ desktop. Since all apps will be called via standard execve, functions inside cannot be called directly from the main server. That’s where IPC comes in. Like GNOME, it pygui acts as a server that handles the custom made apps that contains the GUI APIs, and performs a communication back and forth to render the apps. The process is NOT easy, and got my brain frying.
In this 6 hours’ work, I’ve added a handle to the windows for the user to drag them.
Various APIs were also added, such as buttons, text and images.
There is one more useful feature: window focusing. When multiple windows are added, you can focus on them by clicking on them just like normal OSes.
In this 11 hours (shows 10 hours because of the limit of devlogs), I’ve worked on framebuffering with PyGame, it was kinda painful trying to learn writing GUI in a completely different language, but it’s kinda worth it and enjoyable :)
Also the theme of the GUI is based on Windows 98
After rewriting code for 7 hours and building the ISO file for more than 5 hours, I have finally built a bootable PythOS ISO file!!!
What I have rewritten, was pysh.py to optimize the shell.
I’ve also fixed a TypeError of PosixPath + str in ls.py.
How the OS works:
How to dualboot:
(for Windows users. Skip if you know how to dualboot Linux, but please do not ignore step 6 when flashing):
Prerequisites:
Rufus (download from here)
PythOS ISO (download from the releases page)
A USB (at least 200MB)
Steps:
NOTE:
If your computer uses legacy BIOS instead of UEFI, I’m sorry… I’ll be adding BIOS support very soon tho :)
Other architecture builds of the OS will be released very soon. The current supported arch is x86_64 (64-bit)
P.S. You might be wondering if you’ll need to type in “.py” for running my scripts in bin, you don’t. Simply type in the command without .py, it’ll be good to go. Of course you CAN type in .py if you want, but it would basically be your choice mate
In this ~4.5 hours, I’ve added many commands to PythOS:
clear, date, ls, mkdir, touch, uname
And the most amazing thing I’ve done, is adding arguments and options :).
I do think that this project can let me learn a LOT more about Python, Linux and low-level things
I’ve relaunched the project PythOS, a Linux distro but almost fully written in Python.
Instead of relying on init systems like BusyBox, it uses bare-minimum components:
a Linux kernel, musl library, Python library, and my own Python runtime (init systems are written by me in C)
I’ve actually worked on a project like this, also a Linux distro written in C, but back then, the distro relied on Alpine Linux as a base system.
This time I’m actually trying to create the Linux distro myself :)
The image I’ve uploaded is a preview of the shell. It’s still run on my Linux VM as it’s not built into a system yet.