Hi Jean, Thanks for the report. I recently changed the "LoadPlugin" API as part of the improvements for ParaView's plugin framework. Apparently, the comments were not updated properly. Also there were some conflicts in the new APIs I added. I just committed some fix and update the comments. Could you update and give it another try. Sorry for the inconvenience.
Yumin On Wed, Aug 19, 2009 at 5:59 AM, Jean M. Favre<[email protected]> wrote: > > I've got plugins working fine with paraview, but I cannot load them with > pvpython (pv3.7 CVS). Loading them without globals() gives no errors, > but they ain't visible. Loading them with globals() gives this error: > >>>> LoadPlugin("MySMPlugin.so", remote='False', ns=globals()) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File > "/local/apps/ParaView3Build/Utilities/VTKPythonWrapping/paraview/simple.py", > line 530, in LoadPlugin > servermanager.LoadPlugin(filename, remote) > File > "/local/apps/ParaView3Build/Utilities/VTKPythonWrapping/paraview/servermanager.py", > line 2083, in LoadPlugin > plinfo = plm.LoadPlugin(filename, connection.ID, serverURI, remote) > TypeError: function takes exactly 1 argument (4 given) > > > looking at the source code of simple.py, it seems like globals() is > required, but should not be the second argument, but the third argument. > is this a copy-and-paste error from LoadXML()? > > def LoadPlugin(filename, remote=True, ns=None): > """Loads a ParaView plugin and updates this module with new > constructors if any. If you loaded the simple module with from > paraview.simple import *, make sure to pass globals() as the second > arguments: LoadPlugin("myplugin", globals()) Otherwise, the new > functions will not appear in the global namespace.""" > > thanks for any tip > > Jean > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the ParaView Wiki at: > http://paraview.org/Wiki/ParaView > > Follow this link to subscribe/unsubscribe: > http://www.paraview.org/mailman/listinfo/paraview > -- ~~~~~~~~~~~~~~~~ Yumin Yuan R&D Engineer Kitware Inc. www.kitware.com Phone : (518) 881-4936 email : [email protected] ~~~~~~~~~~~~~~~~ _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
