Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c6b7529

Browse files
committed
Merge pull request ipython#2469 from avandever/master
Treat `__init__.pyc` same as `__init__.py` in module_list
2 parents e54a60b + f441784 commit c6b7529

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

IPython/core/completerlib.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
# Stdlib imports
1919
import glob
20+
import imp
2021
import inspect
2122
import os
2223
import re
@@ -90,7 +91,8 @@ def is_importable_file(path):
9091

9192
# Now find actual path matches for packages or modules
9293
folder_list = [p for p in folder_list
93-
if isfile(pjoin(path, p,'__init__.py'))
94+
if any(isfile(pjoin(path, p, '__init__' + suffix[0])) for
95+
suffix in imp.get_suffixes())
9496
or is_importable_file(p) ]
9597

9698
return [basename(p).split('.')[0] for p in folder_list]

0 commit comments

Comments
 (0)