How do I close all pyplot windows (including ones from previous script executions)?
On *nix you can use killall command.  
killall app 
closes every instance of window with app for the window name.
You can also use the same command from inside your python script.
You can use os.system("bashcommand") to run the bashcommand.
So I have some python code that plots a few graphs using pyplot. Every time I run the script new plot windows are created that I have to close manually. How do I close all open pyplot windows at the start of the script? Ie. closing windows that were opened during previous executions of the script?
In MatLab this can be done simply by using closeall.