Hi List. All of you are right. It is similar to java, vb, but how it work? Well, python script generates a compiled bytecode the first time that yuou run the main script in a machinne, and the interpreter execute this byte code.
It could be slower than a compiled language, because use an interpreter to run, but it is faster than a interepreted language, because the interpreted language ot generated a byt code, this one reads the secripts. About operating system, it coulbe posible, but not at all. First to run an operative systems you need a low level language, like assembler, it could began the os, but the kernel could be in python. just a c library or gcc and python interpreter. if you use assembler to run with c, u can use python for your python os Alan G wrote: >>I am new to Python, about 1 day. And I downloaded from >>python.org Pythong2.4, it has the command line and >>junk. But what actuall program compiles the source of >>python into a program? > > > When you run a python script python compiles the source > internally before executing it. If your program imports > modules, the imported code gets converted into compiled > code and you will see it in the form of .pyc files. > > Python works in a similar fashion to VB and Java in that > it executes compiled byte code, not native machine code. > The Python program has the same function as both the > Java compiler and JVM interpreter. > > If you use Jython instead of Python you will find a separate > python compiler that produces true Java code that then > can be run under any JVM. > > If you want to produce standalone windows executables > there are several tools available, the simplest and > most widely used being py2exe. This is not part of the > standard distribution however. Basically what all these > tools do is wrap the Python program and all of the > modules you use into one single executable file - so > its quite big and if you distribute several programs > you duplicate python with each one!! In this case > distributing the python scripts with a one-off version > of Python is a better option. > > The included distutils package can simplify that process. > > >>And also, is Python capable of writing an OS? > > > Not really since python requires the python program to > be present in some form and it itself needs an underlying > OS. You could write an OS simulation as a learning > excercise but it would need a minimal OS underlying it. > Python is a high level programming language aimed at > developing applications with the minimum effort. If you > really need to twiddle the bits n' bytes you are better > off with C or assembler, just be prepared to write a > lot of code... > > HTH, > > Alan G > Author of the Learn to Program web tutor > http://www.freenetpages.co.uk/hp/alan.gauld > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > -- Atentamente: *------------------------------------* ,= ,-_-. =. |Carlos E. Sotelo Pinto(KrLoS) | ((_/)o o(\_)) |GNU/Linux User Registered # 379182 | `-'(. .)`-' |Tildes omitidas voluntariamente | \_/ *------------------------------------* Bitacora de Vuelo <http://csotelop.blogsome.com/> Sociedad Peruana de Computacion <http://www.spc.org.pe/> Grupo de Usuarios GNU/Linux Arequipa <http://www.aqpglug.org.pe/> Grupo de Usuarios Debian Arequipa <http://www.debianarequipa.org> Grupo de Usuarios Debian Peru <http://www.debianperu.org/> ------------------------------------------------------------------------ La actitud del hacker: Los hackers resuelven problemas y construyen cosas, y creen en la libertad y la ayuda voluntaria mutua. Para ser aceptado como hacker, deberás comportarte como si tuvieras esta actitud en tu interior. Y para comportarte como si tuvieras esta actitud, deberás creerte de verdad dicha actitud. ______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor