You can invoke toString on an array from jython like this:
>>> import jarray,java
It still doesn't return what Patrick wanted. He already
had the best solution in his original post, which is to
explicitly construct a java.lang.String from the char.
From: Oti [mailto:ohumbel@...]
Sent: Tuesday, March 09, 2004 3:21 PM
To: Jeff Emanuel; Patrick Bielen; Jython Mailinglist
Subject: RE: [Jython-users] Array to String ???
[ Jeff Emanuel ]
> An array is an Object, regardless of your HO. From the
> Java language specification:
> "In the Java programming language arrays are objects (?4.3.1), are
> dynamically created, and may be assigned to variables of type Object
> (?4.3.2). All methods of class Object may be invoked on an array."
Sorry, i confused primitive types with arrays of primitive types.
The problem probably is:
>>> import jarray
>>> ca = jarray.zeros(4, 'c')
>>> pw = ca.toString()
Traceback (innermost last):
File "<console>", line 1, in ?
AttributeError: instance of 'org.python.core.PyArray' has no