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.
2 parents 654066c + 6907d29 commit c6e45a1Copy full SHA for c6e45a1
PyStand.cpp
@@ -320,10 +320,11 @@ const char *init_script =
320
" if os.path.exists(test): sys.path.append(test)\n"
321
"sys.path.append(os.path.abspath(PYSTAND_HOME))\n"
322
"sys.argv = [PYSTAND_SCRIPT] + sys.argv[1:]\n"
323
-"text = open(PYSTAND_SCRIPT).read()\n"
+"text = open(PYSTAND_SCRIPT, 'rb').read()\n"
324
+"code = compile(text, PYSTAND_SCRIPT, 'exec')\n"
325
"environ = {'__file__': PYSTAND_SCRIPT, '__name__': '__main__'}\n"
326
"environ['__package__'] = None\n"
-"exec(text, environ)\n"
327
+"exec(code, environ)\n"
328
"";
329
330
0 commit comments