Access to IO in Anaconda Python 3.6

0 views
Skip to first unread message

EastTNBill

unread,
Jun 26, 2017, 9:42:19 AM6/26/17
to anac...@continuum.io, EastTNBill
I’m a hobby programmer who finds the community edition of Anaconda Python extremely useful. I don’t need the performance in Anaconda’s IOPro, but I’d like to have the Standard Library’s IO module, specifically StringIO.

I see that the CSV module contains a class called StringIO, and I’m wondering if that is fully equivalent to the Python3.x StringIO. If it _isn’t_, how would I go about installing a standard Python3 IO module?

Thanks in advance,
Bill

Michael Sarahan

unread,
Jun 26, 2017, 9:52:47 AM6/26/17
to Anaconda - Public, EastTNBill
StringIO is part of Python's standard library, as you say.  Anything in the standard library ships with Python.



--
Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+unsubscribe@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.

EastTNBill

unread,
Jun 26, 2017, 12:11:25 PM6/26/17
to Michael Sarahan, EastTNBill, Anaconda - Public
Yes, “ships with Python” - but seems not to ship with Anaconda Python. Continuum seems to want to sell their IOPro replacement for the standard IO module. See terminal session below:

$ python
Python 3.6.1 |Anaconda 4.4.0 (x86_64)| (default, May 11 2017, 13:04:09)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import IO
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'IO'
>>> import StringIO
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'StringIO'
>>>

but if I type:

>>> from csv import StringIO
>>>

Hence my question.

Thanks,
Bill

> On Jun 26, 2017, at 9:52 AM, Michael Sarahan <msar...@gmail.com> wrote:
>
> StringIO is part of Python's standard library, as you say. Anything in the standard library ships with Python.
>
> For python 2: https://docs.python.org/2.7/library/io.html
> For python 3: https://docs.python.org/3/library/io.html
>
> On Mon, Jun 26, 2017 at 8:42 AM, EastTNBill <eastt...@gmail.com> wrote:
> I’m a hobby programmer who finds the community edition of Anaconda Python extremely useful. I don’t need the performance in Anaconda’s IOPro, but I’d like to have the Standard Library’s IO module, specifically StringIO.
>
> I see that the CSV module contains a class called StringIO, and I’m wondering if that is fully equivalent to the Python3.x StringIO. If it _isn’t_, how would I go about installing a standard Python3 IO module?
>
> Thanks in advance,
> Bill
>
> --
> Anaconda Community Support Group Brought to you by Continuum Analytics
> ---
> You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+u...@continuum.io.

Michael Sarahan

unread,
Jun 26, 2017, 12:15:01 PM6/26/17
to Anaconda - Public, EastTNBill
Please take a closer look at the link I sent.  You are using python 3, so this class is defined at:


> To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+unsubscribe@continuum.io.

> To post to this group, send email to anac...@continuum.io.
> Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.
>

--
Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+unsubscribe@continuum.io.

Michael Sarahan

unread,
Jun 26, 2017, 12:15:47 PM6/26/17
to Anaconda - Public, EastTNBill
Bear in mind that python is case sensitive.  "import IO" is not the same thing as "import io"

EastTNBill

unread,
Jun 26, 2017, 3:29:05 PM6/26/17
to Michael Sarahan, Anaconda - Public, EastTNBill, Anaconda - Public
Yah, knew that.  Was misled by some documentation I saw _somewhere_ in which there was chapter titled “IO” - should have paid more attention.

Thanks,
Bill
Reply all
Reply to author
Forward
0 new messages