Should I cache LoadLibrary results?

Alexander Belchenko <[email protected]>
Newsgroups gmane.comp.python.ctypes
Message-ID <[email protected]>
Hi,

I'm using python and ctypes to test some of my C-code (compiled to
shared libraries). Every test method starts with code like this
(pseudocode):


Class TestMyLib(unittest.TestCase):

   def test_foo:
    library_under_test = ctypes.cdll.LoadLibrary('foo')

Such test cases could be about half-hundred or more (the number is
growing as time passes, of course). The time to run my tests is very
small today (less than second), so my question is purely theorethical.

Question itself: does ctypes do any sort of caching of cdll.LoadLibrary
results (for successfully loaded libraries) or should I care about not
loading the library several times?

Thanks,
Alexander


------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.