<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<META content="MSHTML 6.00.6000.17102" name=GENERATOR>
<STYLE>@font-face {
        font-family: Cambria Math;
}
@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@page WordSection1 {size: 612.0pt 792.0pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
P {
        FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: "Times New Roman","serif"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-style-priority: 99
}
SPAN.EmailStyle18 {
        COLOR: #1f497d; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal-reply
}
.MsoChpDefault {
        mso-style-type: export-only
}
DIV.WordSection1 {
        page: WordSection1
}
</STYLE>
</HEAD>
<BODY lang=FR-CA vLink=purple link=blue>
<DIV><SPAN class=778400614-01112011><FONT face=Arial color=#0000ff size=2>What
does sta.py do that it needs to open the GUI? Do you mean an X11
window?</FONT></SPAN></DIV>
<DIV> </DIV><!-- Converted from text/plain format -->
<P><FONT size=2>===================================<BR><BR>Adriano Gagliardi
MEng PhD<BR>Business Sector Leader<BR>Computational Aerodynamics<BR>Aircraft
Research Association Ltd.<BR>Manton Lane<BR>Bedford<BR><BR>Tel: 01234 32
4644<BR>E-mail: agagliardi@ara.co.uk<BR>Url: www.ara.co.uk </FONT></P>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> paraview-bounces@paraview.org
[mailto:paraview-bounces@paraview.org] <B>On Behalf Of </B>David
Dupuis<BR><B>Sent:</B> 01 November 2011 14:00<BR><B>To:</B> Utkarsh
Ayachit<BR><B>Cc:</B> paraview@paraview.org<BR><B>Subject:</B> Re: [Paraview]
Paraview Python scripting<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=WordSection1>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Hello
Utkarsh,</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">The
Python Shell works fine.</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">On
the other hand, if you mean using pvpython this way:</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">>>
/home/david/ParaView-3.12.0-RC2-Linux-x86_64/bin/pvpython ./sta.py</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">It
doesn’t work... The GUI will flash (open partially and shutdown quickly)
and we cannot see anything...</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Thanks
again!</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">David</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-CA
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<DIV
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<P class=MsoNormal><B><SPAN lang=FR
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">De :</SPAN></B><SPAN
lang=FR style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"> Utkarsh
Ayachit [mailto:<A
href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</A>]
<BR><B>Envoyé :</B> 1 novembre 2011 09:35<BR><B>À :</B> David
Dupuis<BR><B>Cc :</B> <A
href="mailto:paraview@paraview.org">paraview@paraview.org</A><BR><B>Objet :</B>
Re: [Paraview] Paraview Python scripting</SPAN></P></DIV>
<P class=MsoNormal> </P>
<P class=MsoNormal>Have you tried using the pvpython executable? It's
sets up the environment correctly for you. Alternatively, from the GUI, you can
open the Python Shell and and then use the "Load Script" button to load the
script.</P>
<DIV>
<P class=MsoNormal> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-BOTTOM: 12pt">Utkarsh</P>
<DIV>
<P class=MsoNormal>On Tue, Nov 1, 2011 at 9:28 AM, David Dupuis <<A
href="mailto:david.dupuis@cadensimaging.com">david.dupuis@cadensimaging.com</A>>
wrote:</P>
<DIV>
<DIV>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA>Hello,</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA>I’m manipulating different dataset and for each of them I have a
different setup (pipeline). I saved the state as a python file and plan to
re-use the python state file to re-open the whole pipeline for each dataset. It
seems that only *.psvm files can be loaded via File -> Load state in
Paraview. Is there a way to load a python state file? </SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA>Here is what I tried to do so, but didn’t succeeded.</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA></SPAN> </P>
<P><SPAN lang=EN-CA>1- I followed the procedure for Paraview/Python scripting,
and added PYTHONPATH in .bashrc:</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA>export
PYTHONPATH="/home/david/ParaView-3.12.0-RC2-Linux-x86_64/lib/paraview-3.12/site-packages/:/home/david/ParaView-3.12.0-RC2-Linux-x86_64/bin"</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN lang=EN-CA>*
The only thing I can’t do is adding the path to
="/home/david/ParaView-3.12.0-RC2-Linux-x86_64/Utilities/VTKPythonWrapping/site-packages
since I don’t have any Utilities folder in my Paraview directory. I believe
this is required, but don’t know what to install and where to get it to have
it...</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA>2- I tried to load the python state file via python with the setup
described at step 1, but got the following error:</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA>>> python ./sta.py </SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA>Traceback (most recent call last):</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA> File "/home/david/CADv2/Patients/P1/Prone/sta.py", line 2, in
<module></SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA> except: from paraview.simple import *</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA> File
"/home/david/ParaView-3.12.0-RC2-Linux-x86_64/lib/paraview-3.12/site-packages/paraview/simple.py",
line 39, in <module></SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA> import servermanager</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA> File
"/home/david/ParaView-3.12.0-RC2-Linux-x86_64/lib/paraview-3.12/site-packages/paraview/servermanager.py",
line 43, in <module></SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA> import paraview, re, os, os.path, new, sys,
vtk</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA> File
"/home/david/ParaView-3.12.0-RC2-Linux-x86_64/lib/paraview-3.12/site-packages/paraview/vtk/__init__.py",
line 1, in <module></SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA> from vtkCommonPython import *</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA>ImportError: No module named vtkCommonPython</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN lang=EN-CA>I
have taken a look and there is no vtkCommonPython module on my machine. Is it
part of the VTKPythonWrapping in Utilities?</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA>Thanks for helping me with this one.</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA>David</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><IMG
id=_x0000_i1025 height=86 alt=L_CadensImaging+rendering_C_gif
src="cid:778400614@01112011-13BF" width=216 border=0></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
style="FONT-SIZE: 9pt"></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
style="FONT-SIZE: 9pt">DAVID DUPUIS</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
style="FONT-SIZE: 9pt">Chef de produit | Product manager</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
style="FONT-SIZE: 9pt"></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
style="FONT-SIZE: 9pt">116 principale, suite 200 </SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
style="FONT-SIZE: 9pt">Granby (Qubec), J2G 2V2</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN lang=EN-CA
style="FONT-SIZE: 9pt">CANADA</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN lang=EN-CA
style="FONT-SIZE: 9pt"></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN lang=EN-CA
style="FONT-SIZE: 9pt">T: <A href="tel:450.956.3456"
target=_blank>450.956.3456</A> I Ext: 5114</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN lang=EN-CA
style="FONT-SIZE: 9pt">F: <A href="tel:450.991.3456"
target=_blank>450.991.3456</A></SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
style="FONT-SIZE: 9pt"><A href="mailto:david.dupuis@cadensimaging.com"
target=_blank>david.dupuis@cadensimaging.com</A></SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
style="FONT-SIZE: 9pt"></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><B><SPAN
style="FONT-SIZE: 9pt">Avis :</SPAN></B><SPAN style="FONT-SIZE: 9pt"> Ce message
est confidentiel et est à l'usage exclusif de son destinataire. Il est
strictement interdit à toute autre personne de le diffuser, le distribuer ou le
reproduire. Si le destinataire ne peut être joint ou vous est inconnu,
veuillez informer l'expéditeur par courrier électronique immédiatement et
effacer ce message et en détruire toute copie. Les communications par Internet
sont exposées au risque d'altération des données, d'autres erreurs de
transmission et la perte de confidentialité. Si vous désirez que nous
communiquions avec vous par un autre moyen, veuillez nous en aviser.</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
style="FONT-SIZE: 9pt"></SPAN> </P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><B><SPAN
lang=EN-CA style="FONT-SIZE: 9pt">Notice:</SPAN></B><SPAN lang=EN-CA
style="FONT-SIZE: 9pt"> This message is confidential and is intended for the
exclusive use of the addressee. Any other person is strictly prohibited
from disclosing, distributing or reproducing it. If the addressee cannot
be reached or is unknown to you, please inform the sender by return e-mail
immediately and delete this message and destroy all copies. Internet
communications are subject to the risk of data corruption, other transmission
errors and loss of confidentiality. Please advise if you wish us to use a
different method when communicating with you.</SPAN></P>
<P class=MsoNormal
style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN
lang=EN-CA></SPAN> </P></DIV></DIV>
<P class=MsoNormal
style="MARGIN-BOTTOM: 12pt"><BR>_______________________________________________<BR>Powered
by <A href="http://www.kitware.com"
target=_blank>www.kitware.com</A><BR><BR>Visit other Kitware open-source
projects at <A href="http://www.kitware.com/opensource/opensource.html"
target=_blank>http://www.kitware.com/opensource/opensource.html</A><BR><BR>Please
keep messages on-topic and check the ParaView Wiki at: <A
href="http://paraview.org/Wiki/ParaView"
target=_blank>http://paraview.org/Wiki/ParaView</A><BR><BR>Follow this link to
subscribe/unsubscribe:<BR><A
href="http://www.paraview.org/mailman/listinfo/paraview"
target=_blank>http://www.paraview.org/mailman/listinfo/paraview</A></P></DIV>
<P class=MsoNormal> </P></DIV></DIV><p>**********************************************************************<br />This email contains information that is private and confidential and is intended only for the addressee.<br />If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.<br />Note: All email sent to or from this address may be accessed by someone other than the recipient, for<br />system management and security reasons.<br />Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office:<br />Manton Lane, Bedford MK41 7PF England VAT No GB 196351245</p><p>**********************************************************************</p>
</BODY></HTML>