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

Frank Peavy fpeavy@pop.net
Sun, 09 Dec 2001 10:54:10 -0800

I created three simple files to test with:
F1.py file and all it contains is:

print "Hello"
Another file F2.py that contains:

print "JSmith"
I have one more FX.py file that contains:

import F1.py
import F2.py
My end result was:


The results seem correct, in my opinion.
So, here are my questions. Although I didn't request it, Python did a line 
feed between Hello and JSmith, is this normal?

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

I understand I can run the .pyc files, instead of the .py files. Is this true?

Why didn't I get a FX.pyc file also... ? The first two files compiled but 
the third file that imported the other two didn't.

A little confused...  :-)