source: trunk/essentials/dev-lang/python/Lib/dummy_threading.py@ 3298

Last change on this file since 3298 was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 2.8 KB
Line 
1"""Faux ``threading`` version using ``dummy_thread`` instead of ``thread``.
2
3The module ``_dummy_threading`` is added to ``sys.modules`` in order
4to not have ``threading`` considered imported. Had ``threading`` been
5directly imported it would have made all subsequent imports succeed
6regardless of whether ``thread`` was available which is not desired.
7
8:Author: Brett Cannon
9:Contact: [email protected]
10
11XXX: Try to get rid of ``_dummy_threading``.
12
13"""
14from sys import modules as sys_modules
15
16import dummy_thread
17
18# Declaring now so as to not have to nest ``try``s to get proper clean-up.