def writePrint(text):
    '''Write to the log and print to the screen.'''

    f = open(log_file, 'a')
    print text
    f.write(text)
    f.close()
Write to the log and print to the screen.
recipes/Python/579096_vlcpy_stream_capture_scheduler/recipe-579096.py