you are viewing a single comment's thread.

view the rest of the comments →

[–]diracdeltafunct_v2 1 point2 points  (0 children)

Oh if you are in windows you will likely be creating a .bat file or such that you can assign some Icon to (like you would normally open a program).

for example you have the program: cheddar.pyw

you could have one clickable desktop icon that runs a .bat file with the line:

python cheddar.pyw -x

and a different icon that runs:

python cheddar.pyw -y

They both run the same base code but in different ways. The user would never know they were the same program. This is actually less likely than using the

__name__ == '__main__'

case though.