Python cmodules prematurely unloaded?

Charles G Waldman cgw at fnal.gov
Mon May 24 15:12:32 EDT 1999


How about just putting a reference to the C module into the instances
of the shadow class?

  import PyGridc #c library functions
  
  class MyClass:
      def __init__(self)
           ...
	   self.PyGridc = PyGridc
           ...

Then the PyGridc module won't be unloaded until all instances of
MyClass are gone.





More information about the Python-list mailing list