Mar-15-2017, 09:08 PM
Assume the program requires having:
... Task-1: One GUI window to do something.
... Task-2: A second GUI window to do something else.
... Task-3: Code to do something.
A. Would you open a new .py file for each task to get them working. Then create a master .py file and import the three tasks as functions (or classes).
B. Or just open a master .py file and code tasks 1, 2 and 3? Using functions or classes is not the real question. Whether coding all in one .py file as task-1, then task-2, then task-3 is the question.
Being new to Python and coding my first program, I'm in the process of doing it as step-A above to make it easier (and less cluttered) to code each task separately. But I'm wondering if experienced Python programmers do it as in Step-B.
So how do you do it?
... Task-1: One GUI window to do something.
... Task-2: A second GUI window to do something else.
... Task-3: Code to do something.
A. Would you open a new .py file for each task to get them working. Then create a master .py file and import the three tasks as functions (or classes).
B. Or just open a master .py file and code tasks 1, 2 and 3? Using functions or classes is not the real question. Whether coding all in one .py file as task-1, then task-2, then task-3 is the question.
Being new to Python and coding my first program, I'm in the process of doing it as step-A above to make it easier (and less cluttered) to code each task separately. But I'm wondering if experienced Python programmers do it as in Step-B.
So how do you do it?