diff options
| author | Guido van Rossum <guido@python.org> | 1996-07-30 16:25:24 (GMT) |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1996-07-30 16:25:24 (GMT) |
| commit | 8ec318d43b7d3201fc3ac706f944b0f44d191ccb (patch) | |
| tree | a08a259c9f04901c6faf66e8ec502bd5aa5c04cb /Lib/importall.py | |
| parent | 42f707f40fd8b3ee8268087d6bc9f244abed7f25 (diff) | |
| download | cpython-8ec318d43b7d3201fc3ac706f944b0f44d191ccb.zip cpython-8ec318d43b7d3201fc3ac706f944b0f44d191ccb.tar.gz cpython-8ec318d43b7d3201fc3ac706f944b0f44d191ccb.tar.bz2 | |
Obsolete
Diffstat (limited to 'Lib/importall.py')
| -rwxr-xr-x | Lib/importall.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/Lib/importall.py b/Lib/importall.py deleted file mode 100755 index 780862c..0000000 --- a/Lib/importall.py +++ /dev/null @@ -1,36 +0,0 @@ -# THIS IS OBSOLETE -- USE MODULE 'compileall' INSTEAD! - -# Utility module to import all modules in the path, in the hope -# that this will update their ".pyc" files. - -import os -import sys - -# Sabotage 'gl' and 'stdwin' to prevent windows popping up... -for m in 'gl', 'stdwin', 'fl', 'fm': - sys.modules[m] = sys - -exceptions = ['importall'] - -for dir in sys.path: - print 'Listing', dir - try: - names = os.listdir(dir) - except os.error: - print 'Can\'t list', dir - names = [] - names.sort() - for name in names: - head, tail = name[:-3], name[-3:] - if tail == '.py' and head not in exceptions: - s = 'import ' + head - print s - try: - exec s + '\n' - except KeyboardInterrupt: - del names[:] - print '\n[interrupt]' - break - except: - print 'Sorry:', sys.exc_type + ':', - print sys.exc_value |
