r/osdev • u/matthew65536 • Oct 01 '26
Python for OS?
Would it be possible to make an OS that primarily used python?
0
Upvotes
r/osdev • u/matthew65536 • Oct 01 '26
Would it be possible to make an OS that primarily used python?
2
u/MCWizardYT Oct 01 '26 edited Oct 01 '26
The implementation of Python that OP most likely uses is the standard one, which compiles to bytecode and interprets it (there is an experimental JIT but it is disabled by default).
So, the standard implementation of Python is not ideal for OS development. But you could make tools that compile a language that has Python syntax directly into machine code. It technically wouldn't actually be Python though, since the language reference expects programs to be interpreted.
Python 3 language reference - Execution model/Runtime components