Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Ente Isle translator

By: a guest on May 5th, 2013  |  syntax: Python  |  size: 0.54 KB  |  hits: 179  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import sys
  2.  
  3. orig = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
  4. trans = 'AZYXEWVTISRLPNOMQKJHUGFDCBazyxewvtisrlpnomqkjhugfdcb'
  5. tl_map = dict(zip(orig, trans))
  6.  
  7. def translate(text):
  8.     return ''.join([tl_map.get(x, x) for x in text])
  9.  
  10. def translate_lines():
  11.     while True:
  12.         line = raw_input()
  13.         print ''.join(translate(line))
  14.         if (line == ''):
  15.             break
  16.  
  17. if __name__ == '__main__':
  18.     if len(sys.argv) > 1:
  19.         print translate(' '.join(sys.argv[1:]))
  20.     else:
  21.         translate_lines()