##// END OF EJS Templates
Merge pull request #931 from minrk/readonly...
Merge pull request #931 from minrk/readonly The notebook now supports a `--read-only` flag, which allows users to view all notebooks being served but not to edit them or execute any code. These actions are not allowed and the buttons, shortcuts, etc. are removed, but the requests will raise authentication errors if they manage to send the events anyway. Save/print functions remain available. This flag can be used in two modes: 1. When running an unauthenticated server, one can run a *second* read-only server in the same directory on a public IP address. This will let users connect to the read-only view without having to worry about configuring passwords and certificates for the execution server. 2. When running a server configured with authentication (and hopefully an SSL certificate), starting it with `--read-only` allows unauthenticated users read-only access to notebooks. This means that the same server on a single port can be both used by authenticated users for execution and by the public for viewing the available notebooks.

File last commit:

r2267:928c921b
r5219:80e60eb2 merge
Show More
ipy_profile_numpy.py
24 lines | 524 B | text/x-python | PythonLexer
""" IPython 'numpy' profile, to preload NumPy.
This profile loads the math/cmath modules as well as all of numpy.
It exposes numpy via the 'np' shorthand as well for convenience.
"""
from IPython.core import ipapi
import ipy_defaults
def main():
ip = ipapi.get()
try:
ip.ex("import math,cmath")
ip.ex("import numpy")
ip.ex("import numpy as np")
ip.ex("from numpy import *")
except ImportError:
print "Unable to start NumPy profile, is numpy installed?"
main()