From: Arthur <ajs...@op...> - 2006-11-04 14:34:26
|
Hi folks - Bruce is tied up, I know, trying to get his book to the publisher and will not get to looking to what I am proposing re: numpy compatibility until he gets that behind him. In the meantime --- A side effect of getting myself involved in that process was getting a more serious look at Vpython4.0 beta, which I had been avoiding because of the known bugs. And one look at the lighting_and_texture.py does get one excited. The mouse.getclick() issue - which I first saw manifested in running the dipole.py demo - seems the only deal killer bug. So I have taken a shot at it. After gaining what - given my C++ (lack of) expertise - is only a vague understanding of what is going on in the relevant code, I took a shot - just changing line 185 of the mouseobject.cpp from: shared_ptr<event> ret = events.py_pop(); to shared_ptr<event> ret = events.pop(); which has the effect - in the context of the code - of short-circuiting the running of code that involves the direct manipulation of the Python gil (global interpreter lock) when processing the return value from a mouseclick. And - lo and behold - from the best I can presently determine, the mouse.getclick() crash issues go away. Problem is that I suspect Jonathan had his reasons for doing his Python gil thing, and I cannot determine what unwanted side effects this change might have, e.g. on platforms other than windows. Jonathan is probably the only person in a position to comment here. You there, Jonathan? Art |