Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe better to use something like 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...



If 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.


Apart 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: