jupyter_notebook_config.py.jinja 633 Bytes
Newer Older
1 2 3 4
'''
  This script initializes Jupyter's configuration such as passwords and other
  things. It is run by IPython hence why it can use functions like get_config().
'''
5
import configparser
6 7 8
from notebook.auth import passwd
import os

Jérome Perrin's avatar
Jérome Perrin committed
9 10
c = get_config()

11
c.NotebookApp.password = passwd("{{ password }}")
12

13 14 15 16 17 18 19 20 21
try:
  os.environ['PATH'] = "{{ gcc_location }}/bin" + os.pathsep + os.environ['PATH']
except KeyError:
  os.environ['PATH'] = "{{ gcc_location }}/bin"

try:
  os.environ['PYTHONPATH'] = "{{ cythonplus_repository }}" + os.pathsep + os.environ['PYTHONPATH']
except KeyError:
  os.environ['PYTHONPATH'] = "{{ cythonplus_repository }}"