It's quite all right to rely on parsing a tool's output if you control the tool as well. (Although in this case you should probably provide a library interface to it as well as one that requires exec()ing something, this is not always practical nor possible.)