title: What's causing this imaplib error in Python script for AppEngine?
body: <p>This script:</p>
  
  <pre><code>    import imaplib
  
      user = "dave.trindall@gmail.com"
      pwd = "***"
  
      m = imaplib.IMAP4_SSL("imap.gmail.com")
      m.login(user,pwd)
      m.select("Inbox") # here you a can choose a mail box like INBOX instead
      m.search("NEW")
  </code></pre>
  
  <p>makes this error for me:</p>
  
  <pre><code>Traceback (most recent call last):
    File "c:\Program Files\Google\google_appengine\google\appengine\ext\webapp\_webapp25.py", line 701, in __call__
      handler.get(*groups)
    File "c:\Users\Dave\git_stuff\Touch Base\Touch Base\main.py", line 30, in get
      m = imaplib.IMAP4_SSL("imap.gmail.com")
    File "c:\Python26\lib\imaplib.py", line 1138, in __init__
      IMAP4.__init__(self, host, port)
    File "c:\Python26\lib\imaplib.py", line 163, in __init__
      self.open(host, port)
    File "c:\Python26\lib\imaplib.py", line 1149, in open
      self.sock = socket.create_connection((host, port))
  AttributeError: 'module' object has no attribute 'create_connection'
  </code></pre>
  
  <p>Why?</p>