How to "highlight" a word found in a text file?
<p>I am searching a text file for a word. It finds the word and returns the line that has the word. This is good, but I would like to highlight or make the word bold in that line.</p>

<p>Can I do this in Python? Also I could use a better way to get the users txt file path.  </p>

<pre><code>def read_file(file):
    #reads in the file and print the lines that have searched word. 
    file_name = raw_input("Enter the .txt file path: ")
    with open(file_name) as f:
        the_word = raw_input("Enter the word you are searching for: ")
        print ""
        for line in f:
            if the_word in line:
                print line 
</code></pre>