Re: [Tutor] Dictionary Comprehensions

2009-12-05 Thread spir
Lie Ryan dixit: > note that: > >>> [(y, x) for y in list("khalid") for x in range(6)] > [('k', 0), ('k', 1), ('k', 2), ('k', 3), ('k', 4), ('k', 5), ('h', 0), > ('h', 1), ('h', 2), ('h', 3), ('h', 4), ('h', 5), ('a', 0), ('a', 1), > ('a', 2), ('a', 3), ('a', 4), ('a', 5), ('l', 0), ('l', 1),

Re: [Tutor] Dictionary Comprehensions

2009-12-05 Thread spir
Hugo Arts dixit: > bc = {y: x for x, y in enumerate("khalid")} > > Note that your output is like so: > {'a': 2, 'd': 5, 'i': 4, 'h': 1, 'k': 0, 'l': 3} > > The first character in your original string gets a zero, the second a > one, so on and so forth. I'm hoping that's what you meant. If you >

Re: [Tutor] saving output data in a file

2009-12-05 Thread spir
Dave Kuhlman dixit: > On Fri, Dec 04, 2009 at 01:13:42PM +0530, Prasad Mehendale wrote: > > I am a beginner. I want to save the output data of the following programme > > in > > a file through the programme. Please suggest me the way. I am using Python > > 2.3.3 on mandrake linux 10 and using

[Tutor] mod_python authentication

2009-12-05 Thread Rayon
I need to setup a login page for a web application but I am not finding any code in the mod_python doc that shows me how to do this. What is need is the code to tell apache to get this login data from a login page. ___ Tutor maillist - Tutor@pyt

Re: [Tutor] mod_python authentication

2009-12-05 Thread Benno Lang
On Sat, Dec 5, 2009 at 8:26 PM, Rayon wrote: > I need to  setup a login page for a web application but I am not finding any > code in the mod_python doc that shows me how to do this. > > What is need is the code to tell apache to get this login data from a login > page. If you want Apache to dire

[Tutor] mod_python authentication

2009-12-05 Thread Rayon
I need to setup a login page for a web application but I am not finding any code in the mod_python doc that shows me how to do this. What is need is the code to tell apache to get this login data from a login page. OTOH if you want to build your own login system (e.g. with user details stor