Improve exception handling.

This commit is contained in:
Kurt B. Kaiser 2003-01-02 17:09:34 +00:00
parent 9c2fbb5619
commit e23ca3c35a
3 changed files with 6 additions and 3 deletions

View File

@ -2,8 +2,9 @@
try: try:
import idlelib.PyShell import idlelib.PyShell
idlelib.PyShell.main()
except ImportError: except ImportError:
# IDLE is not installed, but maybe PyShell is on sys.path: # IDLE is not installed, but maybe PyShell is on sys.path:
import PyShell import PyShell
PyShell.main() PyShell.main()
else:
idlelib.PyShell.main()

View File

@ -2,8 +2,9 @@
try: try:
import idlelib.PyShell import idlelib.PyShell
idlelib.PyShell.main()
except ImportError: except ImportError:
# IDLE is not installed, but maybe PyShell is on sys.path: # IDLE is not installed, but maybe PyShell is on sys.path:
import PyShell import PyShell
PyShell.main() PyShell.main()
else:
idlelib.PyShell.main()

View File

@ -2,8 +2,9 @@
try: try:
import idlelib.PyShell import idlelib.PyShell
idlelib.PyShell.main()
except ImportError: except ImportError:
# IDLE is not installed, but maybe PyShell is on sys.path: # IDLE is not installed, but maybe PyShell is on sys.path:
import PyShell import PyShell
PyShell.main() PyShell.main()
else:
idlelib.PyShell.main()