[Tutor] Re: logic testing
Derrick 'dman' Hudson
Sat, 13 Jul 2002 00:24:10 -0500
Content-Type: text/plain; charset=us-ascii
On Thu, Jul 11, 2002 at 03:36:06PM -0400, Andrei Kulakov wrote:
| On Thu, Jul 11, 2002 at 10:55:18AM -0700, Baker.Michael wrote:
| > i'm working with a game engine and would like a way to test "game logic"
| > with python. the game engine runs as fast as it can - in the range of =
| > 100 frames per second. how can I make a python program that will run as=
| > as it can and still receive keyboard input?
| > i cannot make loops work because attempts to capture raw_input() stall =
| > loop.
| > i have not tried the cmd module - perhaps this will work????
| You can use threads - one thread captures user input, the other one
| shows stuff; you can also use select module but it's extremely
| confusing, to me at least.
If you want an example of select, let me know. It is really quite
simple, once you know what it is trying to do. (but don't look at the
manpage too closely, the C code is _much_ uglier than the Python code!)
Be sure of this: The wicked will not go unpunished,
but those who are righteous will go free.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
-----END PGP SIGNATURE-----