Sorry about the vague subject but I am having trouble describing my needs here.
I am trying to get a python script(We will call it script A) to call another script(Script B), I need Script A to wait until Script B produces some output then process the output accordingly.
I am using popen() currently. I might just be using it incorrectly for what I need to do. Here is what is going on...
Code:
def main():
lircInput = os.popen("/usr/bin/ircat test")
if lircInput == "left":
left()
else:
right()
this is just for the testing purposes, but left() and right() both recall my main() function when they are done.
Any help would be great. Thanks.