kunal wrote:
> Hi ,
>
> I am very new to python. I have written a simple program in python .
> In which , program  prompt for enter string and then compair  these
> with another string using if - else condition.
> Its works fine when Run on DOS , but when we run on eclipse 3.2 /3.2
> its not works.
> and always gives else output on eclipse IDE.
>
> Following is the sample code :
>
> x = (raw_input("Please enter your name: "))
>
> if x in "kunal":
>     print "yes its me "
> else:
>     print "not me"
>
> Is there is any more plugin required for "eclipse + pydev" IDE. Please
> Suggest.
> Thanks in advance.
>
>
> >
>   

It appears as though accepting raw input from within pydev includes some blank 
spaces at the end of the input stream.  I did the same as you but changed by 
test statement to:

if x.strip() == 'kunal':
    print "yes its me "
else:
    print "not me"      

I've never done this where I accept input from within pydev before, but the 
above seems to resolve the issue you were having.  

Hope this helps.

        -Jim


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to