Sometimes I see relatively small application, generally task scripts, written as essentially a list of statements. Other times, I see them neatly divided into functions and then the "if __name__ == '__main__':" convention. Is there a preference? Is there an... application scope such that the preference shifts from the former to the latter? I understand the use of the __name__ == 'main' convention for building unit tests, but I'm mixed on using it in scripts/small applications.<div>
<br></div><div>Thanks for any thoughts!<br clear="all"><br>-- <br>Wells Oliver<br><a href="mailto:wells@submute.net">wells@submute.net</a><br>
</div>