2.6.2. Notebook startup

For clarity of the Python initialization, place a variant of the code block below at the top of Python notebooks (or else merge relevant parts into your standard Python startup):

# Auto-reload
%load_ext autoreload
%autoreload 2

# Python packages
import os
import sys
import numpy as np
import matplotlib.pyplot as plt

# Python path and DISPATCH packages
home=os.getenv('HOME')
top=home+'/codes/dispatch2/'
sys.path.insert(0,top+'utilities/python')
import dispatch as dis
import dispatch.graphics as dgr
import dispatch.select as dse

# Working directory
os.chdir(top+'experiments/ISM')