Skip to content

Commit

Permalink
Scripts should only call function if __name__ == '__main__'
Browse files Browse the repository at this point in the history
Avoid potential problems with multiprocessing on Windows
  • Loading branch information
takluyver committed Mar 17, 2015
1 parent fc63963 commit dbc4412
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flit/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ def get_info_from_module(target):
script_template = """\
#!{interpreter}
from {module} import {func}
{func}()
if __name__ == '__main__':
{func}()
"""

def parse_entry_point(ep: str):
Expand Down

0 comments on commit dbc4412

Please sign in to comment.