Re: Difference between import in script and from interpreter

2010-07-19 Thread Jean-Michel Pichavant
Steven D'Aprano wrote: On Mon, 19 Jul 2010 00:53:56 -0400, Edward Diener wrote: In a python script a: from xxx.yyy.zzz import aaa fails with the message: "ImportError: No module named xxx.yyy.zzz" but from within the python interpreter the same line succeeds. What would be the causes of

Re: Difference between import in script and from interpreter

2010-07-19 Thread News123
Edward Diener wrote: > In a python script a: > > from xxx.yyy.zzz import aaa > > fails with the message: > > "ImportError: No module named xxx.yyy.zzz" > > but from within the python interpreter the same line succeeds. What > would be the causes of that ? > > From within the python interpreter

Re: Difference between import in script and from interpreter

2010-07-18 Thread Steven D'Aprano
On Mon, 19 Jul 2010 00:53:56 -0400, Edward Diener wrote: > In a python script a: > > from xxx.yyy.zzz import aaa > > fails with the message: > > "ImportError: No module named xxx.yyy.zzz" > > but from within the python interpreter the same line succeeds. What > would be the causes of that ? >

Difference between import in script and from interpreter

2010-07-18 Thread Edward Diener
In a python script a: from xxx.yyy.zzz import aaa fails with the message: "ImportError: No module named xxx.yyy.zzz" but from within the python interpreter the same line succeeds. What would be the causes of that ? From within the python interpreter I have looked at sys.path and xxx.yyy.zz