title: How can I get output of PyErr_Print in windows or save it as a string
body: <p>I am writing embedded python interpretor, there is a function <code>PyErr_Print()</code> (<a href="https://docs.python.org/3/c-api/exceptions.html" rel="nofollow">https://docs.python.org/3/c-api/exceptions.html</a>) which writes to standard error text explaining why C function I called failed.</p>
  
  <p>This doesn't seem to work on windows as it never writes anything to terminal, is there a way to redirect it somewhere, or store as a string so that I can see it?</p>