Error when trying to sort and presnt a dictionary in python 3.3.1
Νίκος Γκρ33κ
nikos.gr33k at gmail.com
Sun May 26 08:58:12 EDT 2013
Τη Κυριακή, 26 Μαΐου 2013 3:20:19 μ.μ. UTC+3, ο χρήστης Peter Otten έγραψε:
> At some point you have to admit that coding isn't your cup of tea.
> Or Ouzo ;(
And i didn't evne drank anyhting, iam sober! Imagine what i would have written if i had some shots of Ouzo :-)
I chnage my code to:
months = { 'Ιανουάριος':1, 'Φεβρουάριος':2, 'Μάρτιος':3, 'Απρίλιος':4, 'Μάϊος':5, 'Ιούνιος':6, \
'Ιούλιος':7, 'Αύγουστος':8, 'Σεπτέμβριος':9, 'Οκτώβριος':10, 'Νοέμβριος':11, 'Δεκέμβριος':12 }
print('''
<form method="post" action="">
<select name="month">
''')
for key in sorted( months.keys() ):
print('''
<option value="%s"> %s </option>
''' % (months[key], key) )
print('''
</select> '''
Now, iam not getting any eroor from cmd when i 'python3 pelatologio.py' verythign interprets normally wiyohut an error.
BUT i kepp getting an internal server error when i try to run the script via a browser (Chrome).
python3 path is ok
uploaded as ascii
chmoded to 755 ok.
How in cmd i get no error while on browser i get internal server error?
More information about the Python-list
mailing list