15
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 09 Jan 2025
15 points (74.2% liked)
Programming
17765 readers
365 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 2 years ago
MODERATORS
I think it is best to have some understanding of how an OS works, and how Python works, before asking whether you can write an OS in Python.
Python is basically a scripting wrapper around a bunch of C functions ("builtins") and there are means of installing additional C functions if you need them. Without any of the builtins, you really can't do much of anything. For example, "print(2+2)" computes the string "4" (by adding 2+2 and converting the result to decimal), then calls a builtin to actually print the string on the console.
For an OS, you will need quite a few more C functions, mostly to control timers and task switching, the main functions of an OS. Given enough C functions though, in principle you can write an OS.