Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: PythonAI.cpp
- ===================================================================
- --- PythonAI.cpp (revision 4441)
- +++ PythonAI.cpp (working copy)
- @@ -161,7 +161,12 @@
- FreeOrionPython::SetWrapper<int>::Wrap("IntSet");
- FreeOrionPython::SetWrapper<std::string>::Wrap("StringSet");
- }
- -
- +
- +#if PY_VERSION_HEX >= 0x03000000
- +# define initfreeOrionLogger PyInit_freeOrionLogger
- +# define initfreeOrionAIInterface PyInit_freeOrionAIInterface
- +#endif
- +
- //////////////////////
- // PythonAI //
- //////////////////////
- @@ -223,7 +228,7 @@
- " freeOrionLogger.error(stng)\n"
- "sys.stdout = debugLogger()\n"
- "sys.stderr = errorLogger()\n"
- - "print 'Python stdout and stderr redirected'";
- + "print ('Python stdout and stderr redirected')";
- object ignored = exec(logger_script.c_str(), s_main_namespace, s_main_namespace);
- } catch (error_already_set err) {
- Logger().errorStream() << "Unable to redirect Python stdout and stderr.";
Advertisement
Add Comment
Please, Sign In to add comment