title: How to select a specific mailbox from IMAP server?
body: <p>I have the following mailboxes on my IMAP server (refer to the attached screenshot).<a href="https://i.stack.imgur.com/xcNii.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xcNii.png" alt="enter image description here"></a></p>
  
  <p>I want to only select the mailbox Folder1 and check if there are any sub-directories. I already tried the following code:</p>
  
  <pre><code>svr = imaplib.IMAP4_SSL(imap_address)
  svr.login(user, pwd)
  svr.select('inbox') &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
  rv, data = svr.search(None, "ALL")
  test, folders = svr.list('""', '*')
  print(folders)
  </code></pre>
  
  <p>I thought changing 'inbox' to 'folder1' (statement indicated with arrows) would select Folder1 and then I can retrieve the sub-directories. But nothing happened and still it shows the same result as 'inbox'. </p>
  
  <p>Can somebody help me understand what I am doing wrong here.</p>