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
94338de4
Commit
94338de4
authored
Jan 23, 2014
by
Terry Jan Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #17390: Add Python version to Idle editor window title bar.
Original patches by Edmond Burnett and Kent Johnson.
parent
09761e7c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
Lib/idlelib/EditorWindow.py
Lib/idlelib/EditorWindow.py
+5
-1
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/idlelib/EditorWindow.py
View file @
94338de4
import
importlib
import
importlib.abc
import
os
from
platform
import
python_version
import
re
import
string
import
sys
...
...
@@ -955,11 +956,14 @@ class EditorWindow(object):
self
.
undo
.
reset_undo
()
def
short_title
(
self
):
pyversion
=
"Python "
+
python_version
()
+
": "
filename
=
self
.
io
.
filename
if
filename
:
filename
=
os
.
path
.
basename
(
filename
)
else
:
filename
=
"Untitled"
# return unicode string to display non-ASCII chars correctly
return
self
.
_filename_to_unicode
(
filename
)
return
pyversion
+
self
.
_filename_to_unicode
(
filename
)
def
long_title
(
self
):
# return unicode string to display non-ASCII chars correctly
...
...
Misc/NEWS
View file @
94338de4
...
...
@@ -274,6 +274,9 @@ Library
IDLE
----
--Issue #17390: Add Python version to Idle editor window title bar.
Original patches by Edmond Burnett and Kent Johnson.
- Issue #18960: IDLE now ignores the source encoding declaration on the second
line if the first line contains anything except a comment.
...
...
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