caratteri.py convertito in python 3

This commit is contained in:
Daniele Lacamera 2019-12-25 19:42:52 +01:00
parent 662be040c7
commit ed165502e7

View file

@ -11,13 +11,13 @@ mappa_caratteri = [
]
caratteri_python_a_elea = {
char.decode('utf-8'): idx
char : idx
for idx, char in enumerate(mappa_caratteri) }
def stringa_python_a_elea(string):
s = []
for i in string.decode('utf-8'):
for i in string:
if i in (' ', '\n'):
continue
@ -72,8 +72,8 @@ if __name__ == '__main__':
try:
nomefile = sys.argv[1]
except:
print "converte da txt in elea -> file c\n"
print "usaggio: %s nomefile.txt"
print ("converte da txt in elea -> file c\n")
print ("usaggio: %s nomefile.txt")
sys.exit()
converti(nomefile)