Python web frontend, retaining interpreter state
<p>I have a python script that parses a large set of data into an internal memory structure, and implements various fetch functions on the structure.</p>

<p>I want to built a simple web frontend for this script, with the condition that the data is only initialized/loaded once (since re-loading upon each fetch would consume too much time/resources). Essentially, the python handler needs to maintain its state between calls, so the data structure is preserved in memory.</p>

<p>Note: PHP's exec() or similar will not work, as this instantiates a new python handler per request. I have heard vague references to using mod_python for this purpose? </p>
