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
Post a Comment