title: How to determine file, function and line number?
body: <p>In C++, I can print debug output like this:</p>
  
  <pre><code>printf(
     "FILE: %s, FUNC: %s, LINE: %d, LOG: %s\n",
     __FILE__,
     __FUNCTION__,
     __LINE__,
     logmessage
  );
  </code></pre>
  
  <p>How can I do something similar in Python?</p>