updated import statement for creating ipython notebooks, better name in place for jsonify

This commit is contained in:
Rishabh Raj
2014-04-10 18:40:59 +05:30
parent 235a9b3ec1
commit 694739ee02
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -47,7 +47,7 @@ class Notebook():
self.template["worksheets"][0]["cells"].append(copy.deepcopy(self.cell_type[type_of_value]))
self.template["worksheets"][0]["cells"][segment_number][type_of_value] = value
def jsondump(self, notebook_path):
def json(self, notebook_path):
# writes the template to file
with open(notebook_path, 'w') as output:
json.dump(self.template, output, indent=2)
@@ -97,4 +97,4 @@ def save_ipython_notebook(example_file, notebook_dir, notebook_path, basename):
# some text segment is continuing, so add to source
source.append(line)
nb.jsondump(notebook_path)
nb.json(notebook_path)
+1 -1
View File
@@ -80,7 +80,7 @@ from skimage import io
from skimage import transform
from skimage.util.dtype import dtype_range
from notebook import *
from notebook import save_ipython_notebook
LITERALINCLUDE = """