Learn Before
Concept
Passing Arguments
When passing multiple arguments to a command, each argument must be a separate string:
from sh import tar tar("cvf", "/tmp/test.tar", "/my/home/directory")
The reason why arguments need to be separate strings is because shells automatically parse commandline arguments and break them up. They have a complex set of rules to take a single string of a command and arguments and separate them.
0
1
Updated 2021-07-20
Tags
Python Programming Language
Data Science