|
From: <bc...@wo...> - 2001-11-26 20:47:35
|
[Jerome Bouat]
>Hello,
>
>I search a mean to use
>a Python tailored code with Jython.
>I have a problem with strings :
>I must get a 8 bit string for future computation
>but I created 16 bits string.
>
>Does you know a mean
>to make that Jython provides
>a 8 bits strings ?
>Is there a conversion available
>within Jython ?
You can use all the different String.getBytes(..) methods likes this:
>>> import java
>>> java.lang.String.getBytes("abcdef")
array([97, 98, 99, 100, 101, 102], byte)
regards,
finn
|