Browse files

Merge branch 'htmlnotebook_list_notebooks' of https://github.com/stef…

…anv/ipython into stefanv-htmlnotebook_list_notebooks
  • Loading branch information...
2 parents d33fac5 + 0e2ee7f commit a82fa5d2d824f183476888b274ed574424d56893 @ellisonbg ellisonbg committed Aug 18, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 IPython/frontend/html/notebook/notebookmanager.py
View
9 IPython/frontend/html/notebook/notebookmanager.py
@@ -19,6 +19,7 @@
import datetime
import os
import uuid
+import glob
from tornado import web
@@ -52,9 +53,11 @@ def list_notebooks(self):
dict(notebook_id=notebook,name=name)
"""
- names = os.listdir(self.notebook_dir)
- names = [name.split(u'.')[0]
- for name in names if name.endswith(self.filename_ext)]
+ names = glob.glob(os.path.join(self.notebook_dir,
+ '*' + self.filename_ext))
+ names = [os.path.splitext(os.path.basename(name))[0]
+ for name in names]
+
data = []
for name in names:
if name not in self.rev_mapping:

0 comments on commit a82fa5d

Please sign in to comment.