Am Montag, den 12.12.2005, 10:08 -0600 schrieb tsuraan: > > One idea is to overwrite the names, early in the execution of your > > program: > > > > import threading, PyLucene > > threading.Thread = PyLucene.PythonThread > > I wasn't even aware that python let you overwrite functions/classes > defined in external packages. I'll give that a try. Thanks!
Well, there are some caveats: a) you have to do it as early as possible. from threading import Thread statements copy a reference to Thread into the local namespace. If you change the threading.Thread reference after that these local reference copies refer still to the old one. b) Sometimes, there might be C-level ways to access objects, and these might not do it the Python way. c) There is a lowlevel Python threading module. These functions are not redirected by the hack above. .... So there is a number of things to consider :( Andreas
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ pylucene-dev mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
