Created
August 9, 2015 17:24
-
-
Save gph03n1x/bf8de1d0a063b7d7166d to your computer and use it in GitHub Desktop.
This file contains 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, sys | |
wordtolook = raw_input(">") | |
for root, directories, filenames in os.walk(os.getcwd()): | |
for filename in filenames: | |
if os.path.join(root,filename) != sys.argv[0]: | |
fileobject = open(os.path.join(root,filename), 'r') | |
if wordtolook in fileobject.read(): | |
print "{0} at :{1}".format(wordtolook, fileobject.name) | |
fileobject.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment