No it's not a dict if you do it that way. However if you do it like this:
compile_obj = re.compile(r
"""DRIVER=\{(?P<driver>[^}]+)\};SERVER=(?P<host>[\d\.]+);DBQ=(?P<db>[^;]+);UID=(?P<user>[^;]+);PWD=(?P<password>.+)"""
)
match_obj = compile_obj.search("""DRIVER={Microsoft Access Driver
(*.mdb)};SERVER=192.168.1.182;DBQ=c:\\v3.mdb;UID=admin;PWD=****""")
# Retrieve group(s) in a dict
driver_config = match_obj.groupdict()
You do get a dict in driver_config.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.