Newbie packages Q
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Sun Oct 7 14:00:08 EDT 2007
MarkyMarc a écrit :
> On Oct 7, 6:04 pm, Bruno Desthuilliers <bruno.
(snip)
>> But how do I get this to work?
>> You failed to specify how your files are organized, and what is "not
>> working".
>>
>> But anyway, if
>> - atest.py is in <wherever>/Test/apack,
>> - both Test and apack have a __init__.py
>> - <wherever> is in the sys.path,
>>
>> then this should just work AFAICT.
>
> If you se me first post you will see have me files are organized.
Could have changed.
> But like this:
>
> Test/
> __init__.py (a empty file)
> apack/
> __init__.py (a empty file)
> atest.py
> bpack/
> __init__.py (a empty file)
> btest.py
>
> And also in me first post(and others),
> all I get is an import error: ImportError: cannot import name apack.
>
> And sys.path is /python/Test/bpack
And you do wonder why you can't import ? Please reread with attention
the first and third points listed above (following the 'But anyway').
The 'Test' package is *not* in your sys.path.
More information about the Python-list
mailing list