Created
July 17, 2012 01:51
-
-
Save capttwinky/3126446 to your computer and use it in GitHub Desktop.
findmod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import sys | |
| def findmod(targetMod): | |
| lstOut = [] | |
| for myDir in sys.path: | |
| if os.path.isdir(myDir) and "%s.py"%targetMod in os.listdir(myDir): | |
| lstOut.append(myDir) | |
| return lstOut | |
| print(findmod('gzip')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment