Cosmetic changes; sabotage 'go' and 'stdwin'; New == syntax.
This commit is contained in:
parent
318a91c3f2
commit
d4e5a733b2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue