A tornado based IPython notebook server.
Shutdown all kernels.
The kernels will shutdown themselves when this process no longer exists, but explicit shutdown allows the KernelManagers to cleanup the connection files.
Check the components submodule, and warn if it’s unclean
construct the kernel arguments
initialize tornado webapp and httpserver
Return the current working directory and the server url information
Remove the nbserver-<pid>.json file created for this server.
Ignores the error raised when the file has already been removed.
Return a JSONable dict of information about this server.
Start the IPython Notebook server app, after initialization
This method takes no arguments so all configuration and initialization must be done prior to calling this method.
return extra paths + the default location
Write the result of server_info() to the JSON file info_file.
Generate a list of n random ports near the given port.
The first 5 ports will be sequential, and the remaining n-5 will be randomly selected in the range [port-2*n, port+2*n].
Load the (URL pattern, handler) tuples for each component.
Iterate over the server info files of running notebook servers.
Given a profile name, find nbserver-* files in the security directory of that profile, and yield dicts of their information, each one pertaining to a currently running notebook server instance.