2 ms·
Very cool! Is there a way to make a single executable file with the python build and our own python script files?
by jeremyjh 4y ago
Very cool! Is there a way to make a single executable file with the python build and our own python script files?
- jart 4y agoIndeed! Try this: # git clone https://github.com/cosmopolitan # make -j8 o//third_party/python/python.com wget https://justine.lol/ftrace/python.com mkdir .python printf 'print("hello world")\n' >.python/hello.py printf -- '-m\nhello\n' >.args zip -r python.com .python .args chmod +x ./python.com ./python.com This is a great way for white-labeling the APE Python interpreter as your own program. You just put your source code inside the executable using the zip command. Then you add a .args file that specifies the default argv[] array if the user didn't specify any arguments.