Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #21894 > unrolled thread
| Started by | Andrea Crotti <andrea.crotti.0@gmail.com> |
|---|---|
| First post | 2012-03-19 12:59 +0000 |
| Last post | 2012-03-19 12:59 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
configobj validation Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-03-19 12:59 +0000
| From | Andrea Crotti <andrea.crotti.0@gmail.com> |
|---|---|
| Date | 2012-03-19 12:59 +0000 |
| Subject | configobj validation |
| Message-ID | <mailman.804.1332161987.3037.python-list@python.org> |
I seemed to remember that type validation and type conversion worked out
of the box, but now
I can't get it working anymore.
Shouldn't this simple example actually fail the parsing (instead it
parses perfectly port to a string)?
sample.py:
from configobj import ConfigObj
conf = ConfigObj('sample.conf', configspec='sample.spec')
sample.conf:
port = some_string
sample.spec:
port = integer(0, 10)
PS. using configobj 4.7.2
Back to top | Article view | comp.lang.python
csiph-web