VPython 7.4.2 available: Much easier to kill a program run from terminal or launcher

37 views
Skip to first unread message

Bruce Sherwood

unread,
Mar 22, 2018, 2:57:52 PM3/22/18
to VPython-users
Many thanks to John Coady for major improvements in running and rerunning a program from a terminal or from a launcher such as Spyder. 

It had been the case that when running from a terminal, ctrl-C wouldn't kill a running program, and even if you killed the program by closing the browser, on Windows you had to kill the terminal and start a new one before being able to do anything again. Also, when running from Spyder, every time you re-ran a program a new browser tab was used and the old browser tab remained open, which was definitely annoying.

With VPython 7.4.2, in a terminal ctrl-C kills the browser tab and returns control to the terminal, and similarly in Spyder re-running a program kills the browser tab and creates a new one. The exception in both cases is that if the program is not running an infinite animation loop you have to have to close the tab manually, but at least control does return to a terminal. If you want the full benefit of what John has done, you can add an infinite loop to the end of a program that doesn't have one, like this:

while True:
    rate(1)

Update to VPython 7.4.2. Thanks to Matt Craig for building the 7.4.2 installers.

If using Anaconda, get the latest version this way: conda update -c vpython vpython

Otherwise, use this: pip install vpython --upgrade

Bruce
Reply all
Reply to author
Forward
0 new messages