Hacker News new | ask | show | jobs
by sgtnoodle 2050 days ago
I've had good success with shebangs combined with zip archives containing python code. Zip files use a footer rather than a header, and python natively supports executing scripts out of them. The beginning of the file can have a shebang, allowing it to specify the interpreter to use. The only trick is that windows doesn't support shebangs, and so you need to associate your chosen file extension with python on every system. Also, you need python installed obviously.

What that gives you is a stable entry point into python code. From there, you can run whatever platform specific code you want.