473,324 Members | 2,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Script Bug?

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

Expand|Select|Wrap|Line Numbers
  1. myList = [1,2,3,4]
  2. for index in range(len(myList)):
  3. myList[index] += 1
  4. print myList
  5.  
however, in my IDLE python shell, when I type

Expand|Select|Wrap|Line Numbers
  1.         
  2.                         
  3.                         
  4.                 >>myList = [1,2,3,4]
  5. for index in range(len(myList)):
  6.  
  7.  
it just gives me a prompt
Expand|Select|Wrap|Line Numbers
  1.         
  2.                         
  3.                         
  4.                 >>
  5.  
  6.  
?

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

Sep 6 '06 #1
3 915
On Wed, 2006-09-06 at 10:51 -0700, Omar wrote:
okay,I'm going through this python tutorial, and according to the
tutorial, I can type this:

Expand|Select|Wrap|Line Numbers
  1. myList = [1,2,3,4]
  2. for index in range(len(myList)):
  3.     myList[index] += 1
  4. print myList
  5.  

however, in my IDLE python shell, when I type

Expand|Select|Wrap|Line Numbers
  1.         
  2.                         
  3.                 >myList = [1,2,3,4]
  4. for index in range(len(myList)):
  •  
  •  

  • it just gives me a prompt
    Expand|Select|Wrap|Line Numbers
    1.         
    2.                         
    3.                 >
    4.  
    5.  

    ?

    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
    Omar,

    The
    Expand|Select|Wrap|Line Numbers
    1.  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

    Sep 6 '06 #2
    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?

    Sep 6 '06 #3

    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(sorted(m))],
    [[chr(154-ord(c)) for c in '.&-&,l.Z95193+179-']]*18)[3]

    Sep 6 '06 #4

    This thread has been closed and replies have been disabled. Please start a new discussion.

    Similar topics

    6
    by: Mike Daniel | last post by:
    I am attempting to use document.write(pageVar) that displays a new html page within a pop-up window and the popup is failing. Also note that pageVar is a complete HTML page containing other java...
    1
    by: bayouprophet | last post by:
    Cant get menu script to to put linked page in the same frame. I am new to Java and I am wondering what am I doing wrong? below are my java applet file, frame.html file, and my text file and one...
    1
    by: Allen | last post by:
    I am trying to add an additional photo/hyperlink to the company web site (I didn't create it) without any luck. The mouseover feature 'highlights' pics by swapping them with another pic using this...
    3
    by: Water Cooler v2 | last post by:
    Questions: 1. Can there be more than a single script block in a given HEAD tag? 2. Can there be more than a single script block in a given BODY tag? To test, I tried the following code. None...
    2
    by: bilaribilari | last post by:
    Hi all, I am using Tidy (C) for parsing html pages. I encountered a page that has some script as follows: <script> .... var abc = "<script>some stuff here</" + "script>"; .... </script>
    19
    by: thisis | last post by:
    Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
    3
    by: rsteph | last post by:
    I have a script that shows the time and date. It's been working on my site for quite a while now. Suddenly it stops showing up, after getting my drop down menu to work. If I put text between the...
    3
    by: Angus | last post by:
    I have a web page with a toolbar containing a Save button. The Save button can change contextually to be a Search button in some cases. Hence the button name searchsavechanges. The snippet of...
    7
    by: imtmub | last post by:
    I have a page, Head tag Contains many Scripts and style sheet for Menu and Page. This code working fine and displaying menus and page as i wanted. Check this page for reference....
    1
    KevinADC
    by: KevinADC | last post by:
    Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
    0
    by: DolphinDB | last post by:
    Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
    0
    by: ryjfgjl | last post by:
    ExcelToDatabase: batch import excel into database automatically...
    0
    by: Vimpel783 | last post by:
    Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
    1
    by: PapaRatzi | last post by:
    Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
    1
    by: Defcon1945 | last post by:
    I'm trying to learn Python using Pycharm but import shutil doesn't work
    1
    by: Shællîpôpï 09 | last post by:
    If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
    0
    by: af34tf | last post by:
    Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
    0
    by: Faith0G | last post by:
    I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
    0
    isladogs
    by: isladogs | last post by:
    The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

    By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

    To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.