Skip to content
This repository
Browse code

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

Fix completion when importing modules in the cwd.
  • Loading branch information...
commit 8c403fa0a0bb120748783ff2a342b801a9f30fc9 2 parents 1fa7eb1 + 95a19d7
Thomas Kluyver authored March 03, 2012

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  IPython/core/completerlib.py
3  IPython/core/completerlib.py
@@ -61,6 +61,9 @@ def module_list(path):
61 61
     Return the list containing the names of the modules available in the given
62 62
     folder.
63 63
     """
  64
+    # sys.path has the cwd as an empty string, but isdir/listdir need it as '.'
  65
+    if path == '':
  66
+        path = '.'
64 67
 
65 68
     if os.path.isdir(path):
66 69
         folder_list = os.listdir(path)

0 notes on commit 8c403fa

Please sign in to comment.
Something went wrong with that request. Please try again.