On 1/2/2020 2:46 AM, Cameron Simpson wrote:
Inline code under the if...__main__ stuff cannot be called as a function;
Which makes it difficult to test app startup.
I usually consider the main() function a reusable component.
Which, if called (at least optionally) with a list of string arguments (sys.argv) as Cameron suggested, makes it easy to test with various lists of strings.
-- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list