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! [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

Re: Import from database

2005-01-25 Thread Steve Holden
Kartic wrote: Steve, Hmmm... Yes, I see what you are saying. Could you post your create table statement so that I can create a db and play around with dbimport? Thanks, --Kartic Here it is, plus also the loader program I used to suck in the standard library (in case it's that that's faulty): CREA

Re: Import from database

2005-01-25 Thread Kartic
Steve, Hmmm... Yes, I see what you are saying. Could you post your create table statement so that I can create a db and play around with dbimport? Thanks, --Kartic -- http://mail.python.org/mailman/listinfo/python-list

Re: Import from database

2005-01-25 Thread Steve Holden
Kartic wrote: Steve, I believe you have to put ntpath, macpath and posixpath in the module database for os.path to work. I tried it with zipimporter builtin and I got the same traceback till I added ntpath.py to my zip file. (Of course, I renamed the original ntpath to _ntpath so that the original

Re: Import from database

2005-01-24 Thread Kartic
Steve, I believe you have to put ntpath, macpath and posixpath in the module database for os.path to work. I tried it with zipimporter builtin and I got the same traceback till I added ntpath.py to my zip file. (Of course, I renamed the original ntpath to _ntpath so that the original did not get

Import from database

2005-01-24 Thread Steve Holden
I'm trying to load module code from a database, which stores for each module its full name, code, load date and a Boolean indicating whether it's a package or not. The following simple program: import dbimp, sys if __name__ == "__main__": dbimp.install() #import bsddb.db import a.b.c