]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Cosmetic changes; sabotage 'go' and 'stdwin'; New == syntax.
authorGuido van Rossum <guido@python.org>
Wed, 1 Jan 1992 19:30:14 +0000 (19:30 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 1 Jan 1992 19:30:14 +0000 (19:30 +0000)
Lib/importall.py

index 57e6821306aef577e44ae976894485e3d248f0fd..469e9c6845cc8bf1bfeaed1ca9c21b8b160c0785 100755 (executable)
@@ -14,6 +14,10 @@ except ImportError:
 
 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:
@@ -26,10 +30,15 @@ for dir in sys.path:
        names.sort()
        for name in names:
                head, tail = name[:-3], name[-3:]
-               if tail = '.py' and head not in exceptions:
+               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, sys.exc_value
+                               print 'Sorry:', sys.exc_type + ':',
+                               print sys.exc_value