[Bf-python] sys.path problem

www.stani.be s_t_a_n_i at yahoo.com
Fri Nov 12 00:53:33 CET 2004


Hi,
It looks like Blender doesn't take in account the .pth
files. For example I have wx.pth in lib/site-packages
but "import wx" fails. The problem is that this
prevents SPE from starting up. I quick-fixed it like
this:

>import sys,os
>site_packages   =
os.path.join(sys.prefix,'Lib','site-packages')
>wx_pth          =
os.path.join(site_packages,'wx.pth')
>if os.path.exists(wx_pth):
 
sys.path.append(os.path.join(sys.prefix,'Lib','site-packages',open(wx_pth).read()))

But a more generic solution inside Blender would be
better of course, so that Blender in future takes .pth
files in account.

Stani


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Bf-python mailing list