<br><br><div class="gmail_quote">On Fri, Feb 3, 2012 at 11:03, Ben Edwards <span dir="ltr"><<a href="mailto:bedwards@cs.unm.edu">bedwards@cs.unm.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Think I sent this yesterday using the wrong email so it got rejected(silently?). If it's a duplicate I apologize...<br><br>Two questions. Would it be possible to add a verbose or quiet keyword option to sync_imports so it does not print <br>



<pre><span>"importing </span><span>%s</span><span> from </span><span>%s</span><span> on engine(s)"</span><span></span></pre>
For each module importing on engines. If this is a worthwhile idea I'll make a pull request, with whatever default you guys thinks is reasonable.<br></blockquote><div><br></div><div>Sure, a quiet keyword makes sense.  I would default it to False, because it is a good indicator of whether the import actually happened, as there are some circumstances where previous state causes imports to be no-ops, never actually triggering the import hook necessary to execute the remote import (I don't remember which, at the moment).</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>Also
 why is sync_imports in the DirectView class but not the 
LoadBalancedView class? I usually use LoadBalancedView, so having to 
create a DirectView instance just for some imports clutters my code ever
 so slightly. Is there a subtle difference I am missing?</blockquote><div><br></div><div>If you want an action to happen on particular engines or more than one engine, DirectView is always thing to use.  If LoadBalancedView had this method, the import would be load-balanced onto a single engine, and the only thing you would be guaranteed is that your next apply would *not* occur on the same engine where you performed the import.</div>

<div><br></div><div>The standard model is to use DirectView for setup, and LoadBalancedView for submission.  If you use LoadBalancedView for setup, your setup will, logically enough, be load-balanced, which rarely makes sense.</div>

<div><br></div><div>If you are concerned about clutter and really would only use it for sync_imports, you need not keep the DV around:</div><div><br></div><div>with rc[:].sync_imports(quiet=True):</div><div>    import foo</div>

<div>    import bar</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If not perhaps we can add the function to the View class so both inherit it?</blockquote>

<div><br></div><div>It was a deliberate choice. I would prefer to keep this sort of direct-mapped action out of the LB class.  It's the same reason LBView has no push/pull. </div><div><br></div><div>-MinRK</div><div>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br><br>Ben Edwards<br><div><div><img></div>

</div><br>
</font></span><br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br>