Kaydet (Commit) 7cca3d8e authored tarafından Kurt B. Kaiser's avatar Kurt B. Kaiser

Improve exception handling.

üst 13af1142
#! /usr/bin/env python #!/usr/bin/python
try: try:
import idlelib.PyShell import idlelib.PyShell
idlelib.PyShell.main() idlelib.PyShell.main()
except: 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()
#! /usr/bin/env python #!/usr/bin/python
try: try:
import idlelib.PyShell import idlelib.PyShell
idlelib.PyShell.main() idlelib.PyShell.main()
except: 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()
#! /usr/bin/env python #!/usr/bin/python
try: try:
import idlelib.PyShell import idlelib.PyShell
idlelib.PyShell.main() idlelib.PyShell.main()
except: 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()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment