Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #46079

Re: Error when trying to sort and presnt a dictionary in python 3.3.1

Newsgroups comp.lang.python
Date 2013-05-26 09:09 -0700
References <95e674bf-0d96-479c-b7a4-9242768a7a46@googlegroups.com> <mailman.2172.1369570798.3114.python-list@python.org> <9ea1331c-2c23-43db-a4d0-68f6cdd5f321@googlegroups.com>
Message-ID <d99cbc52-d2c4-4ace-9be7-c13f43bfab73@googlegroups.com> (permalink)
Subject Re: Error when trying to sort and presnt a dictionary in python 3.3.1
From Νίκος Γκρ33κ <nikos.gr33k@gmail.com>

Show all headers | View raw


Τη Κυριακή, 26 Μαΐου 2013 3:58:12 μ.μ. UTC+3, ο χρήστης Νίκος Γκρ33κ έγραψε:
> Τη Κυριακή, 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?

Its okey i made it work, it wasnt an actuap python issue but an .htaccess and .htpasswd problem.

All fine now!

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Error when trying to sort and presnt a dictionary in python 3.3.1 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-05-26 04:11 -0700
  Re: Error when trying to sort and presnt a dictionary in python 3.3.1 Peter Otten <__peter__@web.de> - 2013-05-26 14:20 +0200
    Re: Error when trying to sort and presnt a dictionary in python 3.3.1 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-05-26 05:58 -0700
      Re: Error when trying to sort and presnt a dictionary in python 3.3.1 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-05-26 09:09 -0700

csiph-web