简体   繁体   中英

Run python script in Canopy in new python shell

Unlike other editors (I use TextWrangler and TextMate on the Mac, and Spyder on the PC), Enthought's Canopy runs the Python programs in an interactive python shell. Most of the time this is nice, but sometimes I would like to run the program in a fresh python shell. For example, I am writing a script to collect frames a high-speed camera. If the script does not run all the way to the end (which happens a lot), then the next time I run the script, it crashes the python shell if I am using Canopy (no problems with other editors or running straight from the command line).

So, is there a way that I can have the program run in a new python shell each time, or maybe reset the python shell before running?

Thanks!

您可以通过选择运行->重新启动内核来重新启动机盖中的python shell。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM