Newbie packages Q

MarkyMarc marcsgbrevkonto at gmail.com
Sun Oct 7 22:22:10 CEST 2007


On Oct 7, 10:05 pm, al... at mac.com (Alex Martelli) wrote:
> MarkyMarc <marcsgbrevko... at gmail.com> wrote:
>
>    ...
>
> > > > And sys.path is  /python/Test/bpack
>
> sys.path must be a LIST.  Are you saying you set yours to NOT be a list,
> but, e.g., a STRING?!  (It's hard to tell, as you show no quotes there).
>
> > > The 'Test' package is *not* in your sys.path.
>
> > I can say yes to the first:
> > The atest.py is in the right dir/package.
> > And the third. If it is not good enough that this /python/Test/bpack
> > is in the path.
> > Then I can not understand the package thing.
>
> > I also tried to put /python/ and /python/Test in the sys.path same
> > result.
>
> If the only ITEM in the list that is sys.path is the string '/python',
> then any Python code you execute will be able to import Test.apack (as
> well as Test.bpack, or just Test).
>

Of course I have more than just the /python string in the sys.path.
I have a list of paths, depending on which system the code run on.




More information about the Python-list mailing list