-
Notifications
You must be signed in to change notification settings - Fork 233
/
__init__.py
38 lines (31 loc) · 1.1 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from __future__ import absolute_import
from ipyvolume._version import __version__ # noqa: F401
from ipyvolume import styles # noqa: F401
from ipyvolume import examples # noqa: F401
from ipyvolume import datasets # noqa: F401
from ipyvolume import embed # noqa: F401
from ipyvolume.widgets import * # noqa: F401, F403
from ipyvolume.transferfunction import * # noqa: F401, F403
from ipyvolume.pylab import * # noqa: F401, F403
import ipyvolume.ui # noqa: F401, F403
def _prefix():
import sys
from pathlib import Path
prefix = sys.prefix
here = Path(__file__).parent
# for when in dev mode
if (here.parent / 'share/jupyter/nbextensions/ipyvolume').exists():
prefix = here.parent
return prefix
def _jupyter_labextension_paths():
return [{
'src': f'{_prefix()}/share/jupyter/labextensions/ipyvolume/',
'dest': 'ipyvolume',
}]
def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
'src': f'{_prefix()}/share/jupyter/nbextensions/ipyvolume/',
'dest': 'ipyvolume',
'require': 'ipyvolume/extension'
}]