Re: Two import questions in Python 3.0

2009-01-24 Thread Kay Schluehr
On 24 Jan., 18:51, Scott David Daniels wrote: > Kay Schluehr wrote: > > On 24 Jan., 09:21, "Gabriel Genellina" wrote: > >> If you run A.py as a script, it does not "know" it lives inside a package. > >> You must *import* A for it to become aware of the package. > >> Also, the directory containing

Re: Two import questions in Python 3.0

2009-01-24 Thread Scott David Daniels
Kay Schluehr wrote: On 24 Jan., 09:21, "Gabriel Genellina" wrote: If you run A.py as a script, it does not "know" it lives inside a package. You must *import* A for it to become aware of the package. Also, the directory containing the script comes earlier than PYTHONPATH entries in sys.path --

Re: Two import questions in Python 3.0

2009-01-24 Thread Kay Schluehr
On 24 Jan., 09:21, "Gabriel Genellina" wrote: > If you run A.py as a script, it does not "know" it lives inside a package. > You must *import* A for it to become aware of the package. > Also, the directory containing the script comes earlier than PYTHONPATH > entries in sys.path -- so watch for t

Re: Two import questions in Python 3.0

2009-01-24 Thread Gabriel Genellina
En Sat, 24 Jan 2009 05:24:15 -0200, Kay Schluehr escribió: 1. I'd expected that absolute imports are used in Python 3.0 by default. I may be wrong. I've written two versions of a module sucks.py sucks.py - print ("import from lib.sucks") sucks.py - print ("import fro