On Wed, Aug 13, 2008 at 12:37 PM, frankrentef <[EMAIL PROTECTED]> wrote:

> Newbie here....
>
> I'm writing a Python program that has "def" functionality growing in
> leaps and bounds.  I'm a newbie to Python so be detailed.  Is there a
> way to create a py file with all the "def's" listed and just call them
> from the "program" py file?  How would I do this?  Say my "def" py
> file was named def.py and the program file was named "program.py"
>
> THNX


1. Don't call the file def.py. def is a keyword, so you'll confuse the
interpreter.
2. Read the tutorial. "defs" are really called functions and "py files" are
referred to as modules.

Read the part of the tutorial pertaining to modules. It will answer your
question.

http://docs.python.org/tut/tut.html
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to