From eaf67c04d75c8e70d56ef95b1a16d15f799309e7 Mon Sep 17 00:00:00 2001 From: gobbo_a Date: Tue, 23 Aug 2022 14:45:32 +0200 Subject: [PATCH] Script execution --- script/test/test_proc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/script/test/test_proc.py b/script/test/test_proc.py index 8d9768b..a96a028 100644 --- a/script/test/test_proc.py +++ b/script/test/test_proc.py @@ -4,6 +4,7 @@ def f(name): print('hello', name) -p = Process(target=f, args=('bob',)) -p.start() -p.join() \ No newline at end of file +if __name__ == '__main__': + p = Process(target=f, args=('bob',)) + p.start() + p.join() \ No newline at end of file