30 Jul 2012 18:05
Help please!
Victoria Homsy <victoriahomsy <at> yahoo.com>
2012-07-30 16:05:02 GMT
2012-07-30 16:05:02 GMT
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
_______________________________________________ Tutor maillist - Tutor <at> python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
RSS Feed