Changed main() call to if __name__ == '__main__':