[Tutor] Help please!

Victoria Homsy victoriahomsy at yahoo.com
Mon Jul 30 18:05:02 CEST 2012


Hi! I am a new Python user, and would really appreciate some help. My code is as follows:

from sys import argvs
script, mum_mood, dad_mood = argvs

# my own function
def dad_and_mum_mood(mum_mood, dad_mood):
print "If both mum and dad are in a good mood, all is good."
print "If one is and one isn't, all is good."
print "If both are in a bad mood, not so good."
print "Mum is in a %s mood" % (mum_mood)
print "Dad is in a %s mood" % (dad_mood)
print "Where does that leave us?"

 
dad_and_mum_mood(mum_mood, dad_mood)


I am just trying to get get the information mum_mood and dad_mood from the argvs (written into the command line), but I get the error "ImportError: cannot import name argvs".

Do you have any idea why this wouldn't be working? Thank you so much for helping me. 

Kind regards, 

Victoria 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120730/9c0a3506/attachment-0001.html>


More information about the Tutor mailing list