-
Notifications
You must be signed in to change notification settings - Fork 2
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 scripts.
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.
noaw that we have fixed the problem with the socket.socketpair() function we can use it to communicate between the scripts.
see the-PythonicOS-API.md for more information on how to use the API.
the API is a simple way to communicate between the scripts and the main pythonicOS script.
do note that the API is not a great way to communicate between the scripts and the main pythonicOS script as it is not very secure and it is not very fast.
also that the pydata1 socket is used for reciving data from the main pythonicOS script and the pydata2 socket is used for sending data to the main pythonicOS script. please keep those in mind when using the API to make sure that you dont get confused and that you dont break the API and the Operating system.
i hope that i can make the API better in the future and update the API to make it more secure and faster. aswell as the wiki to make it more clear on how to use the API and how to use the operating system.
if you have any questions about the API or the operating system, please contact us using the issues tab on the github repository and the discord server linked at the bottom of the readme.md file.
thank you for reading this wiki and i hope that you have a great day.