[Tutor] compiled Python Files ?? and a little OO

alan.gauld@bt.com alan.gauld@bt.com
Mon, 10 Dec 2001 11:30:52 -0000

Others have answered most of your questions but this one 
seemed to get missed:

> After I ran this, I noticed that I had two new versions of F1 
> and F2; the directory showed "Compiled Python file" as 
> ...
> extensions. Why didn't I see this happening with my other 
> tests? Is it because the other tests imported Tkinter?

My guess is you used Tkinter like:

from Tkinter import *

Thus you never imported Tkinter itself, you imported specific items
(everything in this cae!) from within it. Thus python didn't compile 
Tkinter. If you had done this:

import Tkinter

top = Tkinter.Tk()  #etc...

Then you would have gotten a Tkinter.pyc

Alan G.