<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Willian Padovani Germano schreef:
<blockquote cite="mid:47DF1787.2080806@gmail.com" type="cite">
  <pre wrap="">Stani wrote:
(...)
  </pre>
  <blockquote type="cite">
    <pre wrap="">In which Blender version could this be available? Threading for sure 
would help!
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Maybe 2.46, but threading was added to support pynodes and it's all 
still experimental for now. As devs like you come with actual needs we 
can try to improve things.
  </pre>
</blockquote>
Great!<br>
<blockquote cite="mid:47DF1787.2080806@gmail.com" type="cite"><!----><br>
  <pre wrap="">A quick test I did here with the default threading module in Python 
crashed Blender (Python fatal error caused by the GIL (global 
interpreter lock) being already taken, from what I recall, which the 
module didn't expect). I searched online but threading is really a weak 
area in Python, specially its documentation, and I could only find 
someone with the same problem (*), but no replies with a solution. 
Adding access to grab and release the GIL via BPython is a possible turn 
around</pre>
</blockquote>
OK, I would already be happy with any way to run a thread.<br>
<blockquote cite="mid:47DF1787.2080806@gmail.com" type="cite">
  <pre wrap="">

  </pre>
  <blockquote type="cite">
    <pre wrap="">One final note: it is really frustrating that it is impossible for 
scripts embedded in blender drawings (not the ones which are imported) 
that global variables don't work in the local scope.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Let me see if I understood you. You mean gui callbacks have no access to 
the global dictionary used by the script. That's true, the dict is freed 
but the callbacks are left, it's not the fault of any script, </pre>
</blockquote>
I was referring to this mail, where console_autoexec.py was mentioned:<br>
<a class="moz-txt-link-freetext" href="http://lists.blender.org/pipermail/bf-python/2007-October/005037.html">http://lists.blender.org/pipermail/bf-python/2007-October/005037.html</a><br>
However when I look to the source of console_autoexec.py, it is empty.
So what is the purpose of this file?<br>
<blockquote cite="mid:47DF1787.2080806@gmail.com" type="cite">
  <pre wrap="">it's how 
it's always been in BPython. Thinking about it, it indeed seems better 
to keep the dicts, too.
  </pre>
</blockquote>
What is the design decision behind it? When you import a module the
global dict is kept and this problem doesn't occur. So I think it is
very inconsistent and confusing if you are python developer interested
in trying out Blender. I don't know what are the side effects of
solving this, but I know that some python developers try Blender, but
give up for such reasons.<br>
<blockquote cite="mid:47DF1787.2080806@gmail.com" type="cite">
  <pre wrap="">
PS: just for fun I'm taking a better look at C sockets programming, 
maybe it'd be nice for inter process communication via a scriptlink. 
Don't count on it, though, I'm just researching a little.
  </pre>
</blockquote>
Socket programming in Python works fine. Being able to run a python
socket server in a separate thread without blocking Blender UI would be
already wonderful. So if possible I prefer first if thread(s) could be
supported in some way, as it opens more possibilities than inter
process communication.<br>
<br>
Stani<br>
<br>
<br>
<br>
</body>
</html>