On Thu, 22 Mar 2001, Joseph S. Barrera III wrote:
> I love jython, but as we all know it's missing some library
> functionality, especially in the shell/filesystem/os area, for the
> reason that it's hard or impossible to implement such functionality in
> pure Java.
> Is there some easy way of writing a program mostly in jython, and a
> little in cpython (for the functionality missing in jython), and
> sticking the parts together? If so, how?
The word "easy" limits the field here, doesn't it :)
Faking the behavior you need with Runtime() could work, is potentially
easy, but is suspect as a solution. Brian was kind enough to post
snippets of using getRuntime().exec() recently. His mail is found:
Brian also pointed out a nice article on exec() traps found:
> The reason I don't just go with pure cpython is that I depend a lot on
> the nice integration between jython and java, and I suspect that
> moving to pure cpython would be a real pain. (But I don't know cpython
> well enough to know that for sure.)
I doubt cpython would be a pain for someone already comfortable with
Jython. Unless you mean that writing C extensions would be required for
your project and that portion would be the pain. It seems
unlikely that you would need such extensions for os services though.
However, this java/Cpython integration seem to be a recurrent issue.
There is even a project called cyphon which addresses this, found at:
there is also a jpe project (java python extension maybe?) but I don't
know it's url or status. Maybe one of these project would be
worth looking into.