RE: keyword checker - keyword.kwlist

Discussion in 'Python' started by Hamilton, William, May 10, 2007.

  1. > From:
    > F:\Ohjelmat\Python25\Lib\keyword.pyc


    That's your problem. Rename keyword.py to keywordcheck.py, and delete
    keyword.pyc in this directory, and it should work fine.

    ---
    -Bill Hamilton
     
    Hamilton, William, May 10, 2007
    #1
    1. Advertising

  2. Hamilton, William

    Guest

    Hamilton, William kirjoitti:
    >> From:
    >> F:\Ohjelmat\Python25\Lib\keyword.pyc

    >
    > That's your problem. Rename keyword.py to keywordcheck.py, and delete
    > keyword.pyc in this directory, and it should work fine.
    >
    > ---
    > -Bill Hamilton

    I tried the trick but the error stays. I really don't know what to do
    anymore.

    And what about the print function. Why does it print newline even if
    there is colon after variable? I'm lost.

    I'm using Eclipe enviroment and Pydev for it. My python interpreter is
    2.5.1.
     
    , May 10, 2007
    #2
    1. Advertising

  3. En Thu, 10 May 2007 17:03:13 -0300, <> escribió:

    > I tried the trick but the error stays. I really don't know what to do
    > anymore.
    >
    > And what about the print function. Why does it print newline even if
    > there is colon after variable? I'm lost.
    >
    > I'm using Eclipe enviroment and Pydev for it. My python interpreter is
    > 2.5.1.


    To see exactly what you get, use repr(my_input). I think that you will get
    'else\n'
    Try again using

    my_input = raw_input("...").strip()

    as Peter Otten suggested before

    --
    Gabriel Genellina
     
    Gabriel Genellina, May 11, 2007
    #3
  4. Hamilton, William

    Guest

    Gabriel Genellina kirjoitti:
    > En Thu, 10 May 2007 17:03:13 -0300, <> escribió:
    > my_input = raw_input("...").strip()
    >
    > as Peter Otten suggested before
    >
    > --Gabriel Genellina
    >

    Ok, it seems to work with strip(). Thanks for your help.

    Do you guys have any clue why mine previous code doesn't work?
     
    , May 13, 2007
    #4
  5. Hamilton, William

    Guest

    kirjoitti:
    > Gabriel Genellina kirjoitti:
    >> En Thu, 10 May 2007 17:03:13 -0300, <> escribió:
    >> my_input = raw_input("...").strip()
    >>
    >> as Peter Otten suggested before
    >>
    >> --Gabriel Genellina
    >>

    > Ok, it seems to work with strip(). Thanks for your help.
    >
    > Do you guys have any clue why mine previous code doesn't work?

    Oh, repr() function revealed the issue. Thank you all!
     
    , May 13, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Max
    Replies:
    6
    Views:
    3,381
  2. pablo pecora

    Aspx permission checker

    pablo pecora, Nov 17, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    477
    Natty Gur
    Nov 18, 2003
  3. Replies:
    6
    Views:
    458
    Peter Otten
    May 10, 2007
  4. Pager O Rama

    MSN BLOCK CHECKER-MSN STATUS CHECKER-MSN PROBLEMS

    Pager O Rama, Apr 4, 2006, in forum: ASP General
    Replies:
    0
    Views:
    248
    Pager O Rama
    Apr 4, 2006
  5. Jacob Grover
    Replies:
    5
    Views:
    318
    Jacob Grover
    Jul 18, 2008
Loading...

Share This Page