mirror of
https://github.com/python/cpython.git
synced 2024-11-30 21:34:17 +08:00
Let Python inform the user what went wrong with the import.
Modified Files: idle idle.py idle.pyw
This commit is contained in:
parent
415da6e0b2
commit
c626658a28
@ -7,7 +7,7 @@ except ImportError:
|
|||||||
try:
|
try:
|
||||||
import PyShell
|
import PyShell
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "Can't locate PyShell.py"
|
raise
|
||||||
else:
|
else:
|
||||||
import os
|
import os
|
||||||
idledir = os.path.dirname(os.path.abspath(PyShell.__file__))
|
idledir = os.path.dirname(os.path.abspath(PyShell.__file__))
|
||||||
|
@ -7,7 +7,7 @@ except ImportError:
|
|||||||
try:
|
try:
|
||||||
import PyShell
|
import PyShell
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "Can't locate PyShell.py"
|
raise
|
||||||
else:
|
else:
|
||||||
import os
|
import os
|
||||||
idledir = os.path.dirname(os.path.abspath(PyShell.__file__))
|
idledir = os.path.dirname(os.path.abspath(PyShell.__file__))
|
||||||
|
@ -5,7 +5,7 @@ except ImportError:
|
|||||||
try:
|
try:
|
||||||
import PyShell
|
import PyShell
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "Can't locate PyShell.py"
|
raise
|
||||||
else:
|
else:
|
||||||
import os
|
import os
|
||||||
idledir = os.path.dirname(os.path.abspath(PyShell.__file__))
|
idledir = os.path.dirname(os.path.abspath(PyShell.__file__))
|
||||||
|
Loading…
Reference in New Issue
Block a user