Skip to content

Instantly share code, notes, and snippets.

@tonykamillo
tonykamillo / __init__.py
Last active November 4, 2016 13:07
Sugestão de AppConfig
# -*- coding:utf-8 -*-
# Este é o init do app
import importlib
from django.apps import AppConfig
class PollConfig(AppConfig):
name = 'common.poll' # nome canônico de importação do app
#!/usr/bin/env python
import sys, string
DICT = dict(zip(string.lowercase, ['ka', 'tu', 'mi', 'te', 'ku', 'lu', 'ji', 'ri', 'ki', 'zu', 'me',
'ta', 'rin', 'to', 'mo', 'no', 'ke', 'shi', 'ari', 'chi', 'do', 'ru', 'mei', 'na', 'fu', 'ra']))
if __name__ == '__main__':
if len(sys.argv) <= 1:
sys.exit('Enter your name')
print( ''.join([DICT.get(char.lower(), ' ') for char in ' '.join(sys.argv[1:])]) )