Also, do y’all call main() in the if block or do you just put the code you want to run in the if block?

  • lmmarsano@lemmynsfw.com
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    10 months ago

    Alternative: put entry point code in file __main__.py & run the containing package (eg, some_package) as a top-level expression (eg, python -m some_package).