title: How to convert a url string to safe characters with python?
body: <p>Suppose I have the following string:</p>
  
  <pre><code>"http://earth.google.com/gallery/kmz/women_for_women.kmz?a=large"
  </code></pre>
  
  <p>Is there some function or module to be able to convert a string like the above to a string below where all the characters are changed to be compliant with a url:</p>
  
  <pre><code>"http%3A%2F%2Fearth.google.com%2Fgallery%2Fkmz%2Fwomen_for_women.kmz%3Fa%3Dlarge"
  </code></pre>
  
  <p>What is the best way to do this in python?</p>