Tommy Grav a écrit :
(snip)
>
> So am I understanding it right that a second import numpy statement
> in a different module (and thus a different namespace) just results in
> a binding to the already existing numpy "object"?
Yes.
And FWIW, you can drop the quotes around the word 'object', becaus
On 9/5/07, Tommy Grav <[EMAIL PROTECTED]> wrote:
>
> >>
> > The simplest thing to do would be to have PyAstro.__init__.py
> > import all
> > the sub-modules, and define __all__ as the set of names that the
> > package
> > should inject into importing modules.
> >
> > Then you could write (for examp
>>
> The simplest thing to do would be to have PyAstro.__init__.py
> import all
> the sub-modules, and define __all__ as the set of names that the
> package
> should inject into importing modules.
>
> Then you could write (for example)
>
> from PyAstro import numpy, constants, conversion, obsrv
Tommy Grav wrote:
> Hi,
>
>I am working on a package that contains a number of
> different modules:
>
> > ls pyAstro
> __init__.py
> constants.py
> conversion.py
> observation.py
> orbit.py
> transformation.py
>
> however, I find that several of the modules have the
> same import statement
Tommy Grav wrote:
> Hi,
>
>I am working on a package that contains a number of
> different modules:
>
> > ls pyAstro
> __init__.py
> constants.py
> conversion.py
> observation.py
> orbit.py
> transformation.py
>
> however, I find that several of the modules have the
> same import statements
Hi,
I am working on a package that contains a number of
different modules:
> ls pyAstro
__init__.py
constants.py
conversion.py
observation.py
orbit.py
transformation.py
however, I find that several of the modules have the
same import statements:
orbit.py:
import numpy
import constants
impo