Python is a compiler operation

      Although Python is an interpreted language, but in fact, Python source code to be compiled, and then to run.

       Similar with the Java language, Python source code compiler are byte code, run by the Python virtual machine.

       On this point, we can verify:


print "position1"
print "position2"

          Save it for, and then run it in the shell window:

root@dell:~$ ./
  File "./", line 4
SyntaxError: invalid syntax

          From here we can see that, if Python is pure interpretation of the operation, it should output Position1.

          If it is compiled to run it, should first find syntax errors in source code, this is the case of a show case.

Posted by Scott at November 16, 2013 - 10:49 PM