detect endianness of a binary with python
Robert Kern
robert.kern at gmail.com
Fri Jul 23 11:44:51 EDT 2010
On 7/23/10 12:44 AM, Tim Roberts wrote:
> I wouldn't use os.system with grep and evaluate the return code. Instead
> I'd use subprocess.Popen("file<ourImage>") and read the text output of the
> commdn directly. By parsing that string, I can extract all kinds of
> interesting information.
Small correction: subprocess.Popen(["file", our_image_filename])
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list
mailing list