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
82c4615b
Kaydet (Commit)
82c4615b
authored
Haz 22, 2016
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #27365: add chunk
üst
df1d34c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
textView.py
Lib/idlelib/textView.py
+9
-5
No files found.
Lib/idlelib/textView.py
Dosyayı görüntüle @
82c4615b
...
...
@@ -4,7 +4,7 @@
from
tkinter
import
*
from
tkinter.ttk
import
Scrollbar
import
tkinter.messagebox
as
tkMessageBox
from
tkinter.messagebox
import
showerror
class
TextViewer
(
Toplevel
):
"""A simple text viewer dialog for IDLE
...
...
@@ -73,10 +73,14 @@ def view_file(parent, title, filename, encoding=None, modal=True):
try
:
with
open
(
filename
,
'r'
,
encoding
=
encoding
)
as
file
:
contents
=
file
.
read
()
except
IOError
:
tkMessageBox
.
showerror
(
title
=
'File Load Error'
,
message
=
'Unable to load file
%
r .'
%
filename
,
parent
=
parent
)
except
OSError
:
showerror
(
title
=
'File Load Error'
,
message
=
'Unable to load file
%
r .'
%
filename
,
parent
=
parent
)
except
UnicodeDecodeError
as
err
:
showerror
(
title
=
'Unicode Decode Error'
,
message
=
str
(
err
),
parent
=
parent
)
else
:
return
view_text
(
parent
,
title
,
contents
,
modal
)
...
...
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