sorry for the spam Here is the complete message!
I am trying to write a menu script that will execute bash scripts.
Everything is fine until the script executes and I want to see if there are
any more options to run before quitting.

 Example:
=================================================
def menu(opt1 = "something", opt2 = "something else"):
          print "1)", opt1 ""
          print "2)", opt2""
def anythingelse(opt 3 = "final check"):
           menu()
           print "3)", opt3""
menu()
choice = int(input(":"))
if choice == 1
       command
       anythingelse()
elif choice == 2
       command 2
       anythingelse()
else choice ==3
        command 3
        quit

=======================================
My newbie problem is that although the menu repeats there is no chance to
have a second input and I can't put the int(input(":") in the function
because I get the error 'int' is not callable plus my choice variable is not
defined. can someone please enlighten me? :-)

---------- Forwarded message ----------
From: Craig Ward <[EMAIL PROTECTED]>
Date: Jan 11, 2008 11:21 AM
Subject: newbie question regarding int(input(:))
To: python-list@python.org


Hi experts!
I am trying to write a menu script that will execute bash scripts.
Everything is fine until the script executes and I want to see if there are
any more options to run before quitting. Example:

def menu(opt1 = "something", opt2 = "something else"):


-- 
Computers are like air conditioners.
They stop working when you open Windows.



-- 
Computers are like air conditioners.
They stop working when you open Windows.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to