From fb2c31b2ea1ef5c94abaefc36e630d6cd57734f2 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Thu, 18 Aug 2011 19:11:49 -0700 Subject: [PATCH] Allow period characters in notebook names. --- IPython/frontend/html/notebook/notebookmanager.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/IPython/frontend/html/notebook/notebookmanager.py b/IPython/frontend/html/notebook/notebookmanager.py index e94177175..da0b455c7 100644 --- a/IPython/frontend/html/notebook/notebookmanager.py +++ b/IPython/frontend/html/notebook/notebookmanager.py @@ -52,9 +52,13 @@ class NotebookManager(LoggingConfigurable): 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)] + import glob + + 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: