Friday 15 May 2015

start ipython notebook with python file -



start ipython notebook with python file -

i not familiar python/ipython asking me whether possible start ipython notebook specific python file. used debugging. software create .py-file in temp folder , phone call ipython notebook file. possible or create sense @ all?

if you're talking launching ipython notebook server via python, utilize this:

#!/usr/bin/env python ipython.terminal.ipapp import launch_new_instance ipython.lib import passwd socket import gethostname import warnings warnings.filterwarnings("ignore", module = "zmq.*") sys.argv.append("notebook") sys.argv.append("--ipkernelapp.pylab='inline'") sys.argv.append("--notebookapp.ip=" + gethostname()) sys.argv.append("--notebookapp.open_browser=false") sys.argv.append("--notebookapp.password=" + passwd()) launch_new_instance()

obviously can alter arguments if desire.

at work have 1 utilize case you're saying--automatically generates python file, loads new ipython server user access it. however, it's pretty special utilize case--for normal debugging, recommend starting in ipython , not making *.py file until bugs gone.

or

if you're talking automatically navigating page corresponds python file made available ipython notebook server, (1) create sure you're using ipython 2, , (2) figure out you're desired url (it should deterministic) , (3) utilize webbrowser module navigate url.

python ipython

No comments:

Post a Comment