Commit d89beb8c authored by peastman's avatar peastman
Browse files

Merge pull request #40 from rmcgibbo/swigregister

Add an __all__ to openmm.py so that XXX_swigregister functions don't get imported into python namespace
parents 73f7c14e bd232057
......@@ -64,6 +64,14 @@ using namespace OpenMM;
%include OpenMM_headers.i
%pythoncode %{
# when we import * from the python module, we only want to import the
# actual classes, and not the swigregistration methods, which have already
# been called, and are now unneeded by the user code, and only pollute the
# namespace
__all__ = [k for k in locals().keys() if not k.endswith('_swigregister')]
%}
/*
%extend OpenMM::XmlSerializer {
%template(XmlSerializer_serialize_AndersenThermostat) XmlSerializer::serialize<AndersenThermostat>;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment