I already tried with
import os
os.system('do stuff')
but i need this to "save the state of what it has done" for example:
os.system('dir')
os.system('cd ..')
os.system('dir')
In this code, the dir will return the same thing, because the cd ..
does not apply. how can i do something like that?
I also need to store the output in a variable.