Maybe I'm asking the wrong question.  This appears that a module is a
external program.  What I've seen on some programs but don't fully
understand is something of the sort: def main() and a def  sub() and def
add().  It appears that the program has calls to each of these sections.
The term module may be incorrect here.  I would  like to have all of my code
in one program but be able to call sections of code and return from them to
the main app.  That's where I'm lost.

On 2/8/07, Kent Johnson <[EMAIL PROTECTED]> wrote:

[EMAIL PROTECTED] wrote:
> I am learning Python and have written several small programs of
> increasing complexity but so far they are all "linear" programs meaning
> that they are meant to do one thing.  I have yet to fully understand
> program control in order to go to and return form modules (I think this
> is the correct term).  In other words, I have a menu which offers
> several options, I would like to be able to combine several of my
> programs into seperate modules and put in one larger program.

See for example
"Modules and Functions" in http://www.freenetpages.co.uk/hp/alan.gauld/
http://swaroopch.info/text/Byte_of_Python:Modules#Making_your_own_modules
http://docs.python.org/tut/node8.html

Kent


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to