On Sat, 08 Jan 2005 08:28:12 GMT, "Roose" <[EMAIL PROTECTED]> wrote:
>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. That's a crazy idea I once had - what if a user could run Python as a shell of Linux/other free U**x, and access every single subsystem and piece of data in the object-like manner? Sure, things like pipes and immediate access to files without having to open() them and the whole filesystem hierarchy would have to be added. Quite a lot of plumbing work would have to be done, but once it were done, it would be like an object operating system, everything organized nicely in predictable object hierarchies with dot access. System scripts would no longer be a mess that breaks every now and then depending on slight differences in filesystem hierarchy. Python dictionaries with their ability to quickly bind names to various objects would make it possible to keep such hierarchy stable, even with data moving around on different physical disk partitions and folders. Instead of saying: # cp /etc/postfix/main.cf /mnt/floppy the user could say e.g. .>>> copy system[config][mta] floppy or .>>> copy system.config.mta floppy In an "object system" like Python it could be reasonable to consider writing a class that would implement at least a subset of generic interface to the equivalent functionalities of various MTAs. Maybe. With traditional filesystems trying smth like that is not really reasonable, because 99% of the time it would work, but 1% of the time it would fail and that 1% would ruin the whole venture, as handling low-level OS complexity for a non-tech user has to be more reliable than that - in two cases when I installed Linux for free for someone the installation was finally deleted by those users because the desktop shortcuts to devices like floppy and CD ultimately failed to work for some reason and using 'mount -t iso9660 ...' was not an option that they would consider learning and using really. Think about all the potential! On top of clean, stable system interface a user could use map, filter and reduce functions on various system objects. Handlers for files with known structure could be written, so dot or list or dictionary access would allow manipulating data inside the files, like file[rownumber]='spam', or spreadsheet_file['A2', 100]. Or you could issue commands like browser.go('somewhere') or desktop.edit('hello.txt'). I was considering writing smth like this myself but it's way over my head re low-level OS and kernel stuff. :-( IMHO Linux problem has long been that in its lower level interface (above kernel and below GUI) is way too much like traditional UNIX. Sure someone with sysadmin experience can use it - but in my experience it's way over the head of the typical user. Trying to teach them about mknod and /dev/* hierarchy is hopeless and too hard for them. -- It's a man's life in a Python Programming Association. -- http://mail.python.org/mailman/listinfo/python-list