Q: Module Shared Data

C

CatManDo

Disclaimer #1: I am a Python newbie, and I appreciate the vast
documentation at python.org -- some of which I expect has the answer to
my question if I can find it.

I am working on a custom computational fluid dynamics code. I will
create one or more compiled Python modules in C/C++ to provide new
types and functions for manipulating those types. I have a *lot* of
data. Efficiency requires that the new data structures be shared
freely within the scope of the module, without directly exposing the
data to the standard Python runtime environment.

Stated another way, I need the data to persist in virtual memory across
seprate invocations of functions in the module(s) and to be accessible
only through methods explicitly provided by the module(s).

How can I do this? What are some good examples to study?

Disclaimer #2: I am a aware that strong opinions exist about closing
off data from users. But it's a requirement for this application. I
don't like it, but I need the job!

Thanks for your time
CatManDo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top