Change request #484

Avoid polluting gammalib Python namespace with _swigregister functions.

Added by Knödlseder Jürgen about 12 years ago. Updated almost 12 years ago.

Status:ClosedStart date:09/15/2012
Priority:NormalDue date:
Assigned To:-% Done:

100%

Category:-
Target version:-
Duration:

Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen about 12 years ago

  • Tracker changed from Bug to Change request

#2 Updated by Knödlseder Jürgen about 12 years ago

This problem can be solved by explicitly specifying a list of classes and functions that should be exposed. This can be done by adding a list

__all__ = ["GApplication", ...]

to the __init__.py file. This list can be created by setup.py from a scan of the Python wrappers. This scan should look for class definitions and cast_ functions. Maybe we have to fuddle some other stuff by hand.

#3 Updated by Knödlseder Jürgen almost 12 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

I now added a __all__ list statement that controls the import when using from gammalib import *. However, if import gammalib is used, the swigregister names are still there. I think this is a swig feature.

Also available in: Atom PDF