From: Chris M. <ch...@hd...> - 2001-05-29 14:40:41
|
Thanks for the help, I'm d/l'ing 2.1a1 right now. We also found base64 encoding support in Fop with Xerces in case anyone is interested. Thanks again, Chris On Tue, May 29, 2001 at 01:36:37AM -0500, Robert W. Bill wrote: > Hello Chris, > > On Mon, 28 May 2001, Chris Meyers wrote: > > Is there a way to do base64 encoding in jython? We have an app where > > python is base64 encoding data on the server side. On the client side we > > are using jython, and we can't find a way to unencode it. Anyone out > > there know of a way to do this? > > There is a Base64 module designed for this, but is only delivered with > jython-2.1a1. I'm unaware of limitations in using Base64.py with Jython > 2.0, so it's worth a try. If that doesn't pan out, using Jython-2.1a1 is > reasonable as well- the 'alpha' doesn't mean unstable in this case. > > >>> import Base64 > >>> s = "this is a test with some @wa%ck7y chara)c*te-=rs" > >>> encoded = Base64.encodestring(s) > >>> print encoded > dGhpcyBpcyBhIHRlc3Qgd2l0aCBzb21lIEB3YSVjazd5IGNoYXJhKWMqdGUtPXJz > > >>> decoded = Base64.decodestring(encoded) > >>> print decoded > this is a test with some @wa%ck7y chara)c*te-=rs > > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users -- Chris Meyers 7941 Tree Lane Suite 200 Madison WI 53717 |