En Sun, 05 Apr 2009 16:36:05 -0300, Gerhard Häring <g...@ghaering.de> escribió:
John Machin wrote:
On Apr 4, 3:21 pm, John Doe <j...@usenetlove.invalid> wrote:
Anybody have a solution for Windows (XP) Explorer search not finding
ordinary text in *.py files?

Get a grep on yourself!
http://gnuwin32.sourceforge.net/packages/grep.htm

There's something even better:
http://betterthangrep.com/

Both have the same problem: they scan the "bytes contained in the file", not the "textual information available from the file". If you want to search for "año", grep won't find it if the file is stored in utf-8 and your terminal is latin1, or inside an HTML document written as a&ntilde;o, and may have some trouble if the file is in utf-16. In some cases, grep may not find any text inside a PDF document (when it's compressed).

The standard Windows search, on the contrary, does not have those limitations: but you have to "tell" it how to extract textual info from unknown file sources; in this case, that .py files are plain text files.

This KB article [1] explains how to do that for .py files, and this [2] the underlying technology.

[1] http://support.microsoft.com/?kbid=309173
[2] http://channel9.msdn.com/wiki/desktopsearchifilters/

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to