Skip to content

Commit eb6d4d9

Browse files
committed
Added pywhich.py
1 parent af65672 commit eb6d4d9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pywhich.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import os
2+
import sys
3+
from glob import glob
4+
5+
module = sys.argv[1]
6+
for libpath in sys.path:
7+
for modpath in glob(os.path.join(libpath, module) + '*'):
8+
print modpath
9+
sys.exit(0)
10+
print "Not Found."

0 commit comments

Comments
 (0)