This docs on this page refers to a PREVIOUS VERSION. For the latest stable release, go to https://docs.bokeh.org/

Archived docs for versions <= 1.0.4 have had to be modified from their original published configuration, and may be missing some features (e.g. source listing)

All users are encourage to update to version 1.1 or later, as soon as they are able.

bokeh.util.paths — Bokeh 1.0.3 documentation

Source code for bokeh.util.paths

import sys
from os.path import join, dirname, abspath, normpath, realpath, isdir

# Root dir of Bokeh package
ROOT_DIR = dirname(dirname(abspath(__file__)))


[docs]def serverdir(): """ Get the location of the server subpackage """ path = join(ROOT_DIR, 'server') path = normpath(path) if sys.platform == 'cygwin': path = realpath(path) return path
[docs]def bokehjsdir(dev=False): """ Get the location of the bokehjs source files. If dev is True, the files in bokehjs/build are preferred. Otherwise uses the files in bokeh/server/static. """ dir1 = join(ROOT_DIR, '..', 'bokehjs', 'build') dir2 = join(serverdir(), 'static') if dev and isdir(dir1): return dir1 else: return dir2