[Bf-committers] Scripts directory

Willian Padovani Germano bf-committers@blender.org
Sun, 26 Oct 2003 12:04:08 -0200


Hi,

> This might be a silly question but when someone writes a multi-part .py
file and then tries to 'import' one of the other .py files (to use it's
functions/classes) it seems that only the python path is searched for the
.py files.  If you put the .py scripts in the /.blender bin for the
executable they are hidden from python.

Look at code in BPY_interface.c, functions like syspath_append and
init_syspath for how we do this.  Besides usual python places and the dir
where Blender was started from, we also add the user defined python dir.
Once we get a dir for scripts that will come with Blender and maybe a
.blender/scripts or something, those will be added, too.  Not to mention one
for reusable modules (with functions built on top of the bpython API, like
for math, gui widgets, armatures, etc).  So probably there's no need to put
.blender/ itself ...

--
Willian, wgermano@ig.com.br