Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if __name__ == "__main__" idiom broken in script launch mode #18

Closed
mortenlj opened this issue Feb 16, 2024 · 1 comment
Closed

if __name__ == "__main__" idiom broken in script launch mode #18

mortenlj opened this issue Feb 16, 2024 · 1 comment
Assignees
Labels
bug Something isn't working done

Comments

@mortenlj
Copy link

When launching a script, the script is no longer considered the __main__ module, and the common idiom for launching doesn't work.

This really should work:

def do_something():
    print("Hello world!")

if __name__ == "__main__":
   do_something()
@pomponchik pomponchik mentioned this issue Feb 16, 2024
@pomponchik pomponchik added bug Something isn't working to do labels Feb 16, 2024
@pomponchik
Copy link
Owner

Hi! I fixed this bug starting from version 0.0.25.

@pomponchik pomponchik self-assigned this Feb 16, 2024
@pomponchik pomponchik added done and removed to do labels Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done
Projects
None yet
Development

No branches or pull requests

2 participants