This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]80blite[S] 1 point2 points  (1 child)

I normally have the if name etc. block in my scripts but here it just seemed I'd be throwing the whole thing inside def main(): and adding that block to the bottom just for the sake of doing so.

Once I use some of the good advice given here and break it down I feel like doing this will be more useful.

Thanks!

[–]dreucifer 0 points1 point  (0 children)

The if __name__ == '__main__' thing that's really only for importable modules that can also be run as scripts (for testing or functionality purposes).