Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Lib/idlelib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ def CreateConfigHandlers(self):
"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 = {}
Expand Down
4 changes: 2 additions & 2 deletions Lib/idlelib/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def __init__(self, flist=None, filename=None, key=None, root=None):
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',
Expand Down
4 changes: 2 additions & 2 deletions Lib/idlelib/pyshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def __init__(self, *args):
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):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IDLE: call config.IdleConf.GetUserCfgDir only once.