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 -- http://mail.python.org/mailman/listinfo/python-list