Patrick Rutkowski added the comment:

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):

assignee:  -> christian.heimes
components: +SSL
nosy: +christian.heimes

Python tracker <>
Python-bugs-list mailing list

Reply via email to