In <[EMAIL PROTECTED]>, cjl wrote: > I am working on a little script that needs to pull the strings out of a > binary file, and then manipulate them with python. > > The command line utility "strings" (part of binutils) has exactly the > functionality I need, but I was thinking about trying to implement this > in pure python. > > I did some reading on opening and reading binary files, etc., and was > just wondering if people think this is possible, or worth my time (as a > learning exercise), or if something like this already exists.
If you find it interesting and challenging go ahead and try it. It is possible and with the help of the 're' and 'mmap' modules it should be quite easy to filter strings out of files without the need to load them into memory at once. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list