It's already been done.
No sense reinventing the wheel.
In reply to Re: reading output from another script by pzbagel in thread reading output from another script by Octavian