[Tutor] Help please!

Puneeth Chaganti punchagan at gmail.com
Mon Jul 30 18:10:31 CEST 2012


On Mon, Jul 30, 2012 at 9:35 PM, Victoria Homsy <victoriahomsy at yahoo.com> wrote:
> 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".

The problem is exactly what the error message says.  argvs should
really be argv.

HTH,
Puneeth


More information about the Tutor mailing list