|
From: <bc...@wo...> - 2001-12-25 12:59:05
|
[Phil Surette] > [..] Would it be hard to get it to load from .class files as well? Or > is that not the issue? [Samuele] >The problem here is that there are two choices: >1) loading the $py.class through loadClass >2) load it as a resource (work only with Java 2 unless > the .class extension is changed to something else) Generally speaking, I have no problem if this new feature only works for java2. I also like the possibility of adding some other toplevel path component to the entries in the .ar file, eg. Lib/string$py.class. So I'm leaning towards #2 myself. [Phil Surette] > First, if I understand the code correctly, the classloader would take > precedence over the python.path. The code I posted was only meant as a temporary hack to enable deployment for WebStart users. Hardly worth discussing the finer detail of such a crude hack. [Phil Surette] > Since the python.path is specific > to python, IMO python.path should take precedence over the > classloader for loading python modules. I.e. you > should try to delegate to the importer before trying the classloader. > [There should probably be a registry setting for this!] [Samuele] >IMHO it is a sensible thing for the classloader to take over >sys.path in this case. Sys path in some occasion should even >be ignored. It makes also sense wrt to Java behavior: >java -jar ignores the classpath!. I disagree with both your positions <wink>. I feel that classloader loading should be handled like zip loading. Users should somehow be able to add a classloader to sys.path (maybe with an additional top-level path component). No hardcoded precedence policy needed. regards, finn |