Re: Hey, get this!

2005-02-03 Thread Just
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > > If it's a path importer, it could be a cookie, specific to the importer. > > I think in Steve's case initializing __path__ to ["*db*"] should work. > > > > Just > > And that's exactly the conclusion I came to when impo

Re: Hey, get this!

2005-02-03 Thread Steve Holden
Just wrote: In article <[EMAIL PROTECTED]>, Bernhard Herzog <[EMAIL PROTECTED]> wrote: Bernhard Herzog <[EMAIL PROTECTED]> writes: Steve Holden <[EMAIL PROTECTED]> writes: if package: module.__path__ = sys.path You usually should initialize a package's __path__ to an empty li

Re: Hey, get this!

2005-02-03 Thread Just
In article <[EMAIL PROTECTED]>, Bernhard Herzog <[EMAIL PROTECTED]> wrote: > Bernhard Herzog <[EMAIL PROTECTED]> writes: > > > Steve Holden <[EMAIL PROTECTED]> writes: > >> if package: > >> module.__path__ = sys.path > > > > You usually should initialize a package's __path_

Re: Hey, get this!

2005-02-03 Thread Bernhard Herzog
Bernhard Herzog <[EMAIL PROTECTED]> writes: > Steve Holden <[EMAIL PROTECTED]> writes: >> if package: >> module.__path__ = sys.path > > You usually should initialize a package's __path__ to an empty list. Actually, normally it's a list that contains the name of the package d

Re: Hey, get this! [was: import from database]

2005-02-02 Thread Just
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > Just to make things simpler, and (;-) to appeal to a wider audience, > here is a program that doesn't use database at all (it loads the entire > standard library into a dict) and still shows the error. > > What *I* would

Re: Hey, get this!

2005-02-02 Thread Steve Holden
Bernhard Herzog wrote: Steve Holden <[EMAIL PROTECTED]> writes: What *I* would like to know is: who is allowing the import of bsddb.os, thereby somehow causing the code of the os library module to be run a second time. I would guess (without actually running the code) that this part is responsibl

Re: Hey, get this!

2005-02-02 Thread Bernhard Herzog
Steve Holden <[EMAIL PROTECTED]> writes: > What *I* would like to know is: who is allowing the import of bsddb.os, > thereby somehow causing the code of the os library module to be run a > second time. I would guess (without actually running the code) that this part is responsible: > if

Re: Hey, get this! [was: import from database]

2005-02-02 Thread Steve Holden
Steve Holden wrote: Peter Otten wrote: Steve Holden wrote: This is even stranger: it makes it if I import the module a second time: [second import seems to succeed] Maybe you are experiencing some version confusion? What you describe looks much like the normal Python 2.3 behaviour (with no impor

Re: Hey, get this! [was: import from database]

2005-01-29 Thread Steve Holden
Peter Otten wrote: Steve Holden wrote: This is even stranger: it makes it if I import the module a second time: [second import seems to succeed] Maybe you are experiencing some version confusion? What you describe looks much like the normal Python 2.3 behaviour (with no import hook involved) wher

Re: Hey, get this! [was: import from database]

2005-01-28 Thread Peter Otten
Steve Holden wrote: > This is even stranger: it makes it if I import the module a second time: [second import seems to succeed] Maybe you are experiencing some version confusion? What you describe looks much like the normal Python 2.3 behaviour (with no import hook involved) whereas you seem to

Hey, get this! [was: import from database]

2005-01-28 Thread Steve Holden
This is even stranger: it makes it if I import the module a second time: import dbimp as dbimp import sys if __name__ == "__main__": dbimp.install() #k = sys.modules.keys() #k.sort() #for kk in k: #print kk #import bsddb.db import a.b.c.d import smtplib import f