This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.moore
Recipients christian.heimes, paul.moore, steve.dower, tds333, tim.golden, zach.ware
Date 2016-09-15.13:58:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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"

#include <windows.h>

int wmain()
    wchar_t **myargv = malloc((__argc + 3) * sizeof(wchar_t*));
    int i;
    myargv[0] = __wargv[0];
    myargv[1] = L"";
    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 "" 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:00paul.mooresetrecipients: + paul.moore, tds333, christian.heimes, tim.golden, zach.ware, steve.dower
2016-09-15 13:59:00paul.mooresetmessageid: <>
2016-09-15 13:59:00paul.moorelinkissue28137 messages
2016-09-15 13:58:59paul.moorecreate