This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Zaar.Hai
Recipients Zaar.Hai
Date 2010-05-04.14:17:12
SpamBayes Score 0.0003208212
Marked as misclassified No
Message-id <1272982635.61.0.958839100699.issue8612@psf.upfronthosting.co.za>
In-reply-to
Content
I'm using INIConfig class from iniparse module(http://code.google.com/p/iniparse).
I've tried to use multiprocessing.Queue to propagate 
configuration changes between the processes. However, INIConfig instances 
have troubles being pushed through Queue objects.

I do not know whether this is a Queue or iniparse bug, so I've opened issued on both projects(http://code.google.com/p/iniparse/issues/detail?id=20). Even this is not a Queue bug, it would be great to have some advice on how this problem may be solved. Thanks.

Problem description:

Running this simple code:

from multiprocessing import Process
from multiprocessing import Queue
from iniparse import INIConfig
import time

def worker(queue):
    config = queue.get()
    print config.sec1.var1

def main():
    config = INIConfig(open("./my.conf"))
    queue = Queue()
    p = Process(target=worker, args=(queue,))
    p.start()
    queue.put(config)
    time.sleep(1)

if __name__ == "__main__":
    main()

Raised this error:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.5/multiprocessing/queues.py", line 242, in _feed
    send(obj)
TypeError: 'Undefined' object is not callable

The contents of my.conf are like this:
[sec1]
var1 = test1
var2 = test2

I'm using python 2.5.2 on Debian Lenny amd64 with python-multiprocessing package (http://packages.debian.org/squeeze/python-multiprocessing).
History
Date User Action Args
2010-05-04 14:17:15Zaar.Haisetrecipients: + Zaar.Hai
2010-05-04 14:17:15Zaar.Haisetmessageid: <1272982635.61.0.958839100699.issue8612@psf.upfronthosting.co.za>
2010-05-04 14:17:14Zaar.Hailinkissue8612 messages
2010-05-04 14:17:12Zaar.Haicreate