<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.17080" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff
size=2>Pat,</FONT></SPAN></DIV>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff size=2>I
receive AttributeError: 'module' object has no attribute
'ps1'.</FONT></SPAN></DIV>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff size=2>my
script - sample_script.py</FONT></SPAN></DIV>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff
size=2>======</FONT></SPAN></DIV>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff
size=2>#!/usr/bin/env pvbatch</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff size=2>import
sys<BR>del sys.ps1<BR>from paraview.simple import *</FONT></SPAN></DIV>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff
size=2>======</FONT></SPAN></DIV>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff
size=2>Adriano</FONT></SPAN></DIV>
<DIV><SPAN class=531403515-11022011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV><!-- Converted from text/plain format -->
<P><FONT size=2>=======</FONT><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> pat marion [mailto:pat.marion@kitware.com]
<BR><B>Sent:</B> 11 February 2011 15:30<BR><B>To:</B>
agagliardi@ara.co.uk<BR><B>Cc:</B> Utkarsh Ayachit;
paraview@paraview.org<BR><B>Subject:</B> Re: [Paraview] pvpython
message<BR></FONT><BR></DIV>
<DIV></DIV>That's odd. Maybe you have something in your pythonrc or
pythonstartup that is defining sys.ps1. Try adding this before the import
paraview line in your script:<BR><BR>import sys<BR>del
sys.ps1<BR><BR>Pat<BR><BR>
<DIV class=gmail_quote>On Fri, Feb 11, 2011 at 9:09 AM, Adriano Gagliardi <SPAN
dir=ltr><<A
href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><BR>I
receive the message when executing a Python script with pvpython or<BR>pvbatch
after 'from paraview.simple import *'. Whether I run it as:<BR><BR>pvpython
./my-script.py<BR>pvbatch ./my-script.py<BR><BR>or if I include the executable
at the top of the Python script ie:<BR>#!/usr/bin/env pvpython or
#!/usr/bin/env pvbatch<BR><BR>I still get the message. Is there another way I
should be executing the<BR>scripts?<BR>
<DIV
class=im><BR>Adriano<BR><BR>===================================<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: <A
href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</A><BR>Url: <A
href="http://www.ara.co.uk" target=_blank>www.ara.co.uk</A><BR></DIV>
<DIV class=im>-----Original Message-----<BR>From: Utkarsh Ayachit [mailto:<A
href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</A>]<BR>Sent:
11 February 2011 13:58<BR>To: <A
href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</A><BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>Cc: Aurélien Marsan; <A
href="mailto:paraview@paraview.org">paraview@paraview.org</A><BR>Subject: Re:
[Paraview] pvpython message<BR><BR>Out of curiosity, why would you want to
disable the message? It's only shown<BR>when pvpython is run as an interactive
session, never when a script argument<BR>is specified or with
pvbatch.<BR><BR>Utkarsh<BR><BR>2011/2/11 Adriano Gagliardi <<A
href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</A>>:<BR>><BR>>
Thanks, Aurelian. I don't like random hacks, but if that is the only<BR>>
option for the moment, so be it.<BR>><BR>> Thanks
again.<BR>><BR>><BR>>
===================================<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: <A
href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</A><BR>> Url: <A
href="http://www.ara.co.uk"
target=_blank>www.ara.co.uk</A><BR>><BR>><BR>>
________________________________<BR>> From: Aurélien Marsan [mailto:<A
href="mailto:aur.marsan@gmail.com">aur.marsan@gmail.com</A>]<BR>> Sent: 11
February 2011 13:29<BR>> To: <A
href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</A><BR>> Cc: <A
href="mailto:paraview@paraview.org">paraview@paraview.org</A><BR>> Subject:
Re: [Paraview] pvpython message<BR>><BR>> Hello,<BR>><BR>>
In<BR>>
PARAVIEW_DIR\lib\paraview-3.8\site-packages\paraview\servermanager.py<BR>>
comment the lines 2947 and 2949.<BR>>><BR>>> if hasattr(sys,
"ps1"):<BR>>> # session is interactive.<BR>>>
print
vtkSMProxyManager.GetParaViewSourceVersion();<BR>>><BR>><BR>>
Aurélien.<BR>><BR>> 2011/2/11 Adriano Gagliardi <<A
href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</A>><BR>>><BR>>>
Hello,<BR>>><BR>>> Is there a way to suppress the message you get
each time you open<BR>>> pvpython<BR>>>
i.e.:<BR>>><BR>>> paraview version 3.7.0, Date:
2009-10-03<BR>>><BR>>> Regards,<BR>>><BR>>>
Adriano<BR>>><BR>>>
===================================<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: <A
href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</A><BR>>> Url:
<A href="http://www.ara.co.uk"
target=_blank>www.ara.co.uk</A><BR>>><BR>>><BR>>>
*********************************************************************<BR>>>
* This email contains information that is private and confidential<BR>>>
and is intended only for the addressee.<BR>>> If you are not the
intended recipient please delete it and notify us<BR>>> immediately by
e-mailing the sender.<BR>>> Note: All email sent to or from this address
may be accessed by<BR>>> someone other than the recipient, for system
management and security<BR>>> reasons.<BR>>> Aircraft Research
Association Ltd. Registered in England,<BR>>> Registration
No<BR>>> 503668 Registered Office:<BR>>> Manton Lane, Bedford MK41
7PF England VAT No GB 196351245<BR>>><BR>>>
*********************************************************************<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<BR>>> <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:<BR>>> <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><BR>><BR>>
**********************************************************************<BR>>
This email contains information that is private and confidential and<BR>>
is intended only for the addressee.<BR>> If you are not the intended
recipient please delete it and notify us<BR>> immediately by e-mailing the
sender.<BR>> Note: All email sent to or from this address may be accessed
by<BR>> someone other than the recipient, for system management and
security<BR>> reasons.<BR>> Aircraft Research Association Ltd.
Registered in England,<BR>> Registration No<BR>> 503668 Registered
Office:<BR>> Manton Lane, Bedford MK41 7PF England VAT No GB
196351245<BR>><BR>>
**********************************************************************<BR>><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<BR>> <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:<BR>> <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><BR>><BR>><BR><BR><BR>**********************************************************************<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<BR><BR>**********************************************************************<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><BR></DIV></DIV></BLOCKQUOTE></DIV><BR><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>