Script Bug?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Omar

    #1

    Script Bug?

    okay,I'm going through this python tutorial, and according to the
    tutorial, I can type this:

    Code:
    myList = [1,2,3,4]
    for index in range(len(myList)):
    myList[index] += 1
    print myList
    however, in my IDLE python shell, when I type

    Code:
    [QUOTE][QUOTE][QUOTE]
    >>myList = [1,2,3,4]
    >>for index in range(len(myList)):[/QUOTE][/QUOTE][/QUOTE]
    it just gives me a prompt
    Code:
    [QUOTE][QUOTE][QUOTE]
    >>[/QUOTE][/QUOTE][/QUOTE]
    ?

    why doesn't it just bring me to line three? I need to have
    persistence, cause little snags like these discourage me. I know I
    need thicker skin to write code.

    any advice is appreciated

  • John Purser

    #2
    Re: Script Bug?

    On Wed, 2006-09-06 at 10:51 -0700, Omar wrote:
    Code:
    [QUOTE][QUOTE]
    >myList = [1,2,3,4]
    >for index in range(len(myList)):
    okay,I'm going through this python tutorial, and according to the tutorial, I can type this: >
    Code:
    myList = [1,2,3,4]
    for index in range(len(myList)):
        myList[index] += 1
    print myList
    > however, in my IDLE python shell, when I type >
    [/QUOTE]
    >
    it just gives me a prompt
    Code:
    [QUOTE][QUOTE]
    >[/QUOTE][/QUOTE]
    >
    ?
    >
    why doesn't it just bring me to line three? I need to have
    persistence, cause little snags like these discourage me. I know I
    need thicker skin to write code.
    >
    any advice is appreciated
    >[/QUOTE]

    Omar,

    The
    Code:
     and
    tags are markup to tell you where the code starts
    and stops. They are not python. Ignore them. Type the rest into the
    interpreter and see what happens.

    John Purser

    Comment

    • Omar

      #3
      Re: Script Bug?

      no, i put those there.

      i have restarted IDLE and it now works. a friend told me it was a bug
      in IDLE.

      I'd like to try activepython, but i can't dl it from work (that site is
      blocked for some reason). anybody got the install for it, or a mirror
      location for it?

      Comment

      • Tal Einat

        #4
        Re: Script Bug?


        Omar wrote:
        no, i put those there.
        >
        i have restarted IDLE and it now works. a friend told me it was a bug
        in IDLE.
        >
        I'd like to try activepython, but i can't dl it from work (that site is
        blocked for some reason). anybody got the install for it, or a mirror
        location for it?
        You can use PythonWin instead, which is good enough.

        Still, I have been using IDLE for years and have never run into this,
        nor heard of such a bug from anyone else. Do you know how to recreate
        it?

        - Tal
        reduce(lambda m,x:[m[i]+s[-1] for i,s in enumerate(sorte d(m))],
        [[chr(154-ord(c)) for c in '.&-&,l.Z95193+1 79-']]*18)[3]

        Comment

        Working...