Python Operating System???

Discussion in 'Python' started by David Brown, Jan 6, 2005.

  1. David Brown

    David Brown Guest

    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 operating system for a long
    long time and the only possibilities I could find were C++ and assembly. I
    don't mind assembly so much if I don't have to use it very often. But C++ is
    so complicated and errors are pretty much impossible to find in the code for
    me.

    So, I was wondering if it would be possible to find a bootloader that loads
    a python file at startup or something...

    Is there an example somewhere of a Python OS?

    Thanks!
    David Brown, Jan 6, 2005
    #1
    1. Advertising

  2. David Brown

    Lucas Raab Guest

    David Brown wrote:
    > 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 operating system for a long
    > long time and the only possibilities I could find were C++ and assembly. I
    > don't mind assembly so much if I don't have to use it very often. But C++ is
    > so complicated and errors are pretty much impossible to find in the code for
    > me.
    >
    > So, I was wondering if it would be possible to find a bootloader that loads
    > a python file at startup or something...
    >
    > Is there an example somewhere of a Python OS?
    >
    > Thanks!
    >
    >


    Hasn't there been numerous discussions about this in the past??
    Lucas Raab, Jan 6, 2005
    #2
    1. Advertising

  3. David Brown wrote:

    >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 operating system for a long
    >long time and the only possibilities I could find were C++ and assembly. I
    >don't mind assembly so much if I don't have to use it very often. But C++ is
    >so complicated and errors are pretty much impossible to find in the code for
    >me.
    >
    >So, I was wondering if it would be possible to find a bootloader that loads
    >a python file at startup or something...
    >
    >Is there an example somewhere of a Python OS?
    >
    >Thanks!
    >
    >
    >
    >

    People don't make Python OSs because it's a serious pain in the
    Deng-Xiao-ping. J/k, I am half kidding. Go to google groups, and
    search for Python OS. You will find that this topic has been discussed
    numerous times. There was another project other than Unununium which
    was Python based, but it is not being developed any longer and I fail to
    remember what it was called. So search away, you will find many
    results! Alternatively you could contact the Unununium folks for help.

    Note also that there are Java OSs as well (and probably others). But
    then again, if you don't like C++, you probably won't like Java. They
    can be very different languages, but in my experience, the reasons why
    one does not like C++ is usually due to a quality/flaw that can also be
    found in Java.
    Arich Chanachai, Jan 6, 2005
    #3
  4. David Brown

    Carl Banks Guest

    Arich Chanachai wrote:
    > But
    > then again, if you don't like C++, you probably won't like Java.

    They
    > can be very different languages, but in my experience, the reasons

    why
    > one does not like C++ is usually due to a quality/flaw that can also

    be
    > found in Java.


    Oh, brother.

    The Zen of Python says that "simple is better than complex" and
    "complex is better than complicated". Java does pretty well here. C++
    didn't even get "complicated is better than convoluted" right. There's
    are a ton of flaws in C++ not found in Java.


    --
    CARL BANKS
    Carl Banks, Jan 7, 2005
    #4
  5. David Brown

    Fuzzyman Guest

    The bootloader would have to be a 'python-core'. Ideally a fast
    implementation of just the python syntax and language features. Now
    *that* would be an excellent basis for a restricted mode python
    interpreter - which could make 'python applets' closer to a reality. It
    would also make python for embedded systems and embedding python in
    larger programs easier as well. A purely 'core language' implementation
    with no libraries.....

    Obviously you'd need file systems, drivers, and something to create the
    functionality of the os and sys libraries. Basing it on the existing
    Linux kernel would seem like a much more sensible idea....

    There is/was a project (Peter Hansen ?) to produce a pure python file
    system. that could be an interesting component.

    Regards,

    Fuzzy
    http://www.voidspace.org.uk/python/index.shtml



    David Brown wrote:
    > 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 operating system for a

    long
    > long time and the only possibilities I could find were C++ and

    assembly. I
    > don't mind assembly so much if I don't have to use it very often. But

    C++ is
    > so complicated and errors are pretty much impossible to find in the

    code for
    > me.
    >
    > So, I was wondering if it would be possible to find a bootloader that

    loads
    > a python file at startup or something...
    >
    > Is there an example somewhere of a Python OS?
    >
    > Thanks!
    Fuzzyman, Jan 7, 2005
    #5
  6. On Thu, 06 Jan 2005 16:12:54 -0800, Carl Banks wrote:

    > Arich Chanachai wrote:
    >> But
    >> then again, if you don't like C++, you probably won't like Java.

    > They
    >> can be very different languages, but in my experience, the reasons

    > why
    >> one does not like C++ is usually due to a quality/flaw that can also

    > be
    >> found in Java.

    >
    > Oh, brother.
    >
    > The Zen of Python says that "simple is better than complex" and
    > "complex is better than complicated". Java does pretty well here. C++
    > didn't even get "complicated is better than convoluted" right. There's
    > are a ton of flaws in C++ not found in Java.


    Still, Java feels like C++ done right, while being more wrong >:-[

    --
    Christopher

    If there was a scheme for Lisp world domination...
    Christopher Koppler, Jan 7, 2005
    #6
  7. David Brown

    Roose Guest

    What exactly do you mean by an operating system?

    If you don't want to program in C/C++ then you're going to have a hard time.
    I don't want to be too discouraging, but with that attitude I doubt you
    would get very far.

    It sounds like you want to make more of an OS shell -- no? You can
    implement a shell on top of any OS and probably do it in a language like
    Python.

    But if it is going to be a complete OS in pure Python, uh, it won't be!
    You'll have to do a lot of stuff in C, at the least interface with the
    hardware.



    "David Brown" <> wrote in message
    news:...
    > 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 operating system for a long
    > long time and the only possibilities I could find were C++ and assembly. I
    > don't mind assembly so much if I don't have to use it very often. But C++

    is
    > so complicated and errors are pretty much impossible to find in the code

    for
    > me.
    >
    > So, I was wondering if it would be possible to find a bootloader that

    loads
    > a python file at startup or something...
    >
    > Is there an example somewhere of a Python OS?
    >
    > Thanks!
    >
    >
    Roose, Jan 7, 2005
    #7
  8. David Brown

    Peter Hansen Guest

    Fuzzyman wrote:
    > There is/was a project (Peter Hansen ?) to produce a pure python file
    > system. that could be an interesting component.


    Good memory... uh, sort of. :) It was probably me you're
    thinking of, but the point of the project was solely a
    "virtual" file system, to be used exclusively as a tool
    for supporting automated testing. It has no concept of
    persistence, no support for it in the design, and wouldn't
    be what would help anyone in this respect. Sorry.

    (Work on it has actually not progressed lately, because
    there is no additional requirement driving the work.
    The primitive initial state of the tool suffices so far.)

    -Peter
    Peter Hansen, Jan 7, 2005
    #8
  9. Roose wrote:

    >What exactly do you mean by an operating system?
    >
    >If you don't want to program in C/C++ then you're going to have a hard time.
    >I don't want to be too discouraging, but with that attitude I doubt you
    >would get very far.
    >
    >

    Indeed, this is very true.

    >It sounds like you want to make more of an OS shell -- no? You can
    >implement a shell on top of any OS and probably do it in a language like
    >Python.
    >
    >

    He should just build around a linux core or use OS kit (if he is
    serious/determined).

    >But if it is going to be a complete OS in pure Python, uh, it won't be!
    >You'll have to do a lot of stuff in C, at the least interface with the
    >hardware.
    >
    >
    >
    >

    He could use something like O' caml or Oz no? I might be confused, but
    I understood them to be C/C++ comparable in terms of power and in that
    they both compile vs. VMs and interpreters (for O' caml this is optional
    I think). Or what about D?
    Arich Chanachai, Jan 7, 2005
    #9
  10. David Brown

    John Roth Guest

    "David Brown" <> wrote in message
    news:...
    > 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 operating system for a long
    > long time and the only possibilities I could find were C++ and assembly. I
    > don't mind assembly so much if I don't have to use it very often. But C++
    > is
    > so complicated and errors are pretty much impossible to find in the code
    > for
    > me.
    >
    > So, I was wondering if it would be possible to find a bootloader that
    > loads
    > a python file at startup or something...
    >
    > Is there an example somewhere of a Python OS?


    As far as I know, there's no working example. Unununium is still
    very early development, and it's going off in a quite interesting
    direction that is hardly standard.

    Writing an operating system is a lot of work. The approach I'd
    take would be to start out with an existing micro-kernel and
    enhance it with a kernel level Python system so that you wouldn't
    need any C or Asm level code in a typical process.

    Then I'd pursue a restricted subset of Python that could be
    compiled directly to machine code, and start recoding the
    various C and Asm parts in that. See the PyPy project for
    the direction they're taking for writing the Python system in
    Python.

    Have fun with the project!

    John Roth


    >
    > Thanks!
    >
    >
    John Roth, Jan 7, 2005
    #10
  11. David Brown

    Nick Vargish Guest

    Arich Chanachai <> writes:

    > He should just build around a linux core or use OS kit (if he is
    > serious/determined).


    There's Ubuntu Linux, a Debian-based distro with commercial backing
    and a regular release schedule. One of the neat things about Ubuntu is
    that Python use is encouraged. "Python scripting everywhere" is a
    stated goal, and they have a number of bounties that concentrate on
    deepening the use of Python in the OS:

    http://www.ubuntulinux.org/community/bounties

    I've been using it on a couple of desktops, and I've been impressed by
    the overall quality of the distro. One thing I especially like is that
    the root account is disabled by default, administrative tasks are
    performed with sudo by users in the appropriate group (much like it is
    in Mac OS X 10.3).

    Nick

    --
    # sigmask || 0.2 || 20030107 || public domain || feed this to a python
    print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
    Nick Vargish, Jan 7, 2005
    #11
  12. In message <>, Christopher
    Koppler <> writes
    >Still, Java feels like C++ done right, while being more wrong >:-[


    Couldn't disagree more. Just about anything you want to do that is
    low-level, is impossible in Java. Anyway this is off-topic.

    Stephen
    --
    Stephen Kellett
    Object Media Limited http://www.objmedia.demon.co.uk
    RSI Information: http://www.objmedia.demon.co.uk/rsi.html
    Stephen Kellett, Jan 7, 2005
    #12
  13. Stephen Kellett, Jan 7, 2005
    #13
  14. David Brown <> wrote:
    > 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 operating system for a long
    > long time and the only possibilities I could find were C++ and assembly.


    The problem when using Python instead of C for OS development is that
    C was *specifically designed* to create an OS, while Python was designed
    for completely different purposes. If you want to write an OS, it would
    be wise to use a language that is suited for that purpose. If you
    dislike C so much and prefer Python so much more, your first step should
    be to design a Python dialect that is more appropriate for writing OS's.

    (I know that you mentioned C++, not C, but I decided to setup C as a
    straw-man to make my argument.)

    - Mike
    Michael Hobbs, Jan 7, 2005
    #14
  15. David Brown

    Paul Rubin Guest

    (Michael Hobbs) writes:
    > The problem when using Python instead of C for OS development is that
    > C was *specifically designed* to create an OS, while Python was designed
    > for completely different purposes. If you want to write an OS, it would
    > be wise to use a language that is suited for that purpose. If you
    > dislike C so much and prefer Python so much more, your first step should
    > be to design a Python dialect that is more appropriate for writing OS's.


    But I thought Python was an all-purpose language. After all, OS's
    have been written in Lisp before too.
    Paul Rubin, Jan 7, 2005
    #15
  16. On Fri, 07 Jan 2005 16:34:48 -0000, (Michael Hobbs) wrote:

    >David Brown <> wrote:
    >> 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 operating system for a long
    >> long time and the only possibilities I could find were C++ and assembly.

    >
    >The problem when using Python instead of C for OS development is that
    >C was *specifically designed* to create an OS, while Python was designed
    >for completely different purposes. If you want to write an OS, it would
    >be wise to use a language that is suited for that purpose. If you
    >dislike C so much and prefer Python so much more, your first step should
    >be to design a Python dialect that is more appropriate for writing OS's.
    >
    >(I know that you mentioned C++, not C, but I decided to setup C as a
    >straw-man to make my argument.)

    I'd say look at Ada for HLL inspiration, if you want to deal with OS level stuff
    in Python.

    Regards,
    Bengt Richter
    Bengt Richter, Jan 7, 2005
    #16
  17. Paul Rubin wrote:

    > (Michael Hobbs) writes:
    >
    >
    >>The problem when using Python instead of C for OS development is that
    >>C was *specifically designed* to create an OS, while Python was designed
    >>for completely different purposes. If you want to write an OS, it would
    >>be wise to use a language that is suited for that purpose. If you
    >>dislike C so much and prefer Python so much more, your first step should
    >>be to design a Python dialect that is more appropriate for writing OS's.
    >>
    >>

    >
    >But I thought Python was an all-purpose language. After all, OS's
    >have been written in Lisp before too.
    >
    >

    Pure Lisp? Or a Lisp/C/Asm combo? Lisp has a compiled flavor by the way.
    Arich Chanachai, Jan 8, 2005
    #17
  18. David Brown

    Paul Rubin Guest

    Arich Chanachai <> writes:
    > >But I thought Python was an all-purpose language. After all, OS's
    > >have been written in Lisp before too.
    > >

    > Pure Lisp? Or a Lisp/C/Asm combo? Lisp has a compiled flavor by the way.


    Compiled flavor? Lisp has been compiled since the 1950's.

    No, there was no C code on Lisp machines. There was some low-level
    code at the bottom whose capabilities were such that you could
    accurately call it asm, but it was Lisp too, just a very restricted
    form.
    Paul Rubin, Jan 8, 2005
    #18
  19. David Brown

    Roose Guest

    "Michael Hobbs" <> wrote in message
    news:...
    > David Brown <> wrote:
    > > 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 operating system for a

    long
    > > long time and the only possibilities I could find were C++ and assembly.

    >
    > The problem when using Python instead of C for OS development is that
    > C was *specifically designed* to create an OS, while Python was designed
    > for completely different purposes. If you want to write an OS, it would
    > be wise to use a language that is suited for that purpose. If you
    > dislike C so much and prefer Python so much more, your first step should
    > be to design a Python dialect that is more appropriate for writing OS's.


    Yes, that sounds pretty realistic : ) For someone who is choosing the wrong
    language to write an OS, and who I would guess doesn't understand interrupt
    programming and the like -- their first task should be to redesign Python!!
    Roose, Jan 8, 2005
    #19
  20. David Brown

    Roose Guest


    > But I thought Python was an all-purpose language. After all, OS's
    > have been written in Lisp before too.


    It is a general purpose APPLICATION language. I am surprised that this
    hasn't been mentioned on this thread.

    An OS is NOT an application. It is a completely different kind of program.
    Do you guys understand the difference between user and kernel mode? Do you
    know what address spaces and hardware interrupts are? Python is not
    equipped to handle these things. You would end up doing so much in C
    extensions that it could barely be called Python.

    I am not trying to be insulting... but unless someone would like to educate
    me otherwise, the idea of an OS written in Python is almost ludicrous. As I
    said, I think you might mean an OS SHELL, which would be a reasonable
    (although maybe unconventional) thing to write in python.

    Also I am no threading expert, but I would imagine it would be very hard to
    write a task scheduler in Python given that it has the whole GIL thing. (As
    I said that isn't my domain of expertise but I'm sure someone here could
    expound on that.)
    Roose, Jan 8, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vasanth
    Replies:
    0
    Views:
    528
    Vasanth
    Jun 28, 2004
  2. Steven Cheng[MSFT]
    Replies:
    4
    Views:
    4,297
    Steven Cheng[MSFT]
    May 13, 2004
  3. Karunakararao
    Replies:
    0
    Views:
    629
    Karunakararao
    May 11, 2004
  4. =?Utf-8?B?U3JlZQ==?=
    Replies:
    1
    Views:
    336
    Ken Cox [Microsoft MVP]
    May 31, 2004
  5. PythonUsr

    Python Operating System

    PythonUsr, Dec 10, 2006, in forum: Python
    Replies:
    3
    Views:
    452
    Diez B. Roggisch
    Dec 11, 2006
Loading...

Share This Page