<div dir="ltr"><div><div><div><div><div>Hi Miguel<br><br></div>When using the Python Programmble Filter, the current directory is the one you have run ParaView from.<br></div>You can use relative directory to this one, if that helps you, but I would not recommend it.<br><br></div>There is currently no way to have a relative path to the xml plugin directory in the default values of a xml property.<br><br></div><div>I would simply recommend to put the content of "MY_PLUGIN.py" in the xml of your plugin.<br><br></div><div>Best,<br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mathieu Westphal<br></div></div></div>
<br><div class="gmail_quote">On Mon, Apr 30, 2018 at 10:16 AM, Miguel Aguirre <span dir="ltr"><<a href="mailto:aguirre.utn@gmail.com" target="_blank">aguirre.utn@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="m_-2906144233571205166gmail_signature"><div dir="ltr"><div><div><div>Hi all,</div><div><br></div><div>I am working with Plugins for programmable filters that executes external Python scripts. So far, so good. </div><div><br></div><div>However, I want to avoid to write the entire path of the Python file on the XML file, as you can see highlighted in bold on the XML code down below. </div><div><br></div><div>Both, the XML and the Python file are in the same folder. Moreover, the XML file and the Python file have the same name. So, I wonder if there is a way to set up a relative path...do you have any ideas to solve that ?</div><div><br></div><div>Thanks in advance !</div></div></div><div><br></div><div>Miguel Angel AGUIRRE</div><div><br></div><div><br></div><div><br></div><div><div><ServerManagerConfiguration></div><div><span style="white-space:pre-wrap">  </span><ProxyGroup name="sources"></div><div><span style="white-space:pre-wrap">              </span><SourceProxy <span style="white-space:pre-wrap">        </span>name="MY_PLUGIN" </div><div><span style="white-space:pre-wrap">                                             </span>class="<wbr>vtkPythonProgrammableFilter"</div><div><span style="white-space:pre-wrap">                                         </span>label="

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">MY_PLUGIN</span>"></div><div><span style="white-space:pre-wrap">       </span>  <br></div><div><span style="white-space:pre-wrap">                   </span><!-- Define the Paraview data set type as vtkPolyData (default value of 0 means vtkPolyData) --></div><div><span style="white-space:pre-wrap">                   </span><IntVectorProperty </div><div><span style="white-space:pre-wrap">                          </span>name="OutputDataSetType" </div><div><span style="white-space:pre-wrap">                             </span>command="SetOutputDataSetType"<wbr> </div><div><span style="white-space:pre-wrap">                            </span>number_of_elements="1"</div><div><span style="white-space:pre-wrap">                         </span>default_values="0"</div><div><span style="white-space:pre-wrap">                             </span>panel_visibility="never"> </div><div><span style="white-space:pre-wrap">                 </span></IntVectorProperty></div><div><span style="white-space:pre-wrap">                       </span></div><div><br></div><div><span style="white-space:pre-wrap">                        </span><StringVectorProperty </div><div><span style="white-space:pre-wrap">                               </span>name="Script" </div><div><span style="white-space:pre-wrap">                                </span>command="SetScript"</div><div><span style="white-space:pre-wrap">                            </span>number_of_elements="1"</div><div><span style="white-space:pre-wrap">                         </span>default_values="<b>execfile('C:/<wbr>Users/m.aguirre./.../.../.../

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">MY_PLUGIN</span>

.py')</b>"></div><div><span style="white-space:pre-wrap">                         </span><!--</div><div><span style="white-space:pre-wrap">                          </span><Hints></div><div><span style="white-space:pre-wrap">                                    </span><Widget type="multi_line"/></div><div><span style="white-space:pre-wrap">                              </span></Hints></div><div><span style="white-space:pre-wrap">                           </span>--></div><div><span style="white-space:pre-wrap">                   </span></StringVectorProperty></div><div><span style="white-space:pre-wrap">                    </span></div><div><br></div><div><span style="white-space:pre-wrap">                </span></SourceProxy></div><div><span style="white-space:pre-wrap">     </span></ProxyGroup></div><div></ServerManagerConfiguration></div></div><div><br></div></div></div>
</div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">https://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>