Initializing the pool?

Philip Semanchuk <[email protected]> Tue, 10 Apr 2007 00:49:02 -0400
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
Hi Jonathan,
Thanks for the fix to the static/dynamic expressions -- it now works as 
expected.

I have another problem that I hope you can help me with. I'd like to 
write some code that would run once at server start to put some data in 
the pool. I tried adding an InitializePool module to the list of 
imports in spyceconf.py, but I can't figure out how to manipulate the 
pool from a vanilla Python module. This code gives me a handle to a 
pool-ish object:

import spyce
server = spyce.getServer()
pool = server.loadModule("pool")

# But this gives me "object does not support item assignment"
pool["foo"] = "pepperpot"


Can you suggest a way to initialize the pool when the Spyce server 
starts?

Thanks
Philip


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV