[Tutor] if __name__=='__main__' test

Bruce Gollng Bruce Gollng" <bwgolling@attbi.com
Thu, 7 Mar 2002 16:43:10 -0000


This is a multi-part message in MIME format.

------=_NextPart_000_003B_01C1C5F7.2ADCEC40
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Help please.  I've been studying several books and online tutorials and =
have been consistently stumped with the  ..  if __name__ =3D=3D =
'__main__': test.  No matter when I check __name__ always eq __main__.  =
So why is this a programming benefit?
tks
Bruce Golling (bwgolling@attbi.com)


------=_NextPart_000_003B_01C1C5F7.2ADCEC40
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4807.2300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV><FONT face=3DArial size=3D2>Help please.&nbsp; I've been studying =
several books=20
and online tutorials and have been consistently stumped with=20
the&nbsp;&nbsp;..&nbsp; if __name__ =3D=3D '__main__': test.&nbsp; No =
matter when I=20
check __name__ always eq __main__.&nbsp; So why is this a programming=20
benefit?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>tks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Bruce Golling (<A=20
href=3D"mailto:bwgolling@attbi.com">bwgolling@attbi.com</A>)</FONT></DIV>=

<DIV>&nbsp;</DIV></DIV></BODY></HTML>

------=_NextPart_000_003B_01C1C5F7.2ADCEC40--