Re: Propagate import for all modules in a package.

2009-07-17 Thread Ben Finney
Phil writes: > I was thinking that I could just, for example, 'from datetime import > datetime' in __init__.py and have the ability to use 'datetime' > anywhere in any of the modules in 'package'. That would break one of the very nice features of Python's namespace system: that, because nothing[

Re: Propagate import for all modules in a package.

2009-07-17 Thread Phil
Thanks to both of you for the fast and detailed responses. I will just use the package for what it is, a namespace. -- http://mail.python.org/mailman/listinfo/python-list

Re: Propagate import for all modules in a package.

2009-07-17 Thread Phil
Thanks to both of you for the fast and detailed responses. I will just use the package for what it is, a namespace. -- http://mail.python.org/mailman/listinfo/python-list

Re: Propagate import for all modules in a package.

2009-07-17 Thread Phil
Thanks to both of you for the fast and detailed responses. I will just treat the package for what it is, a namespace. -- http://mail.python.org/mailman/listinfo/python-list

Re: Propagate import for all modules in a package.

2009-07-17 Thread Albert Hopkins
On Fri, 2009-07-17 at 10:28 -0700, Phil wrote: > I'm really new to Python and I am absolutely stumped trying to figure > this out. I have searched plenty, but I am either searching for the > wrong keywords or this isn't possible. > > What I want to do is have one import be global for the entire pa

Re: Propagate import for all modules in a package.

2009-07-17 Thread Diez B. Roggisch
Phil schrieb: I'm really new to Python and I am absolutely stumped trying to figure this out. I have searched plenty, but I am either searching for the wrong keywords or this isn't possible. What I want to do is have one import be global for the entire package. Here is an example... __init__

Propagate import for all modules in a package.

2009-07-17 Thread Phil
I'm really new to Python and I am absolutely stumped trying to figure this out. I have searched plenty, but I am either searching for the wrong keywords or this isn't possible. What I want to do is have one import be global for the entire package. Here is an example... __init__.py module1.py