89 | | raise RuntimeError, "Not implemented !" |
| 91 | if self.totiffcommand : |
| 92 | child = popen2.Popen4(self.totiffcommand % locals()) |
| 93 | try : |
| 94 | try : |
| 95 | data = self.infile.read(MEGABYTE) |
| 96 | while data : |
| 97 | child.tochild.write(data) |
| 98 | data = self.infile.read(MEGABYTE) |
| 99 | child.tochild.flush() |
| 100 | child.tochild.close() |
| 101 | except (IOError, OSError), msg : |
| 102 | raise PDLParserError, "Problem during conversion to TIFF : %s" % msg |
| 103 | finally : |
| 104 | child.fromchild.close() |
| 105 | |
| 106 | try : |
| 107 | child.wait() |
| 108 | except OSError, msg : |
| 109 | raise PDLParserError, "Problem during conversion to TIFF : %s" % msg |
| 110 | else : |
| 111 | raise PDLParserError, "Impossible to compute ink coverage for this file format." |