[Bf-committers] Load an external python file

Thomas Dinges blender at dingto.org
Mon Dec 3 01:55:09 CET 2012


Hi,
thank you! :)
I solved it via the sys.path for now, but will look at your example 
script too.

Best regards,
Thomas

Am 03.12.2012 01:44, schrieb Campbell Barton:
> While adding to the sys.path and importing is normally best, you may
> just want to execute an external script.
>
> See text editor templates -> Script Stub
>
> On Mon, Dec 3, 2012 at 5:49 AM, Dan Eicher <dan at trollwerks.org> wrote:
>> The easiest way would be to put your scripts in a directory and add a
>> __init_.py then:
>>
>> import sys
>> sys.path.append('/path/to/cycles/cycles_module')
>> from cycles_module import utils
>>
>> Fedora, in their infinite wisdom, doesn't add
>> /usr/local/lib/python2.7/site-packages/ to they python path so I have
>> to do this quite often.
>>
>> Dan
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>
>


-- 
Thomas Dinges
Blender Developer, Artist and Musician

www.dingto.org



More information about the Bf-committers mailing list