[Bf-committers] pyc and pyo loading

Willian Padovani Germano bf-committers@blender.org
27 Jun 2003 23:07:22 -0300


On Fri, 2003-06-27 at 10:35, Kester Maddock wrote:
> Python will only load .pyo files in optimise mode and .pyc files in normal 
> mode.
> Python embedded in Blender can be set to optimise by setting the environment 
> variable PYTHONOPTIMIZE=1

Thanks for the info : ), I didn't know that.  But I couldn't "grep"
anything like this in the source, so maybe it'll work without it, since
the still current bpython code in Blender accepts both .pyc and .pyo ...
well, let's try without it, once path handling is properly implemented. 
If it still doesn't work, there's your suggestion.  Anyway, it's better
to check this PYTHONOPTIMIZE var, it may give us some cycles ...

> PovAnim still isn't working because Blender.sys.dirname and Blender.sys.dirsep 
> haven't been implemented in EXPPYTHON yet. :)

We'll add it.

> Also, Object.getInverseMatrix is broken.  It allocates the inverse matrix on 
> the stack, and passes a pointer which is invalid when the function goes out 
> of scope.  Patch (in api2_2x/) and test case attached.
> This was pointed out by jmerrit in
> http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=1377

Thanks, one less to go : ).  Recently Michel added the matrix pyobject
to exppython.  With your patch, matrix code is probably all in place now
...

--
Willian, wgermano@ig.com.br