Paul Moore added the comment:
You can actually handle this already, with a simple wrapper program (based on
the one in PC\WinMain.c):
/* Minimal main program -- everything is loaded from the library. */
#include "Python.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
int wmain()
{
wchar_t **myargv = malloc((__argc + 3) * sizeof(wchar_t*));
int i;
myargv[0] = __wargv[0];
myargv[1] = L"myapp.zip";
for (i = 1; i < __argc; ++i) {
myargv[1+i] = __wargv[i];
}
myargv[1+i] = 0;
return Py_Main(__argc+1, myargv);
}
This injects your application name "myapp.zip" as the first argument and then
calls the Python main interpreter. Run this with a conventional embedded
Python, and you have a standalone application.
You can easily tidy the above sample up (it's just a quick hack) to make it
generic by working out the name of the zipped Python application from the exe
name.
But thanks for the idea - I hadn't really thought about doing something like
this until you prompted me to investigate.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28137>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com