Closed gokhanm closed 7 years ago
I prefer the API to require a list to avoid issues with escaping and splitting. For instance, just splitting on whitespace might give unexpected behaviour if it contains quotes.
An alternative is to run the command through an actual shell, for instance:
cmd = "echo -n hello"
shell.run(["sh", "-c", cmd])
Yea you are right. it may cause a problem.
If i'll use spur module in my project. I want to write shell commands in str variable instead of the list. I think it's easy and fast way to do this.
Do you accept PR like below for local.py, shell.py etc. ?