updated python script to take palate shot when space bar is pressed.