title: How to get the width of a string in pixels?
body: <p>I am using wxPython's HyperTreeList and I want to set the column width exactly equal to length of the largest string in it.</p>
  
  <p>To accomplish that, I'd like to to convert a python string size into pixels.</p>
  
  <p>For Example: If we have a string like </p>
  
  <pre><code>str = "python"
  len(str) = 6
  </code></pre>
  
  <p>How could I convert the above string length/size into pixels?</p>
  
  <p>Is there another way?</p>