python check if running interactively