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 rutski
Recipients christian.heimes, rutski
Date 2017-08-10.07:37:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1502350650.67.0.714979837884.issue31172@psf.upfronthosting.co.za>
In-reply-to
Content
Just for kicks I tried the same Py_Main() code from a Win32 console application (instead of from a GUI application). The C code this time was

#include <Python.h>

int wmain(int argc, wchar_t** argv) {
    return Py_Main(argc, argv);
}

The resulting error message when trying to run the program is now

===========================================================
> mypythoncmd.exe -c "import ctypes; ctypes.windll.user32.MessageBoxW(0, 'Hello World!', 'Hello', 0)"

Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

Current thread 0x000009f0 (most recent call first):
OUTPUT ENDS HERE
===========================================================
History
Date User Action Args
2017-08-10 07:37:30rutskisetrecipients: + rutski, christian.heimes
2017-08-10 07:37:30rutskisetmessageid: <1502350650.67.0.714979837884.issue31172@psf.upfronthosting.co.za>
2017-08-10 07:37:30rutskilinkissue31172 messages
2017-08-10 07:37:30rutskicreate