Permalink
Browse files

Merge pull request #1463 from takluyver/local-import-completion

Fix completion when importing modules in the cwd.
  • Loading branch information...
2 parents 1fa7eb1 + 95a19d7 commit 8c403fa0a0bb120748783ff2a342b801a9f30fc9 @takluyver takluyver committed Mar 3, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 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)

0 comments on commit 8c403fa

Please sign in to comment.