Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
5ef46ba6
Kaydet (Commit)
5ef46ba6
authored
Eyl 20, 2014
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #22420: Merge with 3.4
üst
004c00b7
81b062f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
PyShell.py
Lib/idlelib/PyShell.py
+5
-6
configHandler.py
Lib/idlelib/configHandler.py
+12
-12
No files found.
Lib/idlelib/PyShell.py
Dosyayı görüntüle @
5ef46ba6
...
@@ -21,7 +21,7 @@ from platform import python_version, system
...
@@ -21,7 +21,7 @@ from platform import python_version, system
try
:
try
:
from
tkinter
import
*
from
tkinter
import
*
except
ImportError
:
except
ImportError
:
print
(
"** IDLE can't import Tkinter.
"
\
print
(
"** IDLE can't import Tkinter.
\n
"
"Your Python may not be configured for Tk. **"
,
file
=
sys
.
__stderr__
)
"Your Python may not be configured for Tk. **"
,
file
=
sys
.
__stderr__
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
import
tkinter.messagebox
as
tkMessageBox
import
tkinter.messagebox
as
tkMessageBox
...
@@ -651,9 +651,9 @@ class ModifiedInterpreter(InteractiveInterpreter):
...
@@ -651,9 +651,9 @@ class ModifiedInterpreter(InteractiveInterpreter):
code
=
compile
(
source
,
filename
,
"exec"
)
code
=
compile
(
source
,
filename
,
"exec"
)
except
(
OverflowError
,
SyntaxError
):
except
(
OverflowError
,
SyntaxError
):
self
.
tkconsole
.
resetoutput
()
self
.
tkconsole
.
resetoutput
()
tkerr
=
self
.
tkconsole
.
stderr
print
(
'*** Error in script or command!
\n
'
print
(
'*** Error in script or command!
\n
'
,
file
=
tkerr
)
'Traceback (most recent call last):'
,
print
(
'Traceback (most recent call last):'
,
file
=
tk
err
)
file
=
self
.
tkconsole
.
std
err
)
InteractiveInterpreter
.
showsyntaxerror
(
self
,
filename
)
InteractiveInterpreter
.
showsyntaxerror
(
self
,
filename
)
self
.
tkconsole
.
showprompt
()
self
.
tkconsole
.
showprompt
()
else
:
else
:
...
@@ -1472,8 +1472,7 @@ def main():
...
@@ -1472,8 +1472,7 @@ def main():
try
:
try
:
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
"c:deihnr:st:"
)
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
"c:deihnr:st:"
)
except
getopt
.
error
as
msg
:
except
getopt
.
error
as
msg
:
sys
.
stderr
.
write
(
"Error:
%
s
\n
"
%
str
(
msg
))
print
(
"Error:
%
s
\n
%
s"
%
(
msg
,
usage_msg
),
file
=
sys
.
stderr
)
sys
.
stderr
.
write
(
usage_msg
)
sys
.
exit
(
2
)
sys
.
exit
(
2
)
for
o
,
a
in
opts
:
for
o
,
a
in
opts
:
if
o
==
'-c'
:
if
o
==
'-c'
:
...
...
Lib/idlelib/configHandler.py
Dosyayı görüntüle @
5ef46ba6
...
@@ -203,9 +203,9 @@ class IdleConf:
...
@@ -203,9 +203,9 @@ class IdleConf:
if
userDir
!=
'~'
:
# expanduser() found user home dir
if
userDir
!=
'~'
:
# expanduser() found user home dir
if
not
os
.
path
.
exists
(
userDir
):
if
not
os
.
path
.
exists
(
userDir
):
warn
=
(
'
\n
Warning: os.path.expanduser("~") points to
\n
'
+
warn
=
(
'
\n
Warning: os.path.expanduser("~") points to
\n
'
+
userDir
+
',
\n
but the path does not exist.
\n
'
)
userDir
+
',
\n
but the path does not exist.'
)
try
:
try
:
sys
.
stderr
.
write
(
warn
)
print
(
warn
,
file
=
sys
.
stderr
)
except
OSError
:
except
OSError
:
pass
pass
userDir
=
'~'
userDir
=
'~'
...
@@ -218,8 +218,8 @@ class IdleConf:
...
@@ -218,8 +218,8 @@ class IdleConf:
os
.
mkdir
(
userDir
)
os
.
mkdir
(
userDir
)
except
OSError
:
except
OSError
:
warn
=
(
'
\n
Warning: unable to create user config directory
\n
'
+
warn
=
(
'
\n
Warning: unable to create user config directory
\n
'
+
userDir
+
'
\n
Check path and permissions.
\n
Exiting!
\n
\n
'
)
userDir
+
'
\n
Check path and permissions.
\n
Exiting!
\n
'
)
sys
.
stderr
.
write
(
warn
)
print
(
warn
,
file
=
sys
.
stderr
)
raise
SystemExit
raise
SystemExit
return
userDir
return
userDir
...
@@ -244,12 +244,12 @@ class IdleConf:
...
@@ -244,12 +244,12 @@ class IdleConf:
except
ValueError
:
except
ValueError
:
warning
=
(
'
\n
Warning: configHandler.py - IdleConf.GetOption -
\n
'
warning
=
(
'
\n
Warning: configHandler.py - IdleConf.GetOption -
\n
'
' invalid
%
r value for configuration option
%
r
\n
'
' invalid
%
r value for configuration option
%
r
\n
'
' from section
%
r:
%
r
\n
'
%
' from section
%
r:
%
r'
%
(
type
,
option
,
section
,
(
type
,
option
,
section
,
self
.
userCfg
[
configType
]
.
Get
(
section
,
option
,
self
.
userCfg
[
configType
]
.
Get
(
section
,
option
,
raw
=
raw
)))
raw
=
raw
)))
try
:
try
:
sys
.
stderr
.
write
(
warning
)
print
(
warning
,
file
=
sys
.
stderr
)
except
OSError
:
except
OSError
:
pass
pass
try
:
try
:
...
@@ -263,10 +263,10 @@ class IdleConf:
...
@@ -263,10 +263,10 @@ class IdleConf:
warning
=
(
'
\n
Warning: configHandler.py - IdleConf.GetOption -
\n
'
warning
=
(
'
\n
Warning: configHandler.py - IdleConf.GetOption -
\n
'
' problem retrieving configuration option
%
r
\n
'
' problem retrieving configuration option
%
r
\n
'
' from section
%
r.
\n
'
' from section
%
r.
\n
'
' returning default value:
%
r
\n
'
%
' returning default value:
%
r'
%
(
option
,
section
,
default
))
(
option
,
section
,
default
))
try
:
try
:
sys
.
stderr
.
write
(
warning
)
print
(
warning
,
file
=
sys
.
stderr
)
except
OSError
:
except
OSError
:
pass
pass
return
default
return
default
...
@@ -375,10 +375,10 @@ class IdleConf:
...
@@ -375,10 +375,10 @@ class IdleConf:
warning
=
(
'
\n
Warning: configHandler.py - IdleConf.GetThemeDict'
warning
=
(
'
\n
Warning: configHandler.py - IdleConf.GetThemeDict'
' -
\n
problem retrieving theme element
%
r'
' -
\n
problem retrieving theme element
%
r'
'
\n
from theme
%
r.
\n
'
'
\n
from theme
%
r.
\n
'
' returning default value:
%
r
\n
'
%
' returning default value:
%
r'
%
(
element
,
themeName
,
theme
[
element
]))
(
element
,
themeName
,
theme
[
element
]))
try
:
try
:
sys
.
stderr
.
write
(
warning
)
print
(
warning
,
file
=
sys
.
stderr
)
except
OSError
:
except
OSError
:
pass
pass
colour
=
cfgParser
.
Get
(
themeName
,
element
,
default
=
theme
[
element
])
colour
=
cfgParser
.
Get
(
themeName
,
element
,
default
=
theme
[
element
])
...
@@ -635,10 +635,10 @@ class IdleConf:
...
@@ -635,10 +635,10 @@ class IdleConf:
warning
=
(
'
\n
Warning: configHandler.py - IdleConf.GetCoreKeys'
warning
=
(
'
\n
Warning: configHandler.py - IdleConf.GetCoreKeys'
' -
\n
problem retrieving key binding for event
%
r'
' -
\n
problem retrieving key binding for event
%
r'
'
\n
from key set
%
r.
\n
'
'
\n
from key set
%
r.
\n
'
' returning default value:
%
r
\n
'
%
' returning default value:
%
r'
%
(
event
,
keySetName
,
keyBindings
[
event
]))
(
event
,
keySetName
,
keyBindings
[
event
]))
try
:
try
:
sys
.
stderr
.
write
(
warning
)
print
(
warning
,
file
=
sys
.
stderr
)
except
OSError
:
except
OSError
:
pass
pass
return
keyBindings
return
keyBindings
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment