linux - Python- Check terminal shell if changed from the environmental shell -


when terminal opened, environmental shell set. if type "csh" starts running c shell program within bash terminal. question is, python script, how can check determine if csh has been executed prior starting python script.

thanks

you can check shell environment using

import os shell = os.environ['shell'] 

then can make sure shell set /bin/csh


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -