[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

package import

Sean T Allen

2/6/2008 3:45:00 AM

ok, what am i doing wrong?

in current working directory i have:

t.py
sub/t1.py

t.py is:

import sub.t1

i get:

ImportError: No module named sub.t1

t.py is

import sub

i get:

ImportError: No module named sub.t1

--

i am obviously missing something really basic here.
have tried on multiple machines, linux and mac os x.

thanks in advance.


2 Answers

Diez B. Roggisch

2/6/2008 9:57:00 AM

0

Sean Allen wrote:

> ok, what am i doing wrong?
>
> in current working directory i have:
>
> t.py
> sub/t1.py
>
> t.py is:
>
> import sub.t1
>
> i get:
>
> ImportError: No module named sub.t1
>
> t.py is
>
> import sub
>
> i get:
>
> ImportError: No module named sub.t1
>
> --
>
> i am obviously missing something really basic here.
> have tried on multiple machines, linux and mac os x.

http://docs.python.org/tut/node8.html#SECTION00840000000...

Diez

Sean T Allen

2/6/2008 9:54:00 PM

0

Thanks. Found that 10 minutes after I sent.

On Feb 6, 2008, at 4:57 AM, Diez B. Roggisch wrote:

> Sean Allen wrote:
>
>> ok, what am i doing wrong?
>>
>> in current working directory i have:
>>
>> t.py
>> sub/t1.py
>>
>> t.py is:
>>
>> import sub.t1
>>
>> i get:
>>
>> ImportError: No module named sub.t1
>>
>> t.py is
>>
>> import sub
>>
>> i get:
>>
>> ImportError: No module named sub.t1
>>
>> --
>>
>> i am obviously missing something really basic here.
>> have tried on multiple machines, linux and mac os x.
>
> http://docs.python.org/tut/node8.html#SECTION00840000000...
>
> Diez
> --
> http://mail.python.org/mailman/listinfo/p...