views:

51

answers:

1

hi guys,

I have a couple of python modules in an existing Python project that I wish to make use of in my Java app.

I found an article and followed the steps mentioned there. In particular, I need to import the java interface:

package jyinterface.interfaces;

public interface EmployeeType {
    .
    .
}

into the module:

from jyinterface.interfaces import EmployeeType

class Employee(EmployeeType)

:

I have a question - With this method, does this means that I cannot use this module in my existing python project after making the changes, even with a Jython or Python interpreter?

+1  A: 

You can use it with Jython but not with CPython, the standard implementation.

How ever, there is an effort to provide full access to java class libraries when you use CPython.

pyfunc
@pyfunc, I have tried to use my python module as a standalone with Jython, but I'm encountering a importError with the line "from jyinterface.interfaces import EmployeeType"
goh