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
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
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
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
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
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
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
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/
> >
Phoe6 wrote:
> Hi all,
> I have the following directory structure:
>
> wallpaper/
> -main.py
> -ng/
> -- __init__.py
> -- setdesktop.py
> -yb/
> -- __init__.py
> -- setdesktop.py
>
>>Fro
Phoe6 wrote:
> Hi all,
> I have the following directory structure:
>
> wallpaper/
> -main.py
> -ng/
> -- __init__.py
> -- setdesktop.py
> -yb/
> -- __init__.py
> -- setdesktop.py
>
>>Fro
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
11 matches
Mail list logo