title: Python 3.1.1 string to hex
body: <p>I am trying to use <code>str.encode()</code> but I get</p>
  
  <pre><code>&gt;&gt;&gt; "hello".encode(hex)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: must be string, not builtin_function_or_method
  </code></pre>
  
  <p>I have tried a bunch of variations and they seem to all work in Python 2.5.2, so what do I need to do to get them to work in Python 3.1?</p>