Hi Peter,<div><br></div><div>First things first, I can't see how modal would help you. I think a handler is the way to go if you want a python function to run in parallel to the blender main operations.</div><div><br></div>

<div>This function cannot block the main thread though (the problem as you described) so you need a threaded way of getting this data.</div><div><br></div><div>Now, I don't know how "far" you want to go, but have you considered direct socket connections?</div>

<div><div><br></div><div>In my experience with client/server UDP communications (not necessarily the TCP you have to deal with in your downloads, but it may apply) it's pretty doable to implement a "non-preemptive multithreading" system to offload the main process.</div>

<div><br></div><div>The idea is inspired in the way Lua implements multithreading (or better, the way Lua doesn't do it ;) with coroutines [1].</div><div><br></div><div>What I found out is that most socket connections are buffered in the OS end. So as long as you get back from time to time to see if the buffer is emptied, you are good to go.</div>

<div><br></div><div>If that helps you can find a code snippet here [2]. This code considers the end of a package whenever it finds a "\n", but I'm sure you can adapt it to whatever the HTTP transferring does.</div>

<div><br></div><div><div>[1] - <a href="http://www.lua.org/pil/9.4.html">http://www.lua.org/pil/9.4.html</a></div><div>[2] - <a href="http://www.pasteall.org/39081/python">http://www.pasteall.org/39081/python</a></div><div>

(start looking at the init and loop functions and go from there)</div></div><div><br></div><div>Good luck,</div><div>Dalai</div><div><br></div><div><a href="http://blendernetwork.org/member/dalai-felinto" target="_blank">blendernetwork.org/member/dalai-felinto</a><br>

<a href="http://www.dalaifelinto.com" target="_blank">www.dalaifelinto.com</a></div><div><br></div><div><br><div class="gmail_quote">2013/1/23 Peter D. Cassetta <span dir="ltr"><<a href="mailto:peter@fingertipsoft.com" target="_blank">peter@fingertipsoft.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Another suggestion, which I feel would be preferable if I could get it<br>
working solely or mostly with Python, was to start another process.<br>
While I'm unsure exactly how one would do this, I got the impression<br>
that it might be possible to open a separate Python console, or launch<br>
another Blender instance (preferably in the background), and download<br>
needed files from there without slowing down anything else in the first<br>
Blender instance</blockquote></div>
</div></div>