title: Python paramiko logging messes up stfp connection
body: <p>I am using paramiko to open a sftp connection to access a remote file. All my code below in a built in function seems to work only if I don't have the logging enabled for paramiko:</p>
  
  <pre><code>      paramiko.util.log_to_file( 'paramiko.log' )
  </code></pre>
  
  <p>So when I do NOT have the above line of code in my file the code below works: </p>
  
  <pre><code>        client = paramiko.SSHClient()
          client.load_system_host_keys()
          client.set_missing_host_key_policy( paramiko.AutoAddPolicy() )
          client.connect( hostname,user, password)
          sftp = client.open_sftp()
          file = sftp.open( fpath, mode='r', bufsize=1 )
  </code></pre>
  
  <p>Otherwise python will hang on this line <strong>client.connect( hostname,user, password)</strong> and writes to the stderr log like crazy eventually killing the VM my code is running on. </p>
  
  <p>Specifically paramiko hangs on this line: </p>
  
  <pre><code>t.start_client()
  </code></pre>
  
  <p>within the client.connect method. Nothing useful comes out in the paramiko log and stderr is filled with errors with no description or tracebacks. </p>
  
  <p>Researching this problem I came across "There is a single import lock available so when a child thread attempts another import it can block it indefinitely" how do I make sure the code opening a sftp connection is never blocked?</p>