From: dman <ds...@ri...> - 2001-10-09 12:45:39
|
On Tue, Oct 09, 2001 at 05:18:16AM -0700, rohit seth wrote: | Hi, | I am using a Java application. Now I want to convert | some of the java classes to jython. I want to do it at | the minimum possible level. I mean that I want to do | the least possible changes in my existing code. But I | dont know how to build up that abstraction so that my | existing code does not need to know if I am using | A.class or A.py. This is possible, to some extent. Take a look at the 'jythonc' program that comes with jython. This sort of thing only works as far as Python's and Java's object/class model overlaps. For example, you can't create Java-static methods in a Python class, nor can you (easily) access Python-module level data from Java. You can, however, have constructors and instance methods and the Java will never know it is really invoking the Jython interpreter on some Python code. HTH, -D |