I have been doing this:
import os
appDataPath = os.getenv('APPDATA')
dynPath = appDataPath + r"\Dynamo\0.9"
if dynPath not in sys.path:
sys.path.Add(dynPath)
bbPath = appDataPath + r"\Dynamo\0.9\packages\Bumblebee\extra"
if bbPath not in sys.path:
try:
sys.path.Add(bbPath)
import bumblebee as bb
except:
import xml.etree.ElementTree as et
root = et.parse(dynPath + "\DynamoSettings.xml").getroot()
for child in root:
if child.tag == "CustomPackageFolders":
for path in child:
path_bb = path.text + "\Bumblebee\extra"
if path not in sys.path:
sys.path.Add(path_bb)
import bumblebee as bb