Brett Cannon <bac@OCF.Berkeley.EDU> writes: > > I don't propose to automate this. I propose this: > > > > try: > > import threading > > except ImportError: > > import dummy_threading as threading > > > > So is this an indirect request for me to write ``dumy_threading``? I would suggest to make this import dummy_thread as threading i.e. have dummy_thread expose the union of the thread and threading APIs. > If it is it won't be hard: I would do an ``import *`` on > ``threading`` That wont't work: "from threading import *" will raise an ImportError. I suggest to add dummy_thread to sys.modules, then execfile threading.py in dummy_thread, then remove it from sys.modules. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4