Skip to content
This repository was archived by the owner on May 5, 2024. It is now read-only.

how pythonicOS works

Charlie edited this page Jun 2, 2023 · 4 revisions

how pythonicOS works

since pythonicOS is built ontop of C, python the linux kernel and the GRUB bootloader it is a little more complicated than just a python script.

when you start PythonicOS it will start the bootloader which will start the kernel which will start the python script.

the python script will then start the GUI and the terminal.

the python script in question is the main.py file.

the main.py file contains the print statements that are displayed in the terminal to welcome people to pythonicOS, it also starts any drivers that may be required for the system to run.

if there ever is a problem with the main.py file on boot, it will print a statement to the screen or show a error window with Tkinter.

the main.py file also contains the code to start the GUI.

the GUI is made with Tkinter and is a simple GUI with a few buttons and a text box.

the GUI is used to start the terminal and the file explorer.

the terminal in question is the shell.py script.

the shell.py script is a simple terminal that can run python scripts and bash scripts.

it's main purpose is to allow editing the system files and running python scripts.

since the shell.py script is a python script it can be edited to add more features.

but be carefull not to break the shell script otherwise you cant edit anything and you will have to reinstall pythonicOS.

PythonicOS is not compiled into a ISO file like most operating systems, it is a python script that is run by the GRUB bootloader.

when you install pythonicOS from the Repository, it comes with a build.py script that allows you to build the pythonicOS scripts into a bunch of files that can be run on windows for testing and development.

at somepoint i want to port a web browser over to allow you to use https://Vscode.dev to edit the pythonicOS files right on the system.

on the other hand, when you want to connect the main pythonicOS script to your scripts, wether it be java or c++, you can use the pythonicOS API to connect your scripts to the main pythonicOS script.

the API in question is the file named towii.py

towii is the main lan communacation driver for pythonicOS as most of the file contains the socket.socketpair() function.

socket.socketpair() isnt a great way of communication but it works for now as debugging it is great.

when we where developing pythonicOS we had a few problems with the socket.socketpair() function as it wouldnt work on some systems. whe then tried to open a virtual serial port and use that to communicate between the scripts but that didnt work either. so we went back to using socket.socketpair() and it worked as when we origonaly called it, we left out some arguments and because of that it wouldnt work.

hey! how are you?

welcome to the forum! hope your having a great time!

Clone this wiki locally