title: Python script hanging
body: <p>This is the piece of code I am trying to execute. It's hanging after printing 'creating'. Can someone help me how to debug these kind of issues.</p>
  <pre><code>print('creating')
  self.imap = imaplib.IMAP4_SSL(config.imap_server,config.imap_port)
  print('imap config done')
  r, d = self.imap.login(username, password)
  print('login')
  assert r == 'OK', 'login failed: %s' % str (r)
  print(&quot; &gt; Signed in as %s&quot; % self.username, d)
  </code></pre>