Untitled
from some_decorators import run """ Running 'main' function in the script when running with __name__ == '__main__' """ """ Traditional way """ def main(): print('Some action...') if __name__ == '__main__': main() """ Decorator way """ @run def main(): print('Some action...')