From 95a19d7bc276515c8abd01af5dab1e3b77699506 2012-03-01 23:25:00 From: Thomas Kluyver Date: 2012-03-01 23:25:00 Subject: [PATCH] Fix completion when importing modules in the cwd. --- diff --git a/IPython/core/completerlib.py b/IPython/core/completerlib.py index 466041f..8bece55 100644 --- a/IPython/core/completerlib.py +++ b/IPython/core/completerlib.py @@ -61,6 +61,9 @@ def module_list(path): Return the list containing the names of the modules available in the given folder. """ + # sys.path has the cwd as an empty string, but isdir/listdir need it as '.' + if path == '': + path = '.' if os.path.isdir(path): folder_list = os.listdir(path)