Experimental Physics and
| |||||||||||||||||
|
On Fri, May 3, 2019 at 8:27 PM Michael Davidsaver <[email protected]> wrote: On 5/3/19 1:58 PM, Matt Newville via Tech-talk wrote: OK, thanks -- that might be useful. To be clear, this returns False for me in the "normal" case of actually loading `libca` for the first time from a Python session: >>> from epics.ca import find_libca >>> dllname = find_libca() >>> print(dllname) /Users/Newville/anaconda3/lib/python3.7/site-packages/epics/clibs/darwin64/libca.dylib >>> libca = cdll.LoadLibrary(dllname) >>> print(hasattr(libca, 'ca_context_create'), hasattr(cdll.LoadLibrary(None), 'ca_context_create')) True False So that might be a reliable way to answer the question "am I running as an embedded Python within an IOC-like process that has loaded libca?". That would be good to know. Registering epicsAtExit() might be useful in all cases, but it seems like we might really need to do that when embedded in an IOC. --Matt
| ||||||||||||||||
ANJ, 06 May 2019 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |