DEV Community

Discussion on: Looking for scripting language

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

I don't think you're going to find a decent option that doesn't bundle the whole runtime into the binary. The problem is that you need that if you want it to be truly independent of the host system, because otherwise you have to depend on whatever the target systems happen to have installed. Keep in mind though that that's a (mostly) static overhead. The bigger your tool, the less that matters.

You might also want to look into Python's support for packages/scripts bundled as ZIP files. If you can ensure a consistent Python version and all the libraries being installed on each target system, you can bundle all the files for a script into a ZIP file, name the main one __main__.py and put it at the root of the ZIP file, and then just invoke the ZIP file like a Python script. Supported by both 2.7 and recent 3.x versions. Relevant documentation is here. Obviously this won't work for double-clicking on a script from the GUI, but given that you're talking about automation you should be able to bundle the ZIP file into a script itself that just works (either as part of a shell archive for UNIX-like systems, or an executable for Windows using a small C stub program that should never need to change).

Collapse
 
mcsneaky profile image
McSneaky

Aah, that seems to be quite interesting, didn't know you can package stuff like this. Not a Python dev and this PIP package management has always been pain imo. Will look into it :) Thanks!