title: How can I print the type of a PyObject in an error message for an embedded Python script?
body: <p>My C++ code has this check in it:</p>
  
  <pre><code>if (1 != PyString_Check( key ))
  </code></pre>
  
  <p>and I'd like to get a "char*" of the type that it actually is in order to provide a more useful error message. Using the C API for Python, how would I do this?</p>