Guest User

Untitled

a guest
Oct 26th, 2011
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. Index: PythonAI.cpp
  2. ===================================================================
  3. --- PythonAI.cpp (revision 4441)
  4. +++ PythonAI.cpp (working copy)
  5. @@ -161,7 +161,12 @@
  6. FreeOrionPython::SetWrapper<int>::Wrap("IntSet");
  7. FreeOrionPython::SetWrapper<std::string>::Wrap("StringSet");
  8. }
  9. -
  10. +
  11. +#if PY_VERSION_HEX >= 0x03000000
  12. +# define initfreeOrionLogger PyInit_freeOrionLogger
  13. +# define initfreeOrionAIInterface PyInit_freeOrionAIInterface
  14. +#endif
  15. +
  16. //////////////////////
  17. // PythonAI //
  18. //////////////////////
  19. @@ -223,7 +228,7 @@
  20. " freeOrionLogger.error(stng)\n"
  21. "sys.stdout = debugLogger()\n"
  22. "sys.stderr = errorLogger()\n"
  23. - "print 'Python stdout and stderr redirected'";
  24. + "print ('Python stdout and stderr redirected')";
  25. object ignored = exec(logger_script.c_str(), s_main_namespace, s_main_namespace);
  26. } catch (error_already_set err) {
  27. Logger().errorStream() << "Unable to redirect Python stdout and stderr.";
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment