jython base64.urlsafe_b64xxx

Alan Kennedy alanmk at hotmail.com
Fri Jan 13 22:25:44 CET 2006

py wrote:
> anyone know how to do perform the equivalent base64.urlsafe_b64encode
> and base64.urlsafe_b64decode functions that Python has but in jython?
> Jython comes with a base64 module but it does not have the urlsafe
> functions.  Tried copying the pythhon base64.py to replace the Jython
> one, and although it did perform the encode/decode it didnt seem to be
> correctly decoded.

You're probably better off using a java library for the task. There are 
plenty to choose from, but most embedded as utility classes in bigger 
packages. Here's a public domain one for example


With javadoc at


Seems to do what you want.


alan kennedy
email alan:              http://xhaus.com/contact/alan

More information about the Python-list mailing list