[Tutor] Program Control

kubota2550 at gmail.com kubota2550 at gmail.com
Thu Feb 8 16:11:40 CET 2007

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 <kent37 at tds.net> wrote:
> kubota2550 at gmail.com 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070208/ffa27499/attachment.htm 

More information about the Tutor mailing list