Getting started --Python

python.org

Books:

diveintopython.org (quick dive)

corepython.com (deep dive)

cp4k.blogspot.com (kids dive)

Videos:

showmedo.com/videotutorials/python

Community:

comp.lang.python newsgroup

tutor mailing list

PyCon conferences

Python Comments(7) Tue, 06 Sep 2011 13:25:53 -0600

Learning Python---Notes

Ch.2

interpreter: an interpreter is a kind of program that executes other programs. The interpreter is a layer of software logic between your code and the computer hardware on your machine.

From Phthon interpreter's view, when you instruct Python to run the script, it's first complied to "byte code" and then routed to something called a '"irtual machine".

1. Byte code is a lower-level, platform-independent representation of the sourse code.

Byte code is stored in .pyc (".pyc" means compiled ".py" source)

make sure .pyc flies are writeen for larger programs because they spped startup time.

2. the .pyc file is shipped off for execution to PVM.

The PVM is a big loop that iterates through the byte code instrutions, one by one, to carry out their operations. the PVM is the component that truly runs the scripts.

PVM--the runtime engine of Python that interprets your complied code.

Development implications

The systems that coplie and execute the source code are one and the same. In Python, the compiler is always present at runtime, and is part of the system that runs your programs.

 

Scripts: an informal term meaning a top-level program file.

 

Route the output of a Python script to a file to save it for later use or inspection by using special shell syntax:

%pyhon spam.py > saveit.txt

This is known as stream redirection

 

 

Python Comments(10) Tue, 06 Sep 2011 13:22:53 -0600

Learning Python the Hard Way

 

 

You can code. They cannot. That is pretty damn cool.

http://learnpythonthehardway.org/book/index.html

Python Comments(10) Tue, 21 Jun 2011 04:42:16 -0600