473,405 Members | 2,279 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Python Operating System

Although I know for a fact that an Operating System can be written in
Python, I need to ask some questions to the more advanced users of
Python.

Uuu and Cleese are two operating systems that were / are written in
Python. Does anyone use them? If so, how do they function / feel? Do
they have a graphical mode and a command line mode, such as Linux does?

How hard would it be to write a full blown bootable operating system in
Python? With a command line and a GUI in all? Would the books you see
on the shelves at, say, Barnes and Noble, do the trick? Or do you need
to dig deeper into the language than what is taught in the 1,000 page
books?

Thanks in advance, and I am truly sorry if this has been a discussion
before in this group!

-- Alex (PythonUsr)

Dec 10 '06 #1
3 2382
PythonUsr schrieb:
Although I know for a fact that an Operating System can be written in
Python, I need to ask some questions to the more advanced users of
Python.

Uuu and Cleese are two operating systems that were / are written in
Python. Does anyone use them? If so, how do they function / feel? Do
they have a graphical mode and a command line mode, such as Linux does?

How hard would it be to write a full blown bootable operating system in
Python? With a command line and a GUI in all? Would the books you see
on the shelves at, say, Barnes and Noble, do the trick? Or do you need
to dig deeper into the language than what is taught in the 1,000 page
books?
There are limits to what Python can do as a language for OS development.
For example, Python has no notion of pointers and thus makes
writing interrupt routines impossible, which are the base for nearly all
lower level OS tasks like IO-drivers, memory virtualization and the like.

What these projects are more like is a bootable interpreter on a minimal
OS kernel. At least in my book that doesn't count as an operating
system, but here definitions might vary. Yet it certainly isn't a
general purpose OS, as no binary interfaces to OS services are defined
that would make calls from other languages into the OS possible.

In other words: IMHO, it is _not_ possible to write an OS in Python, at
least not if OS is understood the way current OSses work. And even if
the definition is stretched, there is a more than fair amount of work
that needs to be done in other languages, most likely C - either because
Pyhon isn't capable of doing them at all, or just not fast enough to do
them proper.

Regarding the books to read: this kind of programming isn't so much
about the details of python, albeit some of its inner workings like the
GIL put up quite a few hurdles for the aspiring OS programmer, but of OS
concepts and designs. Which is a field Andrew Tanenbaum has earned quite
a few merits, so I guess his book could be a starter:

http://vig.prenhall.com/catalog/acad...429388,00.html

Diez
Dec 10 '06 #2
Diez B. Roggisch wrote:
Python has no notion of pointers
See:

http://docs.python.org/lib/module-ctypes.html

In particular:

http://docs.python.org/lib/ctypes-pointers.html
Richard

Dec 11 '06 #3
Richard Jones schrieb:
Diez B. Roggisch wrote:
>Python has no notion of pointers

See:

http://docs.python.org/lib/module-ctypes.html

In particular:

http://docs.python.org/lib/ctypes-pointers.html
Certainly cool, yet not too helpful for writing an interrupt handler
that needs to run lightning fast & without prior GIL acquisition.

Also PyPy with RPython might someday add much to the low-level
programming capabilities, but a pure Python OS isn't feasible IMHO right
now.

Diez
Dec 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
32
by: David Brown | last post by:
Hello. I recently came across a free operating system called Unununium (or something like that) and it was developed in Python and Assembly. Now, I have been looking for a way to make an...
34
by: Ville Voipio | last post by:
I would need to make some high-reliability software running on Linux in an embedded system. Performance (or lack of it) is not an issue, reliability is. The piece of software is rather simple,...
9
by: Adriano Ferreira | last post by:
Many Python scripts I see start with the shebang line #!/usr/bin/env python What is the difference from using just #!python Regards, Adriano.
6
by: Pete | last post by:
I am using xpsp2, and I have two versions of python (2.2 and 2.2.3 - both are listed as 29.3 mb, and listed as rarely used, which means never to me) listed in add/remove programs in the control...
19
by: Davy | last post by:
Hi all, I am a C/C++/Perl user and want to switch to Python (I found Python is more similar to C). Does Python support robust regular expression like Perl? And Python and Perl's File...
31
by: Fredrik Tolf | last post by:
Hi List! I was thinking about secure Python code execution, and I'd really appreciate some comments from those who know Python better than I do. I was thinking that maybe it could be possible...
69
by: Edward K Ream | last post by:
The pros and cons of making 'print' a function in Python 3.x are well discussed at: http://mail.python.org/pipermail/python-dev/2005-September/056154.html Alas, it appears that the effect of...
48
by: Yves Dorfsman | last post by:
On UNIX, some people use #!/usr/bin/env python While other use #!/usr/bin/python Why is one preferred over the other one ? Thanks.
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.