How does os.system differ from command line?
问题 Why does os.system('command') from my python interpreter not have the same output as command from the terminal? Question explained quickly : I have echo $CONFPATH /home/claramart/Datamart/Parameter but os.system('echo $CONFPATH') 0 Why is that? Details : I want to get my environment $CONFPATH. I'm using python3.5 and ubuntu16.04.2. I can do this from command line : echo $CONFPATH /home/claramart/Datamart/Parameter This is the answer I want. Executing it as a python command from command line