Re: A package import question

2008-06-15 Thread Gabriel Genellina
En Fri, 13 Jun 2008 22:38:24 -0300, Dan Yamins <[EMAIL PROTECTED]> escribió: >> Gabriel, thanks. I understood about the fact that import only loads the > first time, but didn't realize that "del" only removes the bound reference > to the object, not as I had hoped the thing from the namespace its

Re: A package import question

2008-06-13 Thread Dan Yamins
You have removed the "archive" attribute from the object to which the > "Operations" name is referring to. > >>>> import Operations.archive >> > > Python keeps a reference to all imported modules in sys.modules; if a > module was already imported, any subsequent imports of the same module just

Re: A package import question

2008-06-13 Thread Gabriel Genellina
En Fri, 13 Jun 2008 20:01:56 -0300, Dan Yamins <[EMAIL PROTECTED]> escribió: I'm having a problem importing a package in python, deleting some of what's been imported, and then reimporting. (I'm the sure the problem is trivial, but I just don't understand it.) I have a directory of pytho

A package import question

2008-06-13 Thread Dan Yamins
I'm having a problem importing a package in python, deleting some of what's been imported, and then reimporting. (I'm the sure the problem is trivial, but I just don't understand it.) I have a directory of python modules called Operations. It contains a python module called archive.py.Here's

Re: Library package import question

2007-11-05 Thread Gabriel Genellina
En Mon, 05 Nov 2007 10:34:26 -0300, Frank Aune <[EMAIL PROTECTED]> escribió: > I have a python library package 'Foo', which contains alot of submodules: > > Foo/: > __init__.py > module1.py: > class Bar() > class Hmm() > module2.py > cl

Re: Library package import question

2007-11-05 Thread Martin Marcher
2007/11/5, Frank Aune <[EMAIL PROTECTED]>: > To prevent namespace pollution, I want to import and use this library in the > following way: > > import Foo > (...) > t = Foo.module2.Bee() from x import y as z that has always worked for me to prevent pollution... -- http://noneisyours.marcher.na

Library package import question

2007-11-05 Thread Frank Aune
Hello, I have a python library package 'Foo', which contains alot of submodules: Foo/: __init__.py module1.py: class Bar() class Hmm() module2.py class Bee() class Wax() module3.py etc

Re: package import question

2007-10-22 Thread Phoe6
On Oct 22, 1:24 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > Phoe6 wrote: > > Hi all, > > I have the following directory structure: > > > wallpaper/ > > -main.py > > -ng/ > > -- __init__.py > > -- setdesktop.py > > -yb/ > >

Re: package import question

2007-10-22 Thread Peter Otten
Phoe6 wrote: > Hi all, > I have the following directory structure: > > wallpaper/ > -main.py > -ng/ > -- __init__.py > -- setdesktop.py > -yb/ > -- __init__.py > -- setdesktop.py > >>Fro

Re: package import question

2007-10-22 Thread Diez B. Roggisch
Phoe6 wrote: > Hi all, > I have the following directory structure: > > wallpaper/ > -main.py > -ng/ > -- __init__.py > -- setdesktop.py > -yb/ > -- __init__.py > -- setdesktop.py > >>Fro

package import question

2007-10-22 Thread Phoe6
Hi all, I have the following directory structure: wallpaper/ -main.py -ng/ -- __init__.py -- setdesktop.py -yb/ -- __init__.py -- setdesktop.py >From main.py, I would like to do: import n