From: Pete S. <pe...@sh...> - 2000-10-08 18:20:30
|
> Ray wrote: > I know there was an patch for 1.5.2 (called "microthreading" I think) > to improve the granularity of the threading in python. It's possible > that 2.0 has incorporated that patch. this is with the stackless python patch. this is not incorporated into the 2.0, yet. http://www.stackless.com i've never used it, but reports were you could get over 1000 microthreads running easy. the way it works, the python interpreter becomes the actual thread timeslice controller. because of 'stackless' and 'continuations' the overhead is extremely low. the problem with this implementation, there is still only one real system thread running. a call to a c extension that doesn't return quickly will stall out the other microthreads. i'd say this isn't going to do a lot for python with sdl. > Jan Wrote > By the way, does anyone know of a good way to get PySDL > key-events translated so that I can get a string/character > with the pressed key? jan, take a look at the SDL_console library. this is doing it somehow with SDL code. if you find there is an SDL way of doing this that isn't available in pySDL, let me know. (i think i remember it's something to do with UNICODE_enable??) also, if there is no easy way to do it, can you post your lookup table? this would be a good thing to incorporate into pysdl. best to use sdl if there is a way, but worthwhile to add our own. |