|
|
|
|
|
by ptx
1438 days ago
|
|
> For smallish scripts, I really like Ruby's backticks for easily executing shell commands. Executing external commands is pretty convenient in Python these days, now that we have subprocess.run [1], and passing the command as a list rather than through the shell seems a lot safer. Doesn't backticks open up the classic command injection issues (i.e. the same kind problem as SQL injection with non-parameterized queries) unless you're extremely careful to manually apply proper quoting in every single case? [1] https://docs.python.org/3/library/subprocess.html#subprocess... |
|