[IPython-dev] Using IPython API to create notebook

Robert Alexander roalexan at microsoft.com
Thu Nov 6 12:26:00 EST 2014


I'm trying to use the IPython API (see:

http://ipython.org/ipython-doc/2/api/generated/IPython.html.services.notebooks.nbmanager.html#module-IPython.html.services.notebooks.nbmanager) to programmatically create a notebook in IPython 2.3.0, but hitting some problems. Here are the steps that I tried:


ipython --version
2.3.0

python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import IPython
>>> IPython.html.services.notebooks.nbmanager.create_notebook('test')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'html'


It looks like the module is not being properly imported - any idea what I'm doing wrong here?


BTW, it works fine for another module I tested, via:


>>> import IPython
>>> print IPython.lib.passwd('test')
sha1:ac5afaa5ecd8:f8c76f014f3ea016b947c86af6ce176da249688d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141106/c0c470b1/attachment.html>


More information about the IPython-dev mailing list