3 ms·
i write some Python scripts that are just a single file and import only from the standard library. If you’re competing with bash this is fine. For instance I
by PaulHoule 4y ago
i write some Python scripts that are just a single file and import only from the standard library. If you’re competing with bash this is fine. For instance I have a python script that burns compact discs like
https://en.wikipedia.org/wiki/5.1_Music_Disc https://en.wikipedia.org/wiki/5.1_Music_Disc
unpacks an archive, validates the content with sox, rewrites the .cue file, uses wodim to do the writing, etc. i have other scripts that do “iot” sorts of things and those really need to import from libraries to access a message queue or other APIs.
With python it is often common to require a special python too, for instance i had a script that ran too slow with cpython but was fine with python but i can’t use pypy for everything as pytorch doesn’t work.
Another option is https://docs.python.org/3/library/zipapp.html https://docs.python.org/3/library/zipapp.html which is maturing in various forms and a lot like packaging a java application in a jar.