def entry_point(f):
    '''
    example:
        @entry_point
        def main():
            print("hello world")
    '''
    if f.__module__ == '__main__':
        f()
    return f

    example:
        @entry_point
        def main():
            print("hello world")
    
recipes/Python/577791_entrypoint_decorator__no_more_if_name_/recipe-577791.py