I know related questions where already posted, but I cannot get a hang of them.
I have a Powershell-command and put it in Python in a string, say string aa
.
How can I run command aa
from Python. I know I should use subprocess
, but I am not sure in what way.
Think of aa
as cd ../data
to get from the current folder to another folder, but also more complicated commands are possible, such as:
docker run --rm -v $pwd\xml\:C:\xml -i LocationOfRegistry powershell /C 'cat C:\xml\*.xml | python .\core-wrap\run.py' > output.csv
Thanks in advance