return a default form with BaseHTTPServer

2006-01-09 Thread Jeff Gercken
I want my http server to return a default form, regardless of the GET
request, but I'm a bit of a noob and have no idea how.  I'm trying to
write a platform-independent captured portal for my wireless AP.  This
is what I have:

#!/usr/bin/env python
import CGIHTTPServer
import BaseHTTPServer
class ServerHandler(CGIHTTPServer.CGIHTTPRequestHandler):
cgi_directories=[ '/cgi-bin' ]
httpserver = BaseHTTPServer.HTTPServer(("", 80), ServerHandler)
httpserver.serve_forever()

Many thanks,
Jeff
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: String question - find all possible versions of a person's firstname

2006-01-10 Thread Jeff Gercken
This sounds like a homework problem.  You might try splitting the name
at the e's, check the length of the resulting list and do that many
nested loops.

On 1/10/06, Nico Grubert <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I have a string 'Michèle' that represents the firstname of a person.
>
> What's the best way to get all possible versions of this name if I
> consider to use these characters: e, è, é, ê
>
> I'd like to have a function that returns a list of the following names
> when passing 'Michèle' as parameter to it:
>
> 'Michele'
> 'Michelè'
> 'Michelé'
> 'Michelê'
>
> 'Michêle'
> 'Michêlè'
> 'Michêlé'
> 'Michêlê'
>
> 'Michèle'
> 'Michèlè'
> 'Michèlé'
> 'Michèlê'
>
> 'Michéle'
> 'Michélè'
> 'Michélé'
> 'Michélê'
>
>
> Thanks in advance,
> Nico
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list