Hi - I think what you want to do is to make use of the the
args, kwargs
structures in the definition of your argument list and then
force all
arguments supplied to some known case state (ie just
lowercase
everything) and then you can go on from there. I haven't
tested this
code but i think this is the sort of thing you want ...
def index(*args, **kwargs):
kwargslowercase = {}
for k,v in kwargs.iteritems():
kwargslowercase[k] = str(v).lower()
#Now use kwargslowercase as a dictionary
#of HTTP parameters all of which are lowercase
#- just demonstrate that
for v in kwargslowercase.itervalues():
print v
... you can now have an arbitary set of arguments passed to
index and
each argument can be in any sort of upper/lower case mash up
(and vary
from call to call) but by the time you start to use them
from
kwargslowercase you will have a known set to work on.
Hope that works - if not post again.
regards
richard.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|