Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42756 > unrolled thread

Error running any script in IDLE

Started bymattgraves7@gmail.com
First post2013-04-04 08:16 -0700
Last post2013-04-04 17:12 +0100
Articles 6 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  Error running any script in IDLE mattgraves7@gmail.com - 2013-04-04 08:16 -0700
    Re: Error running any script in IDLE Chris Angelico <rosuav@gmail.com> - 2013-04-05 02:29 +1100
      Re: Error running any script in IDLE mattgraves7@gmail.com - 2013-04-04 08:33 -0700
        Re: Error running any script in IDLE Chris Angelico <rosuav@gmail.com> - 2013-04-05 02:38 +1100
      Re: Error running any script in IDLE mattgraves7@gmail.com - 2013-04-04 08:33 -0700
    Re: Error running any script in IDLE Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-04-04 17:12 +0100

#42756 — Error running any script in IDLE

Frommattgraves7@gmail.com
Date2013-04-04 08:16 -0700
SubjectError running any script in IDLE
Message-ID<bb3ec5db-e9e3-46e5-8404-e29805c149ed@googlegroups.com>
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. 

[toc] | [next] | [standalone]


#42758

FromChris Angelico <rosuav@gmail.com>
Date2013-04-05 02:29 +1100
Message-ID<mailman.103.1365089398.3114.python-list@python.org>
In reply to#42756
On Fri, Apr 5, 2013 at 2:16 AM,  <mattgraves7@gmail.com> 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

[toc] | [prev] | [next] | [standalone]


#42759

Frommattgraves7@gmail.com
Date2013-04-04 08:33 -0700
Message-ID<6b0a1f2c-21ff-4ff0-9d57-2a155a27ca2b@googlegroups.com>
In reply to#42758
Thanks Chris, that worked. Like I said, I'm fairly new to python so I am still learning the ins and outs. Thank you. 

[toc] | [prev] | [next] | [standalone]


#42760

FromChris Angelico <rosuav@gmail.com>
Date2013-04-05 02:38 +1100
Message-ID<mailman.104.1365089888.3114.python-list@python.org>
In reply to#42759
On Fri, Apr 5, 2013 at 2:33 AM,  <mattgraves7@gmail.com> 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

[toc] | [prev] | [next] | [standalone]


#42764

Frommattgraves7@gmail.com
Date2013-04-04 08:33 -0700
Message-ID<mailman.107.1365091885.3114.python-list@python.org>
In reply to#42758
Thanks Chris, that worked. Like I said, I'm fairly new to python so I am still learning the ins and outs. Thank you. 

[toc] | [prev] | [next] | [standalone]


#42763

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2013-04-04 17:12 +0100
Message-ID<mailman.106.1365091813.3114.python-list@python.org>
In reply to#42756
On 04/04/2013 16:16, mattgraves7@gmail.com 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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web