[Tutor] IDLE Caching

Bugra Cakir bugracakir at gmail.com
Tue Jul 25 08:44:54 CEST 2006


let me dig into documentation before thinking in the blind :) thanks a lot
Alan !


On 7/25/06, Alan Gauld <alan.gauld at freenet.co.uk> wrote:
>
> > So from the answers, i want to imagine how python exercise the code
> > when you push the button execute. My guess before looking at the
> > docs
> > or other material,
> >
> > 1. check python syntax
> > 2. transform to byte code.
> > 3. execute the byte code.
>
> What you have is correct for a main program.
> If its a module being imported there is a slight difference:
>
> 0) check if module already loaded, if yes stop
> 1) check if a pre-compiled version already exists
> 2) check if the source file is newer
> 3) if newer compile code to byte code and save pyc file
> 4) import byte code
>
> This is described in more detail in the documentation.
>
> Alan Gauld
> Author of the Learn to Program web site
> http://www.freenetpages.co.uk/hp/alan.gauld
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060725/72b338a3/attachment.htm 


More information about the Tutor mailing list