[Tutor] Problem with module

Scott Widney SWidney@ci.las-vegas.nv.us
Tue, 5 Feb 2002 12:03:58 -0800


> -----Original Message-----
> From: Lloyd Kvam [mailto:pythontutor@venix.com]
> Sent: Saturday, February 02, 2002 4:43 PM
> To: Alistair McGowan
> Cc: tutor@python.org
> Subject: Re: [Tutor] Problem with module
> 
> 
> def c(p):
>         spy = 60*60*24*365.2422
>         n = long (spy)*long (p)
>         return n
> 
> if __name__ == "__main__" :
>         n = c(186000)
>         print n
> 

There's also the "Run as __main__" option that has to be set. I'm not in
front of a Mac right now, but I believe it's in a drop down menu on the
right margin of the editor window. You may have already done that, but since
you didn't mention it, I wanted to bring it up.

Scott