Message276553
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. |
|
Date |
User |
Action |
Args |
2016-09-15 13:59:00 | paul.moore | set | recipients:
+ paul.moore, tds333, christian.heimes, tim.golden, zach.ware, steve.dower |
2016-09-15 13:59:00 | paul.moore | set | messageid: <1473947940.1.0.156268567169.issue28137@psf.upfronthosting.co.za> |
2016-09-15 13:59:00 | paul.moore | link | issue28137 messages |
2016-09-15 13:58:59 | paul.moore | create | |
|