anonymous
  • anonymous
I run this code http://dpaste.com/795269/ and it generates a graphic. After that I run the code again and it generates the following error: "The python shell window is already executing a command; please wait until it is finished." How can I run the code again without the error?
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
lopus
  • lopus
when you downloaded pylab you should saved your files inside this folder and you can execute
anonymous
  • anonymous
Can you be a little more specific please?
lopus
  • lopus
inside the folder you downloaded you should keep your archivos.py and you will not have problems

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
I copied my MIT 6.00 folder into c:\python25 folder and it still generates the same error.
anonymous
  • anonymous
pylab is an extension of matplotlib - i know in matplot lib that it doesn't like it at all if you do not close the plot b4 moving on to executing more code - there are some caveats in the matplotlib documentation about useing the plot.close() method after opening a plot - can't remember the specifics but after a while i started putting a plot.close() statement right after the open() statement ..
anonymous
  • anonymous
There is no open() statement in the code. If I put pylab.close() after pylab.show() it doesn't fix it.
anonymous
  • anonymous
are you 'closing' the figures?
anonymous
  • anonymous
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.show are you running it from a module or at a shell/idle prompt?
anonymous
  • anonymous
http://matplotlib.sourceforge.net/faq/howto_faq.html#use-show
anonymous
  • anonymous
I'm using the code in the first post in idle. It's from lecture 13. The first time I run it, everything is ok. Then I close the figure and run it again and it generates the error. If i close python and open it again it runs well.
anonymous
  • anonymous
this http://dpaste.com/795394/ worked for me - i got a figure for each show() with no complaining
anonymous
  • anonymous
That is 2 figures in the same script. Try to run the code that I posted twice. Just close the graphic after the first run and see what happens.
anonymous
  • anonymous
so if put those statements in a file/script/module and ran them (F5) and it produced a figure with two lines. I closed the figure and at the shell prompt ran pylab.show() and got the figure again ... when you say 'run it twice' what does that mean exactly? F5 afain for the script/module window? do you get a traceback? if so can you post it
anonymous
  • anonymous
1) I put this code in a script 2) I run it (F5) 3) I close the graphic that it generated 4) I run it again (F5) I get no graphic and this error: "The python shell window is already executing a command; please wait until it is finished."
anonymous
  • anonymous
i 'ran' it several times like you described without fault. when you close the figures, do you get a prompt in the IDLE shell? can you run anything in the shell?
anonymous
  • anonymous
No.

Looking for something else?

Not the answer you are looking for? Search for more explanations.