title: TorCtl and Socksipy library raises exception in python
body: <p>I'm writing a script in python.<br>
  My script uses urllib2 to read web pages.<br>
  I'm using <a href="http://sourceforge.net/projects/socksipy/" rel="nofollow">Socksipy</a> to force urllib2 to use socks proxy (TOR).<br>
  My problem is after setting <code>socket.socket</code> TorCtl doesn't work and raises exception.<br>
  the code that doesn't work is (first <code>newTorId()</code> works and second fails!):  </p>
  
  <pre><code>  newTorId()      #This works
    import socks
    import socket
    socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "localhost", 9050)
    socket.socket = socks.socksocket
    newTorId()     #this Fails!
  </code></pre>
  
  <p><code>newTorId</code> is defined as this:</p>
  
  <pre><code>from TorCtl import TorCtl
  def newTorId():
      conn = TorCtl.connect(passphrase="test")
      conn.send_signal("NEWNYM")
  </code></pre>
  
  <p>The exception is:  </p>
  
  <pre><code>__init__() takes exactly 2 arguments (3 given)
  Traceback (most recent call last):
    File "script.py", line 97, in &lt;module&gt;
      newTorId()
    File "script.py", line 27, in newTorId
      conn.send_signal("NEWNYM")
  AttributeError: 'NoneType' object has no attribute 'send_signal'
  </code></pre>
  
  <p>What is the problem?</p>