Is it possible to write a full blown operating system (such as Linux) in Python? I mean writing a kernal, and then other applications that the kernal calls, without having Windows, Linux, UNIX, or Macintosh OS installed on your computer?

Veena S commented: If interested in blockchain programs , please write to veena@emurgo.io +0

Yes, there is a devlopment of a full featured GUI Operating System written in Python under the name Unununium (wouldn't be my choice), nicknamed after the 111th chemical element 'Roentgenium', whose temporary IUPAC name until November 2004 was 'Unununium'. See:
http://en.wikipedia.org/wiki/Unununium_(operating_system)

the link doesn't work

The info on the links is not encouraging: "very little code was written in 2005, and 2006 doesn't look much better." Hmm...

My mildly informed $0.02, for the purpose of generating lively discussion: I don't think a true OS can be written in Python, for the following reason: Python requires memory management to work behind the scenes. But, memory management requires an OS or a virtual machine to keep track of which memory blocks are stale and need to be garbage-collected. Hence, Python will always be dependent on an OS in order to function, even if the Python code is turned into C and thence into an executable.

Agree? Disagree?

Jeff

According to my engineering professor, the reason there is a variety of computer languages is that each language (at least the popular once) was written for a purpose. Python was not written to make Operating Systems, but C was (for Unix). So it would be a little silly to use Python.

This should be worth a wooden nickel, I understand UUU uses C for the low level stuff and Python for the Windoze stuff. This way the memory manager should not be much of an obstacle. Will it ever get off the ground? I don't know.

I have the hunch that C had to rely on a bit of assembly code when the Unix OS was written.

I have the hunch that C had to rely on a bit of assembly code when the Unix OS was written.

Yep.

Sure Python requires memory management, but if you provide a bare-metal type OS beneath the interpreter, somewhat like how BIOS provides a compatibility layer, then you could set out to write an OS that's extremely heavily implemented with Python. Still, doing so would require an intimate understanding of the plumbing of the Python Interpreter.

If one could develop this compatibility layer with a regard to cross-platform support, if implemented thoughtfully, then for each distinct architecture, one would have to write the lowest-level support layer and then could import most/all functionality of the rest of the system. At least, in the general case. Developing something like this would completely rock.

Sure Python requires memory management, but if you provide a bare-metal type OS beneath the interpreter, somewhat like how BIOS provides a compatibility layer, then you could set out to write an OS that's extremely heavily implemented with Python. Still, doing so would require an intimate understanding of the plumbing of the Python Interpreter.

If one could develop this compatibility layer with a regard to cross-platform support, if implemented thoughtfully, then for each distinct architecture, one would have to write the lowest-level support layer and then could import most/all functionality of the rest of the system. At least, in the general case. Developing something like this would completely rock.

In extreme programming, there is a useful paradigm: you aren't gonna need it. That's probably the best thing to say about your python OS: you aren't gonna need it. So if you want to develop something, do something useful instead :)

(see also this link)

In extreme programming, there is a useful paradigm: you aren't gonna need it. That's probably the best thing to say about your python OS: you aren't gonna need it. So if you want to develop something, do something useful instead :)

(see also this link)

Generally I'd totally agree, but this isn't a pragmatic discussion. XP is awesome for balancing resources to get immediate results. But in the major long run, additional more structured design paradigms shine.

Here's one of my favorite sayings. "Can it be done? Yes. Will it be done? No." I don't think it's necessary.

In the end all your computer understand is machine code, it does not care if you used C, Assembly, Java, python or qbasic.

The main problem with making a OS in python, is that it need alot of conversion to turn to machine code and that takes time crucial for function that must be performed in a fraction of second. Speed is the main issue.

I think that projects like Cython, can take python closer to that direction.

http://www.cython.org/

What Cython does is that it permits you to write pure python code but also use C/C++ features like static typing , pointers , manual memory management etc. to boost speed up to C speed . Then code is automatically converted to c code which can be compiled like any c code. Benchmarks on Cython show that it perfromes from 30% slower than C to 30% faster (more often slower though).

And Cython is not the only thing, it comes from Pyrex. And for those that have been using Puppylinux they may have heard of Genie , a python kind of language that is compiled.

http://puppylinux.org/wikka/ValaGenieintro

Genie like Vala are children of the gnome framework

http://live.gnome.org/Genie

So it seems that there surely motivation.

The question remains of course why we need a python OS ... I think that has been already answered with Linux Because it much easier to maintain and write code for. In Linux python started for very simple scrips and now moves to lower and lower levels , slowly but progressively.

And the fact that projects like Cython are supported by mighty companies like Google. Its clear that loads of programmers do want to replace C with python . Its not a easy task , it wont happen tomorrow, but it certainly move toward this direction.

Its no longer a question if it will happen , it is a question of when it will happen.

ARE YOU DEAD?

commented: "How much?" "Nine Pence." "I'm not dead!" +16
commented: I think I'm feeling better. +15
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.