[Tutor] Re: Module Loop doesn't work (Joseph Q.)

Andrei project5 at redrival.net
Sat Apr 2 01:03:00 CEST 2005


Joseph Quigley wrote on Fri, 01 Apr 2005 10:07:08 -0600:

>   I have some code on a geek dictionary that I'm making where the command 
> geeker() opens a module for the "real" geek dictionary (where you can type 
> a word to see what it is geekified). Supposedly, you type lobby() to go 
> back to what I call  the lobby (where you can get info on the web site and 
> email and version). But it just loops back to the Geeker>>> prompt where 
> you type the word that you want geekified. I even tried having it restart 
> the whole program by importing the index module that I wrote. But it still 
> won't restart the program!

Without seeing your code, I doubt anyone will be able to solve your problem
except by pure chance. In addition to that, I'm confused by the use of
function calls in what seems te be essentially a menu system. 

Speaking in general terms, the way you could handle this is as follows:
- have a main menu loop (what you call the lobby) which accepts user input
and based on that input calls other functions which perform certain tasks
(e.g. open a webpage or go to the dictionary part)
- the dictionary part would in turn be another loop accepting words as
input which get 'translated', until the user gives a blank string or
whatever as input in order to terminate the loop (and automatically fall
back into the loop of the lobby)

-- 
Yours,

Andrei

=====
Real contact info (decode with rot13):
cebwrpg5 at jnanqbb.ay. Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V ernq
gur yvfg, fb gurer'f ab arrq gb PP.



More information about the Tutor mailing list