title: Python 3.4 : cStringIO vs. StringIO
body: <h1>QUESTION</h1>
  
  <p>I am returning an ImportError: No module named 'cStringIO'.  Unfortunately cStringIO doesn't exist anymore and I need to use StringIO as a replacement.  How can I do this?</p>
  
  <pre><code>import edgar
  import ftplib
  from io import StringIO 
  
  ftp = ftplib.FTP(edgar.FTP_ADDR)
  ftp.login()
  try:
     edgar.download_all(ftp, "/tmp")
  except Exception as e:
     print(e)
  finally:
     ftp.close()
  </code></pre>
  
  <h1>OUTPUT</h1>
  
  <pre><code>Traceback (most recent call last):
  File "/usr/local/lib/ana/lib/python3.4/site-         packages/edgar/downloader.py", line 5, in &lt;module&gt;
  from cStringIO import StringIO
  ImportError: No module named 'cStringIO'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
  File "/home/aranjohn/PycharmProjects/edgar/secEd.py", line 1, in     &lt;module&gt;
  import edgar
  File "/usr/local/lib/ana/lib/python3.4/site-  packages/edgar/__init__.py", line 1, in &lt;module&gt;
  from .downloader import FTP_ADDR, file_list, download, download_all
  File "/usr/local/lib/ana/lib/python3.4/site-  packages/edgar/downloader.py", line 7, in &lt;module&gt;
  from StringIO import StringIO
  ImportError: No module named 'StringIO'
  
  Process finished with exit code 1
  </code></pre>