win32 design pattern: COM localserver?
kirby.urner at gmail.com
kirby.urner at gmail.com
Wed Dec 8 23:03:05 EST 2010
Greetings gurus.
I'm faced with the challenge of having a single-threaded proprietary
Win32
language wanting to do multiple calls against a Python COM object.
Something like...
loObj = CREATEOBJECT("map_maker")
loObj.report( params, filename)
do while .True.
yadda yadda
enddo
RETURN
I.e. the client program continues execution while loObj churns away
somewhere doing work in Python, say accessing a MySQL database
and building a map, embedding it in a PDF.
Am I right that the COM object will need to "serve forever" i.e. be
built around some non-terminating loop? Will the client's call then
spawn a process or thread that continues until finished?
All it has to do is leave a file on disk somewhere, then die. But
the client can't be kept on the hook until that's all done.
I've had good luck doing an InProcess COM object the generates
a PDF from ReportLab. But this "stay alive while returning control
to the client" challenge looks like it might be a job for sockets?
Gee I hope not.
Quick links to favorite blog articles will give me a sense of the
ballpark... Any clues welcome. Yes, I have the Win32 book from
O'Reilly.
Kirby
PS: my thanks to Ethan Furman for performing maintenance and
upgrades on his dbf module on PyPI. The FoxPro gods thank you.
http://pypi.python.org/pypi/dbf/0.88.16
PPS: some thoughts about IronPython filed here, after trying to
catch up some, sorry about my formatting, here too.
http://mail.python.org/pipermail/edu-sig/2010-December/010138.html
More information about the Python-list
mailing list