mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Improve exception handling.
This commit is contained in:
parent
9c2fbb5619
commit
e23ca3c35a
3 changed files with 6 additions and 3 deletions
|
@ -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()
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue