Skip to content

Instantly share code, notes, and snippets.

@capttwinky
Created July 17, 2012 01:51
Show Gist options
  • Save capttwinky/3126446 to your computer and use it in GitHub Desktop.
Save capttwinky/3126446 to your computer and use it in GitHub Desktop.
findmod
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