Take a look at this:
Python Library Reference
Contents
Module Index
Index
Previous:
26.2 __builtin__
Up:
26. Python Runtime Services
Next:
26.4 warnings
26.3
__main__
-- Top-level script environment
This module represents the (otherwise anonymous) scope in which the
interpreter's
main program executes -- commands read either from standard input, from a script
file, or from an interactive prompt. It is this environment in which the
idiomatic
``conditional script'' stanza causes a script to run:
if __name__ == "__main__":
main()
Previous Page
Up one Level
Next Page
Python Library Reference
Contents
Module Index
Index
Previous:
26.2 __builtin__
Up:
26. Python Runtime Services
Next:
26.4 warnings
Release 2.5, documentation updated on 19th September, 2006.
See
About this document...
for information on suggesting changes.
----- Original Message -----
From: Eric Hunter
To: [email protected]
Sent: Thursday, October 25, 2007 12:25 AM
Subject: [pygame] the game.Mainloop() myth
okay so I'm trying to use the .Mainloop() and am getting an error.
[error]
GameLoop instance has no attribute 'MainLoop'
[/error]
and the code is
[code]
if __name__ == "__main__":
gameloop = GameLoop()
gameloop.Mainloop()
[/code]
is the Mainloop() just a myth or does it really work? do I need to import a
certain function or something?
thanks in advance,
-Eric
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.15.10/1091 - Release Date: 10/24/2007
2:31 PM