"PLUGIn Not Defined Error" while using paraview pvpython
I have a reader plugin integrated with paraview that works perfectly fine. I build paraview by putting the PLUGIN in Paraview_Source/Plugins directory with plugin.cmake file. I could use the same plugin to trace an "equivalent python code" for any visualization example using paraview-gui. The generated python code can be run again on paraview gui.
BUT, when I try to follow the same python command in python externally like pvpython. I get the following error.
>>>from paraview.simple import *
updating active connection None
paraview version 5.2.0-RC1
updating active connection Connection (builtin:) [1]
updating active connection Connection (builtin:) [1]
>>>Reader= PluginName(FileName="file")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'PluginName' is not defined.
But, there is no error when I load the plugin manually in python
>>>from paraview.simple import *
updating active connection None
paraview version 5.2.0-RC1
updating active connection Connection (builtin:) [1]
updating active connection Connection (builtin:) [1]
>>>LoadPlugin("libPLUGIN.so",ns=globals());
>>>Reader= PluginName(FileName="file")
Since, the plugin ws built with paraview source, it should automatically be imported when in python with the command.
from paraview.simple import *
The plugin, thus should be automatically added to the python modules.