Error running any script in IDLE

Discussion in 'Python' started by mattgraves7@gmail.com, Apr 4, 2013.

  1. Guest

    Im fairly new to Python. I was trying to run a script using IDLE and it came back with an error and immediately shut down. After this, every script I tried to test within IDLE would do the same. I wrote the following script:

    while True
    x = input("test")

    It seems simple enough to not be screwed up in any way, but when I hit F5 to test, it gets red text and shuts down IDLE. It scrolls too fast to see before shutting down, but I right clicked the text quickly to pause it. This is what it comes back with:
    http://s21.postimg.org/4so8merdz/asdfg.png

    Can anyone tell me what's going on, and why this error comes up regardless of what script I try to run in IDLE?

    If I run it in cmd, it seems to work fine.
     
    , Apr 4, 2013
    #1
    1. Advertising

  2. On Fri, Apr 5, 2013 at 2:16 AM, <> wrote:
    > Im fairly new to Python. I was trying to run a script using IDLE and it came back with an error and immediately shut down. After this, every script I tried to test within IDLE would do the same. I wrote the following script:
    >
    > while True
    > x = input("test")
    >
    > It seems simple enough to not be screwed up in any way, but when I hit F5 to test, it gets red text and shuts down IDLE. It scrolls too fast to see before shutting down, but I right clicked the text quickly to pause it. This is what it comes back with:
    > http://s21.postimg.org/4so8merdz/asdfg.png
    >
    > Can anyone tell me what's going on, and why this error comes up regardless of what script I try to run in IDLE?


    It looks like you've made a module called 'random.py', which is
    shadowing the standard library 'random' module. In that file, you
    appear to have line numbers - note how line 42 is prefixed with the
    actual number 42 - and that's causing syntax errors deep inside IDLE.
    Try renaming or deleting your random.py to see if that fixes it.

    ChrisA
     
    Chris Angelico, Apr 4, 2013
    #2
    1. Advertising

  3. Guest

    Thanks Chris, that worked. Like I said, I'm fairly new to python so I am still learning the ins and outs. Thank you.
     
    , Apr 4, 2013
    #3
  4. Guest

    Thanks Chris, that worked. Like I said, I'm fairly new to python so I am still learning the ins and outs. Thank you.
     
    , Apr 4, 2013
    #4
  5. On Fri, Apr 5, 2013 at 2:33 AM, <> wrote:
    > Thanks Chris, that worked. Like I said, I'm fairly new to python so I am still learning the ins and outs. Thank you.


    No probs. You provided all the information needed to solve the
    problem, for which I am very much appreciative.

    All the best!

    ChrisA
     
    Chris Angelico, Apr 4, 2013
    #5
  6. On 04/04/2013 16:16, wrote:
    > Im fairly new to Python. I was trying to run a script using IDLE and it came back with an error and immediately shut down. After this, every script I tried to test within IDLE would do the same. I wrote the following script:
    >
    > while True
    > x = input("test")
    >


    I see you've already got an answer but you didn't run the above code as
    you'd get a syntax error. As you're new I'll leave you to find out where :)

    --
    If you're using GoogleCrap? please read this
    http://wiki.python.org/moin/GoogleGroupsPython.

    Mark Lawrence
     
    Mark Lawrence, Apr 4, 2013
    #6
    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. Helmut Jarausch

    Re: check if running under IDLE

    Helmut Jarausch, Aug 7, 2003, in forum: Python
    Replies:
    0
    Views:
    702
    Helmut Jarausch
    Aug 7, 2003
  2. Benjamin Rutt
    Replies:
    2
    Views:
    983
    Peter Hansen
    Dec 20, 2005
  3. Replies:
    5
    Views:
    367
    Scott David Daniels
    May 24, 2006
  4. Casey T
    Replies:
    2
    Views:
    411
    Casey T
    Mar 13, 2008
  5. Badger_1610
    Replies:
    2
    Views:
    582
    Badger_1610
    Sep 1, 2010
Loading...

Share This Page