|
From: Jack K. <jac...@wu...> - 2006-07-17 09:58:17
|
Hi all,
when trying to use a ConfigObj with the shelve module, I get the=20
following exception while trying to
print the unpickled ConfigObj in the shelf:
$ python ./test.py
Traceback (most recent call last):
File "./test.py", line 15, in ?
print shelf['b0conf']
File "/home/versant/Apps/lib/python/configobj.py", line 537, in __repr_=
_
return '{%s}' % ', '.join([('%s: %s' % (repr(key), repr(self[key])))
File "/home/versant/Apps/lib/python/configobj.py", line 537, in __repr_=
_
return '{%s}' % ', '.join([('%s: %s' % (repr(key), repr(self[key])))
File "/home/versant/Apps/lib/python/configobj.py", line 376, in=20
__getitem__
if self.main.interpolation and isinstance(val, StringTypes):
AttributeError: 'dict' object has no attribute 'interpolation'
How can I correctly pickle/unpickle a ConfigObj object?
Thanks,
Jack
--=20
**********************************************************************
W=A8=B9rth Phoenix Shanghai
Jack Kuan
W=A8=B9rth Phoenix Product Development Shanghai
WeiHai Road No.511 ShenShi Mansion 14F,Shanghai, China, 200041
Phone: +86 021 62532266 *217
Fax: +86 021 62150009
mailto: jac...@wu...
http://www.wuerth-phoenix.com/
**********************************************************************
|