From a2b246f6dacff2b37c00e87c6788849b6776fef4 2011-08-19 02:11:49 From: Stefan van der Walt Date: 2011-08-19 02:11:49 Subject: [PATCH] Allow period characters in notebook names. --- diff --git a/IPython/frontend/html/notebook/notebookmanager.py b/IPython/frontend/html/notebook/notebookmanager.py index e941771..da0b455 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: