Jython: any workaround for the missing array module

Philip Tsai tsailipu at attbi.com
Tue Jul 23 16:25:01 EDT 2002


Right; jarray, however, only exposes two methods while the array module
provides a number of useful methods.

In my case, I have a (c)python class that manipulates an array of bits using
array.array('I') structure.  The class uses several array methods such as
tostring() and fromstring(), which do not seem trivial to re-implement in
python or jython....  Would you have any suggestion on how to implement such
array methods (I guss at the end there is always the approach of looking
into the source code and try to port it...)?

Thanks,
Philip

"Andreas Ulbrich" <ulbi at ivs.tu-berlin.de> wrote in message
news:3D3D2A29.7000906 at ivs.tu-berlin.de...
> Philip Tsai wrote:
> > Hello group,
> >
> >  I learned from Jython's documentation that the Python array module is
> > currently unsupported.  I am writing to see whether you would happen
> > to know a clean, good workaround?  So, instead of "import array" in
> > the *.py, one can perhaps do something about equally easy and
> > efficient in Jython....
> >
> >  Thanks much!
> >  Philip
>
> There is a jarray module. You can use it to build a Java-array and then
> use everything Java provides to deal with arrays (so it's fairly
> efficient). But you probably knew this already ...
>





More information about the Python-list mailing list