projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5cb895
)
make pyximport work with empty path entries in sys.path (== CWD)
author
Stefan Behnel
<scoder@users.berlios.de>
Sun, 25 Jan 2009 18:11:43 +0000
(19:11 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Sun, 25 Jan 2009 18:11:43 +0000
(19:11 +0100)
pyximport/pyximport.py
patch
|
blob
|
history
diff --git
a/pyximport/pyximport.py
b/pyximport/pyximport.py
index 542bb5ebf538505c2d3be008bc95bab3427f5e9d..2aa1bf20b4d8cd41b5fc11494ada9852fb79a94d 100644
(file)
--- a/
pyximport/pyximport.py
+++ b/
pyximport/pyximport.py
@@
-176,7
+176,13
@@
class PyxImporter(object):
paths = sys.path
join_path = os.path.join
is_file = os.path.isfile
- for path in filter(os.path.isdir, paths):
+ is_dir = os.path.isdir
+ for path in paths:
+ if not is_dir(path):
+ if not path:
+ path = os.getcwd()
+ else:
+ continue
for filename in os.listdir(path):
if filename == pyx_module_name:
return PyxLoader(fullname, join_path(path, filename),