[Tutor] Re: Catching warnings?
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Wed Oct 20 07:59:30 CEST 2004
On Wed, 20 Oct 2004, Liam Clarke wrote:
> I'm only using rotor because I couldn't get the a2b_uu functions to work : )
> I just need to render something into not-plaintext. It's not hugely
> important, all the email passwords are defaults anyway....
Hi Liam,
Hmmm... Ok, if this isn't too serious, you can always use ROT13. *grin*
It's built in:
###
>>> 'helloworld'.encode('rot13')
'uryybjbeyq'
###
There's a corresponding 'decode()' string method to go the other way
around. This 'codecs' system that Python has is pretty rich: rot13 is one
of the silly codecs, but there are quite a few others:
http://www.python.org/doc/lib/node127.html
including one for uu encoding.
If you really need strong encryption, then something like amkCrypto might
fit the bill:
http://www.amk.ca/python/code/crypto.html
I hope this helps!
More information about the Tutor
mailing list