summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/IOBinding.py
diff options
context:
space:
mode:
authorSteven M. Gava <elguavas@python.net>2002-03-27 08:40:46 (GMT)
committerSteven M. Gava <elguavas@python.net>2002-03-27 08:40:46 (GMT)
commit1d46e40f58b21dd6c30e21a841d65e9bcbc899b1 (patch)
tree15895f64f770b2e8d4cc55896f5e6e3ae7f66069 /Lib/idlelib/IOBinding.py
parent03594bbb0ee94dd4b58b664b42448855df6af066 (diff)
downloadcpython-1d46e40f58b21dd6c30e21a841d65e9bcbc899b1.zip
cpython-1d46e40f58b21dd6c30e21a841d65e9bcbc899b1.tar.gz
cpython-1d46e40f58b21dd6c30e21a841d65e9bcbc899b1.tar.bz2
further work on new config system;
recent files menu
Diffstat (limited to 'Lib/idlelib/IOBinding.py')
-rw-r--r--Lib/idlelib/IOBinding.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py
index 4875d11..17c196d 100644
--- a/Lib/idlelib/IOBinding.py
+++ b/Lib/idlelib/IOBinding.py
@@ -72,9 +72,12 @@ class IOBinding:
if self.filename_change_hook:
self.filename_change_hook()
- def open(self, event):
+ def open(self, event=None, editFile=None):
if self.editwin.flist:
- filename = self.askopenfile()
+ if not editFile:
+ filename = self.askopenfile()
+ else:
+ filename=editFile
if filename:
# if the current window has no filename and hasn't been
# modified, we replace it's contents (no loss). Otherwise
@@ -93,7 +96,10 @@ class IOBinding:
if reply == "cancel":
self.text.focus_set()
return "break"
- filename = self.askopenfile()
+ if not editFile:
+ filename = self.askopenfile()
+ else:
+ filename=editFile
if filename:
self.loadfile(filename)
else: