[1]: https://docs.python.org/3/library/subprocess.html#security-c...
[1]: https://docs.python.org/3/library/subprocess.html#security-c...
The cumulative probability of every `ffmpeg-english` command ever sent to OpenAI will likely be <5%, if not <1%, of all of the possible responses GPT-4 could give.
I was just wondering what hilarious personal programming lottery stories people are not telling us.
I rolled short 6 digit random unique orderNumbers one time and dropped the leading zeroes. There is an order without a number now.
This is why my advice to everyone is to use python's stdlib as much as possible, and avoid using Python's external libraries unless they significantly simplify code.
Plumbum seems nice (and also is packaged in debian/ubuntu, which is a plus), but it does not seem to be significantly safer than correctly written subprocess code, and it won't even save that much lines in this particular example.
I agree that a standard interface is always better, however not at the cost of productivity. A better than the current Subprocess interface is needed, and I think plumbum is the direction to go.
That said, there is a bunch of rules in our internal style guide about this process, such as: avoid shell=True unless you need shell functionality and know how shell quoting works; use python instead of tools like grep/head/aws/etc.. when performance permits; check returncode after Popen calls; correctly quote ssh args (they are tricky!)