4 ms·
Maybe better to use something like https://docs.python.org/3/library/tarfile.html https://docs.python.org/3/library/tarfile.html instead of calling some "outsid
by dveeden2 3y ago
Maybe better to use something like https://docs.python.org/3/library/tarfile.html https://docs.python.org/3/library/tarfile.html instead of calling some "outside" utilities?
This might be safer (command injection) and maybe more reliable.
However I don't know what I would have chosen and hindsight is always 20/20 and there might be other external commands and requirements...
- kmill 3y agoIf you're wondering about downvotes, it's probably because this is mentioned briefly. > It probably should be using tarfile, but let’s ignore that for the moment.
- carlmr 3y agoApart from that it's mentioned. I have often seen tarfile being replaced by tar as subprocess, because tarfile is just so slow that it can make or break your use-case. I'm not sure if tarfile got better since I've last used it.