Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat __init__.pyc same as __init__.py in module_list #2469

Merged
merged 3 commits into from Oct 7, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion IPython/core/completerlib.py
Expand Up @@ -17,6 +17,7 @@

# Stdlib imports
import glob
import imp
import inspect
import os
import re
Expand Down Expand Up @@ -90,7 +91,8 @@ def is_importable_file(path):

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

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