I have done it in past. Attached is a python script. The key is to avoid using anything but direct SMproxies or SMproperties, never their python wrapped counter parts.<div>(Note you may not be able to use the script directly since it expects a certain kind of state file loaded, but should serve as an example nonetheless)</div>
<div><br></div><div>Utkarsh<br><br><div class="gmail_quote">2011/5/17 Stephane PLOIX <span dir="ltr">&lt;<a href="mailto:stephane.ploix@edf.fr">stephane.ploix@edf.fr</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br><font size="2" face="sans-serif">Hi,</font>
<br>
<br><font size="2" face="sans-serif">Did anyone try to use pyqt in a macro
(to get some input from the user)?</font>
<br><font size="2" face="sans-serif">I can&#39;t make anything working with signal
and slots, it seems to mess with the python threads.</font>
<br><font size="2" face="sans-serif">I can understand that it may not be
possible to use non modal dialogs because the paraview gui in single-threaded,
but even modal dialogs freeze if I use signals.</font>
<br>
<br><font size="2" face="sans-serif">Any hint or recommendation?</font>
<br>
<br><font size="2" face="sans-serif">Best,</font>
<br><font size="2" face="sans-serif">Stephane<br>
<br>
<br>
</font>
<table>
<tbody><tr valign="top">
<td rowspan="2"><font size="2" face="sans-serif"> </font><img src="cid:_1_07F5E32007F5DF3800480C5DC1257893"><font size="2" face="sans-serif">
</font>
</td><td><font size="1" face="sans-serif"> </font>
</td></tr><tr valign="top">
<td><font size="1" color="#ff8100" face="Arial"><b>Stephane PLOIX</b></font><font size="1" color="#ff8100" face="Arial"><b><br>
Pilote Opérationnel - Visualisation scientifique</b></font><font size="1" color="#0062e1" face="Arial"><br>
EDF - R&amp;D<br>
SINETICS<br>
1, Av du Général de Gaulle<br>
92140 Clamart</font><font size="1" color="#0062e1" face="sans-serif"><br>
 </font>
<br><font size="1" color="#0062e1" face="Arial"><b><a href="mailto:stephane.ploix@edf.fr" target="_blank">stephane.ploix@edf.fr</a></b></font>
<br><font size="1" color="#0062e1" face="Arial">Tél. : +33 (0) 1 47 65 51
10</font>
</td></tr><tr>
<td valign="top"><font size="2" face="sans-serif"> </font><img src="cid:_1_07F5F26007F5EE7800480C5DC1257893"><font size="2" face="sans-serif">
</font>
</td><td><font size="1" color="#0062e1" face="Arial">Un geste simple pour l&#39;environnement,
n&#39;imprimez ce message que si vous en avez l&#39;utilité.</font></td></tr></tbody></table>
<br><font face="monospace"><br>
<br>
<br>
Ce message et toutes les pièces jointes (ci-après le &#39;Message&#39;) sont établis à l&#39;intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.<br>

<br>
Si vous n&#39;êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d&#39;en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n&#39;en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d&#39;en avertir immédiatement l&#39;expéditeur par retour du message.<br>

<br>
Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.<br>
____________________________________________________<br>
<br>
This message and any attachments (the &#39;Message&#39;) are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.<br>

<br>
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.<br>

<br>
E-mail communication cannot be guaranteed to be timely secure, error or virus-free.</font><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>
<br></blockquote></div><br></div>