Basically, os.system()
can execute shall commands, such as:
os.system("echo $A")
It will work well and output value environment variable A
.
But this seems to not work:
os.system("A=b echo $A")
It won't output "b" as expected.
How Python can execute this type of command command?