[Tutor] Need help with a couple of concepts

Robin B. Lake rbl@hal.cwru.edu
Fri, 3 Mar 2000 14:13:24 -0500 (EST)

Long-time programming.  Understand most of the Python *language*.
Need help with some of the constructs to get a Python program going.

Running Python on a Mac G3.

1.  Am modifying some code.  There is at the bottom:

if __name__ == '__main__':

and after the imports:

def main():

What is this all about?

2.  I have some code from a Python book that requires the kjbuckets
extension module.  I've downloaded the kjbuckets module.  Where in
the Mac directory tree should I put it so that Python will find it
when needed?

3.  I'm using BBEdit Lite 4.6 to edit the Python code.  Any way to
get line numbers in the source so that the Python error messages
might be matched up better?

Rob Lake