Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Import Problem on WIndows py3

21 views
Skip to first unread message

jimmy...@gmail.com

unread,
Sep 4, 2012, 3:49:25 PM9/4/12
to
I have a main program and a 3rd party module. Trying to import colorama, where colorama is a folder with files in it, returns an ImportError: No module named colorama. How should I import folders?

Werner Thie

unread,
Sep 4, 2012, 4:45:30 PM9/4/12
to pytho...@python.org
On 9/4/12 9:49 AM, jimmy...@gmail.com wrote:
> I have a main program and a 3rd party module. Trying to import colorama, where colorama is a folder with files in it, returns an ImportError: No module named colorama. How should I import folders?
>


Do you have a (empty) __init__.py file present in this particular directory?

Werner

Jimbo Jim

unread,
Sep 4, 2012, 4:52:29 PM9/4/12
to pytho...@python.org, wer...@thieprojects.ch
On Tuesday, September 4, 2012 1:45:55 PM UTC-7, Werner Thie wrote:
> On 9/4/12 9:49 AM, jimmyli1528 wrote:
>
> > I have a main program and a 3rd party module. Trying to import colorama, where colorama is a folder with files in it, returns an ImportError: No module named colorama. How should I import folders?
>
> >
>
>
>
>
>
> Do you have a (empty) __init__.py file present in this particular directory?
>
>
>
> Werner

OK works perfectly!

Jimbo Jim

unread,
Sep 4, 2012, 4:52:29 PM9/4/12
to comp.lan...@googlegroups.com, pytho...@python.org
On Tuesday, September 4, 2012 1:45:55 PM UTC-7, Werner Thie wrote:
> On 9/4/12 9:49 AM, jimmyli1528 wrote:
>
> > I have a main program and a 3rd party module. Trying to import colorama, where colorama is a folder with files in it, returns an ImportError: No module named colorama. How should I import folders?
>
> >
>
>
>
>
>
> Do you have a (empty) __init__.py file present in this particular directory?
>
>
>
> Werner

OK works perfectly!
0 new messages