Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1/usr/bin/env python
- # this is from The Python
- # Standard Library by example
- # ISBN13: 9780321767349
- import codecs
- from cStringIO import StringIO
- buffer = StringIO()
- stream = codecs.getwriter('rot_13')(buffer)
- text = 'abcdefghijklmnopqrstuvwxyz'
- stream.write(text)
- stream.flush()
- print 'Original:', text
- print 'ROT-13 :', buffer.getvalue()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement