Once you load findWord.py into IDLE and press F5 to load the function into memory, type this at the shell to run it:
findWord("the","preamble.txt")
Make sure findWord.py and the preamble.txt file are in the same location (e.g. both on the Desktop).