We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a66007 commit 6171cd6Copy full SHA for 6171cd6
PyStand.cpp
@@ -336,7 +336,17 @@ const char *init_script =
336
"code = compile(text, PYSTAND_SCRIPT, 'exec')\n"
337
"environ = {'__file__': PYSTAND_SCRIPT, '__name__': '__main__'}\n"
338
"environ['__package__'] = None\n"
339
+#ifndef PYSTAND_CONSOLE
340
+"try:\n"
341
+" exec(code, environ)\n"
342
+"except:\n"
343
+" import traceback, io\n"
344
+" sio = io.StringIO()\n"
345
+" traceback.print_exc(file = sio)\n"
346
+" os.MessageBox(sio.getvalue(), 'Error')\n"
347
+#else
348
"exec(code, environ)\n"
349
+#endif
350
"";
351
352
0 commit comments