title: How can I percent-encode URL parameters in Python?
body: <p>If I do</p>
  <pre><code>url = &quot;http://example.com?p=&quot; + urllib.quote(query)
  </code></pre>
  <ol>
  <li>It doesn't encode <code>/</code> to <code>%2F</code> (breaks OAuth normalization)</li>
  <li>It doesn't handle Unicode (it throws an exception)</li>
  </ol>
  <p>Is there a better library?</p>