From: <j.j...@mc...> - 2006-08-18 21:20:21
|
After reading your previous post, I implemented a Java interface via Jython and then used it within a Java application without the use of jythonc...I've never used this methodology before. I think this method is cleaner than using jythonc because it enforces coding to interfaces and it cuts out the step of compiling your jython classes into java code. However, I think it may be important to carry jythonc forward into future releases because there may already be widespread usage of the utility. It would be a pain for products which currently utilize jythonc if they had to change their code in order to move forward with future releases of Jython. This is a great topic for an article in the next distribution of the Jython Monthly newsletter. I am not sure how many people currently code against Java interfaces in order to utilize Jython code in Java apps, but it is useful to know. Maybe I'll write a tutorial for this methodology for the next distribution. - Josh > Speaking of jythonc on the branches, in my dev list spelunking for > PyXML info last night I noticed a couple comments that made it sound > like jythonc might be unable to support generators. A lack of > generator support is definitely causing every jythonc test to fail on > the 2.3 branch since they've made their way into the std Python > library there. What's the plan for jythonc in the future? > > One of the things I saw mentioned was that rather than having a full > blown .py -> .java translator like jythonc, we could just have a > static proxy bytecode creator. Since having the proxy bytecode in the > classpath would allow the interpreter to function in a restricted > classloader enviroment, this would allow jython to run everywhere. It > would just remove the ability to have Jython code declare a Java > calling mechanism with all of the '@sig' business. I personally > prefer to declare an interface or class in java and have my jython > code extend that if I want to call it from java. It removes the > complication of having to run jythonc and doesn't force a user to > learn the new '@sig' declaration. Do people really like the '@sig' > feature of jythonc? Does it allow anything beyond what's possible > with declaring interfaces in Java? Not that it matters if jythonc > can't do generators.... > > Just wondering, > Charlie > > On 8/17/06, Raghuram Devarakonda <ra...@sy...> wrote: > > > > Thanks for the info. My initial emphasis will be on 2.1 as that is what > > we deploy. Once that is done, I can work on other branches. > > > > Raghu. > > > > Charlie Groves wrote: > > > The linenumbers are generated from the f_lineno field in the PyFrame > > > for each call in a traceback. I think you could add the line number > > > from the python file that generated a particular method in the java > > > code created by jythonc. Then as the frames are created in calls into > > > the java, set f_lineno in addition to the stuff that is already filled > > > in. This is just conjecture based on some knowledge of the exception > > > building and a rudimentary understanding of how jythonc works, so take > > > it with a grain of salt. > > > > > > It'd be great to have someone working on jythonc. It's going to need > > > to be taught about generators if it's going to work with 2.3, and I > > > don't think anyone is working on it now. > > > > > > Thanks, > > > Charlie > > > > > > On 8/16/06, Raghuram Devarakonda <ra...@sy...> wrote: > > >> > > >> Hi, > > >> > > >> I submitted this bug quite a while back but it is not assigned to > > >> anyone. I haven't tried to reproduce the problem with jython 22 but > > >> there is a comment in the bug report which says the problem remains. I > > >> would like to take a look but it will be nice if someone can tell me > > >> whether getting line numbers in this case is feasible. I would also > > >> appreciate any general remarks about how best to go about the fix. > > >> > > >> > http://sourceforge.net/tracker/index.php?func=detail&aid=904322&group_id=12867&a > tid=112867 > > >> > > >> > > >> Thanks, > > >> Raghu. > > >> > > >> > > >> ------------------------------------------------------------------------- > > >> Using Tomcat but need to do more? Need to support web services, security? > > >> Get stuff done quickly with pre-integrated technology to make your job > > >> easier > > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache > > >> Geronimo > > >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > >> _______________________________________________ > > >> Jython-dev mailing list > > >> Jyt...@li... > > >> https://lists.sourceforge.net/lists/listinfo/jython-dev > > >> > > > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-dev |