From: Rodrigo B. de O. <rod...@te...> - 2002-10-24 14:18:41
|
> > I notice that popen[234] was missing from your list. Perhaps you forgot > to start jython with the '-S' option? > Yes. I did forget. Sorry. > > The code inside os.classDictInit is basically a "from javaos import *" and > > as I explained before If I called it manually it works as expected. It's > > something to do > > with the initialization of the interpreter I guess (when > > all the core modules are imported). > > I think I can explain why it appears to work when calling classDictInit > directly. > > When site.py is called during startup, the 'os' module is imported which > then import javaos.py. If this fails for some reason, the halfway > completed 'javaos' gets inserted in sys.modules. The symbols from javaos > is not inserted into the 'os' module because of the exeptions raised > when classDictInit performs the import os javaos. > > When you then call classDictInit again manually, the import of javaos > succedes because it just returns the cached (and broken) version of > javaos and then copies the symbols from 'javaos' to 'os'. > > It then appears to work, but it actually doesn't work because several > methods in 'os' will be missing. > That makes sense. Thanks for the explanation. > > The real problem is that an exception raise by javaos during import is > silently ignored. That is bad and should be fixed. > Yes. I'm willing to help if someone could just give me some pointers. I could not find a "How To Contribute" section on the site. regards, Rodrigo |