Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
424a4159
Commit
424a4159
authored
Jun 15, 2003
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make CREDITS.txt a Latin-1 file. Extend ViewFile to support file encodings.
parent
04b9d479
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
Lib/idlelib/CREDITS.txt
Lib/idlelib/CREDITS.txt
+1
-1
Lib/idlelib/aboutDialog.py
Lib/idlelib/aboutDialog.py
+16
-3
No files found.
Lib/idlelib/CREDITS.txt
View file @
424a4159
...
...
@@ -22,7 +22,7 @@ Other contributors include Raymond Hettinger, Tony Lownds (Mac integration),
Neal Norwitz (code check and clean-up), and Chui Tey (RPC integration, debugger
integration and persistent breakpoints).
Hernan Foffani, Christos Georgiou, Martin v. L
oe
wis, Jason Orendorff, Noam
Hernan Foffani, Christos Georgiou, Martin v. L
ö
wis, Jason Orendorff, Noam
Raphael, Josh Robb, Nigel Rowe, and Bruce Sherwood have submitted useful
patches. Thanks, guys!
...
...
Lib/idlelib/aboutDialog.py
View file @
424a4159
...
...
@@ -118,7 +118,7 @@ class AboutDialog(Toplevel):
self
.
display_printer_text
(
credits
,
'About - Python Credits'
)
def
ShowIDLECredits
(
self
):
self
.
ViewFile
(
'About - Credits'
,
'CREDITS.txt'
)
self
.
ViewFile
(
'About - Credits'
,
'CREDITS.txt'
,
'iso-8859-1'
)
def
ShowIDLEAbout
(
self
):
self
.
ViewFile
(
'About - Readme'
,
'README.txt'
)
...
...
@@ -131,9 +131,22 @@ class AboutDialog(Toplevel):
data
=
'
\
n
'
.
join
(
printer
.
_Printer__lines
)
textView
.
TextViewer
(
self
,
title
,
None
,
data
)
def
ViewFile
(
self
,
viewTitle
,
viewFil
e
):
def
ViewFile
(
self
,
viewTitle
,
viewFile
,
encoding
=
Non
e
):
fn
=
os
.
path
.
join
(
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
)),
viewFile
)
textView
.
TextViewer
(
self
,
viewTitle
,
fn
)
if
encoding
:
import
codecs
try
:
textFile
=
codecs
.
open
(
fn
,
'r'
)
except
IOError
:
tkMessageBox
.
showerror
(
title
=
'File Load Error'
,
message
=
'Unable to load file '
+
`fileName`
+
' .'
)
return
else
:
data
=
textFile
.
read
()
else
:
data
=
None
textView
.
TextViewer
(
self
,
viewTitle
,
fn
,
data
=
data
)
def
Ok
(
self
,
event
=
None
):
self
.
destroy
()
...
...
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