Hi,

This is a bit out of topic of the pydev-code list (please send that to
the pydev forum or the pydev-users list...)

But just to answer you, take a look at tha faq:
http://pydev.sourceforge.net/faq.html#why_raw_input_input_does_not_work_correctly

Cheers,

Fabio

On Jan 17, 2008 12:32 PM, hadrien axel <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm a newbie in Python and I'm trying to use the Eclipse IDE for start
> programming with this language, so I installed the Pydev plugin 1.3.11 on
> Eclipse 3.3.0.
> I prove with this downloaded script example:
>
> import os, sys
>
> seguir=""
> nota=0
> deci=0
> car=1
> chon=0
> rem=""
> inversion=""
> er=deci
> hex=0
> no=""
> noe=""
> while car==1:
>     try:
>         option=raw_input("Chose an option:\n  a) Convert a Binary number to
> Decimal.\n  b) Convert a Decimal number to Binary.\n  c) Convert a Decimal
> number to Hexadecimal.\nWrite an option: ")
>         if option=="a":
>             bin=str(raw_input("Write a binary number: "))
>             try:
>                 print int(bin,2), "This is the Decimal"
>             except:
>                 print "This is not binary"
>             seguir=raw_input("Continue (s/n): ")
>         if option=="b":
>             try:
>                 num=int(raw_input("Write a Decimal number: "))
>                 while num>0:
>                     chon=num%2
>                     rem+=str(chon)
>                     num/=2
>                 for caracter in rem:
>                     inversion=caracter+inversion
>                 print inversion, "This is the Binary"
>             except:
>                 print "This is not a Decimal"
>             inversion=""
>             rem=""
>             seguir=raw_input("Continue(s/n): ")
>         if option=="c":
>             try:
>                 deci=int(raw_input("Write a Decimal number: "))
>                 while deci>0:
>                     hex=deci%16
>                     if hex<10:
>                         no=str(hex)
>                     if hex==10:
>                         no="A"
>                     if hex==11:
>                         no="B"
>                     if hex==12:
>                         no="C"
>                     if hex==13:
>                         no="D"
>                     if hex==14:
>                         no="E"
>                     if hex==15:
>                         no="F"
>                     noe+=no
>                     deci/=16
>                 for caracter in noe:
>                     inversion=caracter+inversion
>                 print inversion,"This is the Hexadecimal."
>                 inversion=""
>                 noe=""
>             except:
>                 print "This is not a decimal number"
>             segeuir=raw_input("Continue(s/n): ")
>     except:
>         print "Invalid option"
>         seguir=raw_input("Continue(s/n): ")
>     if seguir=="s":
>         car=1
>     elif seguir=="n":
>         print "ENDED"
>         car=0
>     else:
>         print "Invalid option"
>
>
> When I try to run it with Pydev the console doesn't read the letters I write
> (for the options: a, b, c) so the option is always wrong, but when I run the
> program with the IDLE, I have no problem and all it's ok. Where is the
> problem? What can I do?
>
> Thanks!
>
>
>  ________________________________
>
> Web Revelación Yahoo! 2007:
>  Premio Favorita del Público - ¡Vota tu preferida!
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> pydev-code mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pydev-code
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
pydev-code mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pydev-code

Reply via email to