MantisBT - ParaView
View Issue Details
0006456ParaView(No Category)public2008-02-27 15:032009-05-13 13:59
Ken Moreland 
Utkarsh Ayachit 
highfeaturealways
closedfixed 
 
3.43.4 
0006456: Set python path for programmable filter outside of scripts
We need the ability to set the python path for the programmable filter outside of the scripts themselves. There should be a text edit in the object inspector that gets pre-pended to the python path (except for .). The justification for this feature is that right now in order to set the path for the filter scripts, you have to put the path in the scripts themselves, and then the scripts get tied to a single server machine and can no longer be applied to other servers.
No tags attached.
Issue History
2008-02-27 15:03Ken MorelandNew Issue
2008-03-18 19:00Alan ScottPrioritynormal => high
2008-03-19 20:00Berk GeveciStatusbacklog => tabled
2008-03-19 20:00Berk GeveciAssigned To => Berk Geveci
2008-03-19 20:02Berk GeveciTarget Version => Python support
2008-04-02 16:32Berk GeveciNote Added: 0011044
2008-04-02 16:32Berk GeveciStatustabled => @20@
2008-05-01 13:27Berk GeveciStatus@20@ => tabled
2008-05-01 13:27Berk GeveciStatustabled => @30@
2008-05-29 13:41Berk GeveciNote Added: 0012153
2008-05-29 13:42Berk GeveciStatus@30@ => tabled
2008-05-29 13:42Berk GeveciAssigned ToBerk Geveci => Utkarsh Ayachit
2008-06-24 11:50Utkarsh AyachitNote Added: 0012503
2008-06-24 11:50Utkarsh AyachitStatustabled => @20@
2008-06-25 17:32Greg WeirsNote Added: 0012526
2008-07-08 08:40Utkarsh AyachitStatus@20@ => @80@
2008-07-08 08:40Utkarsh AyachitResolutionopen => fixed
2008-07-08 08:40Utkarsh AyachitNote Added: 0012649
2008-07-09 16:52Alan ScottStatus@80@ => closed
2008-07-09 16:52Alan ScottNote Added: 0012681
2009-05-13 13:58Utkarsh AyachitTarget VersionPython support => 3.4
2009-05-13 13:59Utkarsh AyachitFixed in Version => 3.4
2011-06-16 13:10Zack GalbreathCategory => (No Category)

Notes
(0011044)
Berk Geveci   
2008-04-02 16:32   
This can be accomplished by setting the PYTHONPATH. Why do we have to make the programmable filter more complicated?
(0012153)
Berk Geveci   
2008-05-29 13:41   
We are going to add support for setting the python path to server options. This will be in the form of being able to set a list of environmental variable for the server in the xml file.
(0012503)
Utkarsh Ayachit   
2008-06-24 11:50   
There a couple of ways of dealing with the environment variable server options.

1) Use ParaView's client side XMLs for server options i.e add some XML elements to
the server configuration xml defined here http://www.paraview.org/Wiki/Server_Configuration [^] to set the environment variables. However, in this case, it will work only when using ParaView client and not when connecting to the server using pvpython.

2) Use the paraview server options (as described here:
http://www.paraview.org/Wiki/ParaView:FAQ#How_do_I_specify_cave_parameters_in_ParaView_2.2_and_later.3F [^]
)

In this case, there already exists a "Environment" tag where the user can specify the environment variables, including PYTHONPATH.
This will work even for server connected to using pvpython or any other client.

Suggestions?
(0012526)
Greg Weirs   
2008-06-25 17:32   
Returning to the original feature request, what I would like is to be able to dynamically modify the the server-side python path(used by the programmable filter) from the client-side proxy to that filter.

There is an (as far as I can tell) undocumented mechanism to define and set arbitrary programmable filter properties from the client. These properties are accessible to the programmable filter script. Rather than hard-code the desired PYTHONPATH in the script (which is not dynamic) I can do it through this undocumented mechanism. However, I believe the server-side PYTHONPATH used by the programmable filter script is an important enough property that it should be promoted to a "full" (not arbitrary) property of the programmable filter.

The xml server configuration file is not dynamic, and applies to all users of the pvserver. I am looking for something that could point to directories of a particular user or restricted user group on the fly.
(0012649)
Utkarsh Ayachit   
2008-07-08 08:40   
As per final request, adding a "PythonPath" property which can be set with a semi-colon separated list of directories to add to python search paths.

/cvsroot/ParaView3/ParaView3/Servers/Filters/vtkPythonProgrammableFilter.cxx,v <-- Servers/Filters/vtkPythonProgrammableFilter.cxx
new revision: 1.32; previous revision: 1.31
/cvsroot/ParaView3/ParaView3/Servers/Filters/vtkPythonProgrammableFilter.h,v <-- Servers/Filters/vtkPythonProgrammableFilter.h
new revision: 1.13; previous revision: 1.12
/cvsroot/ParaView3/ParaView3/Servers/ServerManager/Resources/pythonfilter.xml,v <-- Servers/ServerManager/Resources/pythonfilter.xml
new revision: 1.13; previous revision: 1.12
(0012681)
Alan Scott   
2008-07-09 16:52   
Closed. Greg - if this does not work, let me know and I will re-open it.

alan