Getting Down to Code Step 2
Step 2: How do you control functionality from a program?
os.system('webster insurrection') # Prints to output buffer
# Redirect to a temp file, read it into a variable from there:
os.system('webster painting > /tmp/websterResult')
fd = open('/tmp/websterResult')
# Throw away the first line (reports on contacting Webster server):
os.system('rm /tmp/websterResult')
In Python (could do it in Java, C++…):