[Tutor] How to stop a script.

Ian Egland ian505 at gmail.com
Fri Dec 28 17:36:37 CET 2007


Hi everyone... I litterally just started python and did the following 'hello
world' related tutorial.

http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro
<http://hkn.eecs.berkeley.edu/%7Edyoo/python/idle_intro>

Being the kind of person who like to experiment, I tried changing the
following script from:

print "Hello World!"
print "Here are the ten numbers from 0 to 9, just in case you can't count."
for i in range(10):
    print i,

print "I'm done!"

to:

print "Hello World!"
print "Here are the ten numbers from 0 to 9, just in case you can't count."
for i in range(10000000):
    print i,

print "I'm done!


Now I am stuck staring at IDLE as it prints out all 10million numbers.....
Is there a way other than closing the shell to stop a script midway through
execution?

-Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20071228/e9a66bff/attachment.htm 


More information about the Tutor mailing list