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
223c7e70
Commit
223c7e70
authored
Jul 07, 2017
by
terryjreedy
Committed by
GitHub
Jul 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (#2629)
parent
24f2e19d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
Lib/idlelib/config.py
Lib/idlelib/config.py
+3
-3
Lib/idlelib/editor.py
Lib/idlelib/editor.py
+2
-2
Lib/idlelib/pyshell.py
Lib/idlelib/pyshell.py
+2
-2
Misc/NEWS.d/next/IDLE/2017-07-07-21-10-55.bpo-8231.yEge3L.rst
.../NEWS.d/next/IDLE/2017-07-07-21-10-55.bpo-8231.yEge3L.rst
+1
-0
No files found.
Lib/idlelib/config.py
View file @
223c7e70
...
...
@@ -172,10 +172,10 @@ class IdleConf:
"Populate default and user config parser dictionaries."
#build idle install path
if
__name__
!=
'__main__'
:
# we were imported
idleDir
=
os
.
path
.
dirname
(
__file__
)
idleDir
=
os
.
path
.
dirname
(
__file__
)
else
:
# we were exec'ed (for testing only)
idleDir
=
os
.
path
.
abspath
(
sys
.
path
[
0
])
userDir
=
self
.
GetUserCfgDir
()
idleDir
=
os
.
path
.
abspath
(
sys
.
path
[
0
])
self
.
userdir
=
userDir
=
self
.
GetUserCfgDir
()
defCfgFiles
=
{}
usrCfgFiles
=
{}
...
...
Lib/idlelib/editor.py
View file @
223c7e70
...
...
@@ -103,8 +103,8 @@ class EditorWindow(object):
self
.
tkinter_vars
=
{}
# keys: Tkinter event names
# values: Tkinter variable instances
self
.
top
.
instance_dict
=
{}
self
.
recent_files_path
=
os
.
path
.
join
(
idleConf
.
GetUserCfgDir
(),
'recent-files.lst'
)
self
.
recent_files_path
=
os
.
path
.
join
(
idleConf
.
userdir
,
'recent-files.lst'
)
self
.
text_frame
=
text_frame
=
Frame
(
top
)
self
.
vbar
=
vbar
=
Scrollbar
(
text_frame
,
name
=
'vbar'
)
self
.
width
=
idleConf
.
GetOption
(
'main'
,
'EditorWindow'
,
...
...
Lib/idlelib/pyshell.py
View file @
223c7e70
...
...
@@ -117,8 +117,8 @@ class PyShellEditorWindow(EditorWindow):
self
.
text
.
bind
(
"<<clear-breakpoint-here>>"
,
self
.
clear_breakpoint_here
)
self
.
text
.
bind
(
"<<open-python-shell>>"
,
self
.
flist
.
open_shell
)
self
.
breakpointPath
=
os
.
path
.
join
(
idleConf
.
GetUserCfgDir
(),
'breakpoints.lst'
)
self
.
breakpointPath
=
os
.
path
.
join
(
idleConf
.
userdir
,
'breakpoints.lst'
)
# whenever a file is changed, restore breakpoints
def
filename_changed_hook
(
old_hook
=
self
.
io
.
filename_change_hook
,
self
=
self
):
...
...
Misc/NEWS.d/next/IDLE/2017-07-07-21-10-55.bpo-8231.yEge3L.rst
0 → 100644
View file @
223c7e70
IDLE: call config.IdleConf.GetUserCfgDir only once.
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