how can i iterate on a Jython PyList and cast or convert my contained object to java.lang.String ?
in this old tutorial, it is done by using __ tojava __ like :
(EmployeeType)employeeObj.__tojava__(EmployeeType.class);
i suppsoe this may be something like :
PyList pywords = pythonFactoryCreatedObject.pythonMethodReturningPyList()
int count = pywords.__len__();
for (int idx = 0 ; idx < count ; idx++) {
PyObject obj = pywords.__getitem__(idx);
//here i do not know how to have a kind of 'String word = pywords[idx]' statement
//System.out.println(word);
}
is it also possible to have :
a conversion from PyList to java Array or List ? so that the construct 'for (String word : mylist) { }' can be used ?
i will have the same trouble with simple python dictionary mapping to an adequate java object, what will be the best mapping ?
Is there a tutorial doc on the java part usage of Jython ? i'm quite ok with python, but new to Java and Jython, and i found only documentation on the Java usage from Jython while i need to embed a Python module inside a Java framework...
best