From elguavas@users.sourceforge.net Fri Mar 1 00:45:52 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: 01 Mar 2002 11:45:52 +1100 Subject: [Idle-dev] tabs in a tk Text widget Message-ID: <1014943552.4126.13.camel@oberon> The following comment is in idle in Autoindent.py: # CAUTION: telling Tk to use anything other than its default # tab setting causes it to use an entirely different tabbing algorithm, # treating tab stops as fixed distances from the left margin. # Nobody expects this, so for now tabwidth should never be changed. and this line too: tabwidth = 8 # for IDLE use, must remain 8 until Tk is fixed also, st the top of EditorWindow.py is this line: TK_TABWIDTH_DEFAULT = 8 . Does anyone reading this list know if this is stil a problem in Tk? If it is I will remove the stuff from configDialog.py where I was going to allow the user to specify a default tab width. (Varying the number of spaces for indenting by space is still fine of course, and will still be configurable.) Stephen. -- Stephen M. Gava IDLEfork ( http://idlefork.sourceforge.net ) " just like IDLE, only crunchy " From elguavas@users.sourceforge.net Sat Mar 2 07:12:56 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Fri, 01 Mar 2002 23:12:56 -0800 Subject: [Idle-dev] CVS: idle configDialog.py,1.37,1.38 configHandler.py,1.21,1.22 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv7145 Modified Files: configDialog.py configHandler.py Log Message: First work on making config changes dynamic, dynamic theme changes Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** configDialog.py 18 Feb 2002 01:42:08 -0000 1.37 --- configDialog.py 2 Mar 2002 07:12:53 -0000 1.38 *************** *** 24,29 **** #The first value of the tuple is the sample area tag name. #The second value is the display name list sort index. - #The third value indicates whether the element can have a foreground - #or background colour or both. self.themeElements={'Normal Text':('normal','00'), 'Python Keywords':('keyword','01'), --- 24,27 ---- *************** *** 181,186 **** #frameCustom self.textHighlightSample=Text(frameCustom,relief=SOLID,borderwidth=1, ! font=('courier',12,''),cursor='hand2',width=10,height=10, ! takefocus=FALSE,highlightthickness=0) text=self.textHighlightSample text.bind('',lambda e: 'break') --- 179,184 ---- #frameCustom self.textHighlightSample=Text(frameCustom,relief=SOLID,borderwidth=1, ! font=('courier',12,''),cursor='hand2',width=21,height=10, ! takefocus=FALSE,highlightthickness=0,wrap=NONE) text=self.textHighlightSample text.bind('',lambda e: 'break') *************** *** 515,519 **** def ResetChangedItems(self): ! #changedItems. When any config item is changed in this dialog, an entry #should be made in the relevant section (config type) of this #dictionary. The key should be the config file section name and the --- 513,517 ---- def ResetChangedItems(self): ! #When any config item is changed in this dialog, an entry #should be made in the relevant section (config type) of this #dictionary. The key should be the config file section name and the *************** *** 1087,1091 **** #things that need to be done to make #applied config changes dynamic: - # #update editor/shell font and repaint #dynamically update indentation setttings --- 1085,1088 ---- *************** *** 1093,1098 **** #update keybindings and re-bind #update user help sources menu ! pass ! def Cancel(self): self.destroy() --- 1090,1097 ---- #update keybindings and re-bind #update user help sources menu ! winInstances=self.parent.instanceDict.keys() ! for instance in winInstances: ! instance.ResetColorizer() ! def Cancel(self): self.destroy() Index: configHandler.py =================================================================== RCS file: /cvsroot/idlefork/idle/configHandler.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** configHandler.py 18 Feb 2002 01:43:11 -0000 1.21 --- configHandler.py 2 Mar 2002 07:12:54 -0000 1.22 *************** *** 111,114 **** --- 111,121 ---- return 1 + def RemoveFile(self): + """ + Removes the user config file from disk if it exists. + """ + if os.path.exists(self.file): + os.remove(self.file) + def Save(self): """ *************** *** 120,125 **** self.write(cfgFile) else: ! if os.path.exists(self.file): ! os.remove(self.file) class IdleConf: --- 127,131 ---- self.write(cfgFile) else: ! self.RemoveFile() class IdleConf: From elguavas@users.sourceforge.net Sat Mar 2 07:14:16 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Fri, 01 Mar 2002 23:14:16 -0800 Subject: [Idle-dev] CVS: idle ColorDelegator.py,1.6,1.7 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv7340 Modified Files: ColorDelegator.py Log Message: First work on making config changes dynamic, dynamic theme changes Index: ColorDelegator.py =================================================================== RCS file: /cvsroot/idlefork/idle/ColorDelegator.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** ColorDelegator.py 4 Jan 2002 07:53:06 -0000 1.6 --- ColorDelegator.py 2 Mar 2002 07:14:14 -0000 1.7 *************** *** 38,41 **** --- 38,42 ---- self.idprog = idprog self.asprog = asprog + self.LoadTagDefs() def setdelegate(self, delegate): *************** *** 53,71 **** apply(self.tag_configure, (tag,), cnf) self.tag_raise('sel') - - theme = idleConf.GetOption('main','Theme','name') - - tagdefs = { - "COMMENT": idleConf.GetHighlight(theme, "comment"), - "KEYWORD": idleConf.GetHighlight(theme, "keyword"), - "STRING": idleConf.GetHighlight(theme, "string"), - "DEFINITION": idleConf.GetHighlight(theme, "definition"), - "SYNC": {'background':None,'foreground':None}, - "TODO": {'background':None,'foreground':None}, - "BREAK": idleConf.GetHighlight(theme, "break"), - # The following is used by ReplaceDialog: - "hit": idleConf.GetHighlight(theme, "hit"), - } if DEBUG: print 'tagdefs',tagdefs --- 54,72 ---- apply(self.tag_configure, (tag,), cnf) self.tag_raise('sel') + def LoadTagDefs(self): + theme = idleConf.GetOption('main','Theme','name') + self.tagdefs = { + "COMMENT": idleConf.GetHighlight(theme, "comment"), + "KEYWORD": idleConf.GetHighlight(theme, "keyword"), + "STRING": idleConf.GetHighlight(theme, "string"), + "DEFINITION": idleConf.GetHighlight(theme, "definition"), + "SYNC": {'background':None,'foreground':None}, + "TODO": {'background':None,'foreground':None}, + "BREAK": idleConf.GetHighlight(theme, "break"), + # The following is used by ReplaceDialog: + "hit": idleConf.GetHighlight(theme, "hit"), + } + if DEBUG: print 'tagdefs',tagdefs From elguavas@users.sourceforge.net Sat Mar 2 07:16:23 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Fri, 01 Mar 2002 23:16:23 -0800 Subject: [Idle-dev] CVS: idle PyShell.py,1.11,1.12 EditorWindow.py,1.17,1.18 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv7599 Modified Files: PyShell.py EditorWindow.py Log Message: First work on making config changes dynamic, dynamic theme changes Index: PyShell.py =================================================================== RCS file: /cvsroot/idlefork/idle/PyShell.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** PyShell.py 4 Jan 2002 07:53:06 -0000 1.11 --- PyShell.py 2 Mar 2002 07:16:21 -0000 1.12 *************** *** 135,138 **** --- 135,142 ---- # Colorizer for the shell window itself + + def __init__(self): + ColorDelegator.__init__(self) + self.LoadTagDefs() def recolorize_main(self): *************** *** 140,155 **** self.tag_add("SYNC", "1.0", "iomark") ColorDelegator.recolorize_main(self) ! ! tagdefs = ColorDelegator.tagdefs.copy() ! theme = idleConf.GetOption('main','Theme','name') ! ! tagdefs.update({ ! "stdin": {'background':None,'foreground':None}, ! "stdout": idleConf.GetHighlight(theme, "stdout"), ! "stderr": idleConf.GetHighlight(theme, "stderr"), ! "console": idleConf.GetHighlight(theme, "console"), ! "ERROR": idleConf.GetHighlight(theme, "error"), ! None: idleConf.GetHighlight(theme, "normal"), ! }) class ModifiedUndoDelegator(UndoDelegator): --- 144,159 ---- self.tag_add("SYNC", "1.0", "iomark") ColorDelegator.recolorize_main(self) ! ! def LoadTagDefs(self): ! ColorDelegator.LoadTagDefs(self) ! theme = idleConf.GetOption('main','Theme','name') ! self.tagdefs.update({ ! "stdin": {'background':None,'foreground':None}, ! "stdout": idleConf.GetHighlight(theme, "stdout"), ! "stderr": idleConf.GetHighlight(theme, "stderr"), ! "console": idleConf.GetHighlight(theme, "console"), ! "ERROR": idleConf.GetHighlight(theme, "error"), ! None: idleConf.GetHighlight(theme, "normal"), ! }) class ModifiedUndoDelegator(UndoDelegator): Index: EditorWindow.py =================================================================== RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** EditorWindow.py 26 Feb 2002 02:31:03 -0000 1.17 --- EditorWindow.py 2 Mar 2002 07:16:21 -0000 1.18 *************** *** 103,106 **** --- 103,109 ---- self.menubar = Menu(root) self.top = top = self.Toplevel(root, menu=self.menubar) + #self.top.instanceDict makes flist.inversedict avalable to + #configDialog.py so it can access all EditorWindow instaces + self.top.instanceDict=flist.inversedict self.vbar = vbar = Scrollbar(top, name='vbar') self.text_frame = text_frame = Frame(top) *************** *** 468,471 **** --- 471,481 ---- self.color = None self.per.insertfilter(self.undo) + + def ResetColorizer(self): + #this function is called from configDialog.py + #to update the colour theme if it is changed + if self.color: + self.color = self.ColorDelegator() + self.per.insertfilter(self.color) def saved_change_hook(self): From mc.liebmann@t-online.de Sat Mar 2 19:06:43 2002 From: mc.liebmann@t-online.de (martin) Date: Sat, 2 Mar 2002 20:06:43 +0100 Subject: [Idle-dev] IDLE extension Message-ID: <000901c1c21d$6502b180$0100a8c0@dialin.tonline.de> This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C1C225.C63009A0 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0006_01C1C225.C63009A0" ------=_NextPart_001_0006_01C1C225.C63009A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, the attached files implement a (quick and dirty but useful) extension to = IDLE 0.8 (Python 2.2). Similar to "CallTips" this extension shows member functions and = attributes after hitting a "." The toplevel help window supports scrolling (up- and down-Keys). The = 'space'-key is used to insert the topmost item into the IDLE text window. Martin ------=_NextPart_001_0006_01C1C225.C63009A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
the attached files implement a (quick = and dirty but=20 useful) extension to IDLE 0.8 (Python 2.2).
 
Similar to "CallTips" this extension = shows member=20 functions and attributes after hitting a "."
The toplevel help window supports = scrolling (up-=20 and down-Keys). The 'space'-key is used to
insert the topmost item into the = IDLE text=20 window.
 
Martin
------=_NextPart_001_0006_01C1C225.C63009A0-- ------=_NextPart_000_0005_01C1C225.C63009A0 Content-Type: text/plain; name="CallTips.py" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="CallTips.py" # CallTips.py - An IDLE extension that provides "Call Tips" - ie, a = floating window that # displays parameter information as you open parens. import string import sys import types import inspect class CallTips: menudefs =3D [ ] keydefs =3D { '<>': [''], '<>': [''], '<>': ['', ''], =20 '<>': [''], '<>': [''], '<>': [''], '<>': [''], '<>': [''], } windows_keydefs =3D { } unix_keydefs =3D { } def __init__(self, editwin): self.editwin =3D editwin self.text =3D editwin.text self.calltip =3D None =20 self.line =3D 0 self.member =3D None self.members =3D [] self.sub_members =3D [] self.word =3D "" self.wordchars =3D string.replace(string.printable, '.', '') self.pattern =3D "" =20 if hasattr(self.text, "make_calltip_window"): self._make_calltip_window =3D self.text.make_calltip_window else: self._make_calltip_window =3D self._make_tk_calltip_window def close(self): self._make_calltip_window =3D None # Makes a Tk based calltip window. Used by IDLE, but not Pythonwin. # See __init__ above for how this is used. def _make_tk_calltip_window(self): import CallTipWindow return CallTipWindow.CallTip(self.text) def _remove_calltip_window(self): if self.calltip: self.calltip.hidetip() self.calltip =3D None def paren_open_event(self, event): self.member =3D None self._remove_calltip_window() arg_text =3D get_arg_text(self.get_object_at_cursor()) if arg_text: self.calltip_start =3D self.text.index("insert+1c") self.calltip =3D self._make_calltip_window() list =3D [] list.append(arg_text) self.calltip.showtip(list) return "" #so the event is handled normally. def paren_close_event(self, event): # Now just hides, but later we should check if other # paren'd expressions remain open. self._remove_calltip_window() return "" #so the event is handled normally. def _dir_main(self,obj): "Execute dir(obj) within namespace __main__" from __main__ import * return dir(obj) =20 def dot_check_event(self, event): self._remove_calltip_window() obj =3D self.get_object_at_cursor() =20 if obj: =20 =20 names =3D self._dir_main(obj) names.sort() self.member =3D 'true' self.members =3D [] self.word =3D "" self.line =3D 0 for name in names: if (string.find(name,"__",0) =3D=3D 0): pass else: subobj =3D getattr(obj, name) =20 if inspect.isclass(subobj): self.members.append(name + "(...)") elif inspect.isfunction(subobj): = =20 self.members.append(name + "(...)") elif inspect.ismethod(subobj): self.members.append(name + "(...)") elif inspect.ismodule(subobj): pass elif inspect.isroutine(subobj): self.members.append(name + "(...)") else: self.members.append(name) =20 if self.members: self.calltip_start =3D self.text.index("insert+1c") self.calltip =3D self._make_calltip_window() self.sub_members =3D self.members self.calltip.showtip(self.members,1) return "" #so the event is handled normally. =20 =20 def check_key_event(self, event): if not self.member: return "" =20 if self.calltip: if event.keysym =3D=3D 'space': self._remove_calltip_window() =20 if self.sub_members: first =3D len(self.word) last =3D string.rfind(self.sub_members[self.line], = "(") if last < 0: last =3D len(self.sub_members[self.line]) self.text.insert("insert", = self.sub_members[self.line][first:last]) return "break" =20 elif (string.find(self.wordchars,event.keysym) > -1): text =3D self.text chars =3D text.get("insert linestart", "insert") i =3D len(chars) while i and chars[i-1] in self.wordchars: i =3D i-1 self.word =3D chars[i:] + event.keysym if self.word: self.sub_members =3D [] self.line =3D 0 for member in self.members: if string.find(member, self.word) =3D=3D 0: self.sub_members.append(member) if len(self.sub_members) =3D=3D 0: self._remove_calltip_window() else: self._remove_calltip_window() # self.calltip_start =3D = self.text.index("insert") self.calltip =3D self._make_calltip_window() = self.calltip.showtip(self.sub_members,1-len(self.word)) else: pass return "" #so the event is handled normally. def calltip_down_event(self, event): if self.calltip: if self.line < (len(self.sub_members) - 1): self.line +=3D 1 self._remove_calltip_window() self.calltip =3D self._make_calltip_window() = self.calltip.showtip(self.sub_members,-len(self.word),self.line) = =20 return "break" #skip further event handling. else: return "" #so the event is handled normally. def calltip_up_event(self, event): if self.calltip: if self.line > 0: self.line -=3D 1 self._remove_calltip_window() self.calltip =3D self._make_calltip_window() = self.calltip.showtip(self.sub_members,-len(self.word),self.line) =20 return "break" #skip further event handling. else: return "" #so the event is handled normally. =20 def check_calltip_cancel_event(self, event): if self.calltip: # If we have moved before the start of the calltip, # or off the calltip line, then cancel the tip. # (Later need to be smarter about multi-line, etc) if self.text.compare("insert", "<=3D", self.calltip_start) = or \ self.text.compare("insert", ">", self.calltip_start + " = lineend"): self._remove_calltip_window() =20 return "" #so the event is handled normally. def calltip_cancel_event(self, event): self._remove_calltip_window() return "" #so the event is handled normally. def get_object_at_cursor(self, wordchars=3D"._" + string.uppercase + = string.lowercase + string.digits): # XXX - This needs to be moved to a better place # so the "." attribute lookup code can also use it. text =3D self.text chars =3D text.get("insert linestart", "insert") i =3D len(chars) while i and chars[i-1] in wordchars: i =3D i-1 word =3D chars[i:] if word: # How is this for a hack! import sys, __main__ namespace =3D sys.modules.copy() namespace.update(__main__.__dict__) try: return eval(word, namespace) except: pass return None # Can't find an object. def _find_constructor(class_ob): # Given a class object, return a function object used for the # constructor (ie, __init__() ) or None if we can't find one. try: return class_ob.__init__.im_func except AttributeError: for base in class_ob.__bases__: rc =3D _find_constructor(base) if rc is not None: return rc return None def get_arg_text(ob): # Get a string describing the arguments for the given object. argText =3D "" if ob is not None: argOffset =3D 0 if type(ob)=3D=3Dtypes.ClassType: # Look for the highest __init__ in the class chain. fob =3D _find_constructor(ob) if fob is None: fob =3D lambda: None else: argOffset =3D 1 elif type(ob)=3D=3Dtypes.MethodType: # bit of a hack for methods - turn it into a function # but we drop the "self" param. fob =3D ob.im_func argOffset =3D 1 else: fob =3D ob # Try and build one for Python defined functions if type(fob) in [types.FunctionType, types.LambdaType]: try: realArgs =3D = fob.func_code.co_varnames[argOffset:fob.func_code.co_argcount] defaults =3D fob.func_defaults or [] defaults =3D list(map(lambda name: "=3D%s" % name, = defaults)) defaults =3D [""] * (len(realArgs)-len(defaults)) + = defaults items =3D map(lambda arg, dflt: arg+dflt, realArgs, = defaults) if fob.func_code.co_flags & 0x4: items.append("...") if fob.func_code.co_flags & 0x8: items.append("***") argText =3D string.join(items , ", ") argText =3D "(%s)" % argText except: pass # See if we can use the docstring doc =3D getattr(ob, "__doc__", "") if doc: while doc[:1] in " \t\n": doc =3D doc[1:] pos =3D doc.find("\n") if pos < 0 or pos > 70: pos =3D 70 if argText: argText +=3D "\n" argText +=3D doc[:pos] return argText ################################################# # # Test code # if __name__=3D=3D'__main__': def t1(): "()" def t2(a, b=3DNone): "(a, b=3DNone)" def t3(a, *args): "(a, ...)" def t4(*args): "(...)" def t5(a, *args): "(a, ...)" def t6(a, b=3DNone, *args, **kw): "(a, b=3DNone, ..., ***)" class TC: "(a=3DNone, ...)" def __init__(self, a=3DNone, *b): "(a=3DNone, ...)" def t1(self): "()" def t2(self, a, b=3DNone): "(a, b=3DNone)" def t3(self, a, *args): "(a, ...)" def t4(self, *args): "(...)" def t5(self, a, *args): "(a, ...)" def t6(self, a, b=3DNone, *args, **kw): "(a, b=3DNone, ..., = ***)" def test( tests ): failed=3D[] for t in tests: expected =3D t.__doc__ + "\n" + t.__doc__ if get_arg_text(t) !=3D expected: failed.append(t) print "%s - expected %s, but got %s" % (t, `expected`, = `get_arg_text(t)`) print "%d of %d tests failed" % (len(failed), len(tests)) tc =3D TC() tests =3D t1, t2, t3, t4, t5, t6, \ TC, tc.t1, tc.t2, tc.t3, tc.t4, tc.t5, tc.t6 test(tests) ------=_NextPart_000_0005_01C1C225.C63009A0 Content-Type: text/plain; name="CallTipWindow.py" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="CallTipWindow.py" # A CallTip window class for Tkinter/IDLE. # After ToolTip.py, which uses ideas gleaned from PySol # Used by the CallTips IDLE extension. import os import string from Tkinter import * class CallTip: def __init__(self, widget): self.widget = widget self.tipwindow = None self.id = None self.x = self.y = 0 def showtip(self, texts, xoffset=0, line=0, maxcount=10): self.texts = texts # List of text strings if self.tipwindow or not self.texts: return # Setup visible region if maxcount < 0: maxcount = 1 first = 0 last = len(self.texts) if line > first: first = line if first > last: first = last if (last - first + 1) > maxcount: last = first + maxcount # Extract visible region self.text = string.join(self.texts[first:last], "\n") self.widget.see("insert") # To avoid incorrect values for cx take "insert - 1 chars" x, y, cx, cy = self.widget.bbox("insert - 1 chars") # Estimate current cursor position x = x + cx # Top left coordinates for the new toplevel widget x = x + cx*xoffset + self.widget.winfo_rootx() - 1 y = y + cy + self.widget.winfo_rooty() self.tipwindow = tw = Toplevel(self.widget) tw.wm_overrideredirect(1) tw.wm_geometry("+%d+%d" % (x, y)) label = Label(tw, text=self.text, justify=LEFT, background="#ffffe0", relief=SOLID, borderwidth=1, font = self.widget['font']) label.pack() def hidetip(self): tw = self.tipwindow self.tipwindow = None if tw: tw.destroy() ############################### # # Test Code # class container: # Conceptually an editor_window def __init__(self): root = Tk() text = self.text = Text(root) text.pack(side=LEFT, fill=BOTH, expand=1) text.insert("insert", "string.split") root.update() self.calltip = CallTip(text) text.event_add("<>", "(") text.event_add("<>", ")") text.bind("<>", self.calltip_show) text.bind("<>", self.calltip_hide) text.focus_set() # root.mainloop() # not in idle def calltip_show(self, event): self.calltip.showtip(["Hello world"]) def calltip_hide(self, event): self.calltip.hidetip() def main(): # Test code c=container() if __name__=='__main__': main() ------=_NextPart_000_0005_01C1C225.C63009A0-- From guido@python.org Sat Mar 2 20:44:59 2002 From: guido@python.org (Guido van Rossum) Date: Sat, 02 Mar 2002 15:44:59 -0500 Subject: [Idle-dev] IDLE extension In-Reply-To: Your message of "Sat, 02 Mar 2002 20:06:43 +0100." <000901c1c21d$6502b180$0100a8c0@dialin.tonline.de> References: <000901c1c21d$6502b180$0100a8c0@dialin.tonline.de> Message-ID: <200203022044.g22KixB15957@pcp742651pcs.reston01.va.comcast.net> > the attached files implement a (quick and dirty but useful) > extension to IDLE 0.8 (Python 2.2). > > Similar to "CallTips" this extension shows member functions and > attributes after hitting a "." The toplevel help window supports > scrolling (up- and down-Keys). The 'space'-key is used to insert the > topmost item into the IDLE text window. > > Martin Martin, would you mind submitting this as a patch to SourceForge? http://sourceforge.net/tracker/?func=add&group_id=5470&atid=305470 Patches mailed to a mailing list tend to get lost before they're reviewed... Also, we'd like to see a context (or unified) diff rather than a whole new file -- this makes it easier to see what you changed. --Guido van Rossum (home page: http://www.python.org/~guido/) From b2b@designermoulding.net Sun Mar 3 02:29:07 2002 From: b2b@designermoulding.net (Designer Hardwoods & Mouldings Inc) Date: Sat, 02 Mar 2002 21:29:07 -0500 Subject: [Idle-dev] An Invitation to our Site... Message-ID: <200203030228.g232Sun07210@host37.hostingcheck.com> You were added to this list by someone entering your email to our "refer a friend" link on our website. To be removed see below -------------------------------------------------- Hi, We would like to invite you to our site. We offer Hardwoods, Moulding, Carved Products Hardware, Onlays etc. Come over today to visit. http://www.designermoulding.net Webmasters, we would be interested in exchanging links with you. If interested please contact me at b2b@designermoulding.net with link in the subject line ___________________________________________________ To be removed type Remove in the subject line and email it to b2b@designermoulding.net From outros@kyky.zzn.com Mon Mar 4 16:10:24 2002 From: outros@kyky.zzn.com (Bordeaux Buffet) Date: Mon, 4 Mar 2002 13:10:24 -0300 Subject: [Idle-dev] Não Compre... Alugue! Message-ID: Não Compre... Alugue!

:: Bordeaux Buffet ::
Aluguel de Materiais para festas.

Alugue todo o material para o seu evento!

Cadeiras - Mesas - Toalhas - Copos - Talheres - Pratos - Baixelas - Rechaud - Samovar - Estufa e muito mais!!!

São mais de 1000 itens a sua escolha. Entregamos em todo o território nacional!

Fornecemos gelo em cubo, barra e triturado.

www.bordeaux.com.br

Para retirar seu nome de nossa lista de e-mails, retorne este e-mail com o Subject ( Assunto ) = Remover
Esta mensagem é enviada de acordo com a nova legislação sobre correio eletrônico, Seção 301, Parágrafo (a) (2) (c) Decreto S. 1618, Título Terceiro aprovado pelo "105 Congresso Base das Normativas Internacionais sobre o SPAM". Este E-mail não poderá ser considerado SPAM quando inclua uma forma de ser removido.
From elguavas@users.sourceforge.net Tue Mar 5 00:26:00 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Mon, 04 Mar 2002 16:26:00 -0800 Subject: [Idle-dev] CVS: idle configDialog.py,1.38,1.39 keybindingDialog.py,1.6,1.7 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv22565 Modified Files: configDialog.py keybindingDialog.py Log Message: further work on new config system Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** configDialog.py 2 Mar 2002 07:12:53 -0000 1.38 --- configDialog.py 5 Mar 2002 00:25:58 -0000 1.39 *************** *** 464,468 **** value=self.themeIsBuiltin.get() self.AddChangedItem('main','Theme','default',value) ! self.PaintThemeSample() def VarChanged_highlightTarget(self,*params): --- 464,471 ---- value=self.themeIsBuiltin.get() self.AddChangedItem('main','Theme','default',value) ! if value: ! self.VarChanged_builtinTheme() ! else: ! self.VarChanged_customTheme() def VarChanged_highlightTarget(self,*params): *************** *** 496,502 **** self.AddChangedItem('main','Keys','default',value) if value: ! self.LoadKeysList(self.builtinKeys.get()) else: ! self.LoadKeysList(self.customKeys.get()) def VarChanged_winWidth(self,*params): --- 499,505 ---- self.AddChangedItem('main','Keys','default',value) if value: ! self.VarChanged_builtinKeys() else: ! self.VarChanged_customKeys() def VarChanged_winWidth(self,*params): *************** *** 937,947 **** --- 940,954 ---- ##currently set theme currentOption=idleConf.CurrentTheme() + print 'current option',currentOption ##load available theme option menus if self.themeIsBuiltin.get(): #default theme selected + print 'builtin theme' itemList=idleConf.GetSectionList('default','highlight') itemList.sort() + print 'builtin items:',itemList self.optMenuThemeBuiltin.SetMenu(itemList,currentOption) itemList=idleConf.GetSectionList('user','highlight') itemList.sort() + print 'user items:',itemList if not itemList: self.radioThemeCustom.config(state=DISABLED) *************** *** 950,958 **** --- 957,968 ---- self.optMenuThemeCustom.SetMenu(itemList,itemList[0]) else: #user theme selected + print 'user theme' itemList=idleConf.GetSectionList('user','highlight') itemList.sort() + print 'user items:',itemList self.optMenuThemeCustom.SetMenu(itemList,currentOption) itemList=idleConf.GetSectionList('default','highlight') itemList.sort() + print 'builtin items:',itemList self.optMenuThemeBuiltin.SetMenu(itemList,itemList[0]) self.SetThemeType() *************** *** 1113,1115 **** --- 1123,1126 ---- Button(root,text='Dialog', command=lambda:ConfigDialog(root,'Settings')).pack() + root.instanceDict={} root.mainloop() Index: keybindingDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/keybindingDialog.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** keybindingDialog.py 11 Feb 2002 03:45:22 -0000 1.6 --- keybindingDialog.py 5 Mar 2002 00:25:58 -0000 1.7 *************** *** 143,147 **** keyList=keyList+modifiers if finalKey: ! if (not modifiers) and (finalKey in self.functionKeys): finalKey='<'+self.TranslateKey(finalKey) else: --- 143,148 ---- keyList=keyList+modifiers if finalKey: ! if (not modifiers) and (finalKey not ! in self.alphanumKeys+self.punctuationKeys): finalKey='<'+self.TranslateKey(finalKey) else: *************** *** 226,239 **** message='No final key specified.') keysOk=0 ! elif (not modifiers) and (finalKey not in self.functionKeys): ! #modifier required if not a function key tkMessageBox.showerror(title='Key Sequence Error', message='No modifier key(s) specified.') keysOk=0 ! elif (modifiers==['Shift']) and (finalKey not in self.functionKeys): #shift alone is only a useful modifier with a function key tkMessageBox.showerror(title='Key Sequence Error', ! message='Shift alone is only a useful modifier '+ ! 'when used with a function key.') keysOk=0 elif keySequence in self.currentKeySequences: #keys combo already in use --- 227,242 ---- message='No final key specified.') keysOk=0 ! elif (not modifiers) and (finalKey in ! self.alphanumKeys+self.punctuationKeys): ! #modifier required tkMessageBox.showerror(title='Key Sequence Error', message='No modifier key(s) specified.') keysOk=0 ! elif (modifiers==['Shift']) and (finalKey not ! in self.functionKeys+('Tab',)): #shift alone is only a useful modifier with a function key tkMessageBox.showerror(title='Key Sequence Error', ! message='Shift alone is not a useful modifier '+ ! 'when used with this final key key.') keysOk=0 elif keySequence in self.currentKeySequences: #keys combo already in use From elguavas@users.sourceforge.net Tue Mar 5 00:31:45 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Mon, 04 Mar 2002 16:31:45 -0800 Subject: [Idle-dev] CVS: idle configDialog.py,1.39,1.40 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv25234 Modified Files: configDialog.py Log Message: remove debug cruft Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** configDialog.py 5 Mar 2002 00:25:58 -0000 1.39 --- configDialog.py 5 Mar 2002 00:31:43 -0000 1.40 *************** *** 943,954 **** ##load available theme option menus if self.themeIsBuiltin.get(): #default theme selected - print 'builtin theme' itemList=idleConf.GetSectionList('default','highlight') itemList.sort() - print 'builtin items:',itemList self.optMenuThemeBuiltin.SetMenu(itemList,currentOption) itemList=idleConf.GetSectionList('user','highlight') itemList.sort() - print 'user items:',itemList if not itemList: self.radioThemeCustom.config(state=DISABLED) --- 943,951 ---- *************** *** 957,968 **** self.optMenuThemeCustom.SetMenu(itemList,itemList[0]) else: #user theme selected - print 'user theme' itemList=idleConf.GetSectionList('user','highlight') itemList.sort() - print 'user items:',itemList self.optMenuThemeCustom.SetMenu(itemList,currentOption) itemList=idleConf.GetSectionList('default','highlight') itemList.sort() - print 'builtin items:',itemList self.optMenuThemeBuiltin.SetMenu(itemList,itemList[0]) self.SetThemeType() --- 954,962 ---- From edream@tds.net Tue Mar 5 16:18:49 2002 From: edream@tds.net (Edward K. Ream) Date: Tue, 05 Mar 2002 10:18:49 -0600 Subject: [Idle-dev] Patch: clearing breakpoints in IDLE Message-ID: <3C84EFE9.13EF0F99@tds.net> Hi all: This was originally posted to the main python mailing list. Please email me if you have comments: I am not a member of idle-dev. The following patch that lets the user of IDLE clear breakpoints in exactly the same way that they are set, that is, by right-clicking a source line containing a breakpoint. (I've inserted backslashes so this doesn't get line-breaked to death.) 1. In PyShell.py, add the following two lines, indicated by # EKR: def __init__(self, *args): apply(EditorWindow.__init__, (self,) + args) self.text.bind("<>",\ self.set_breakpoint_here) self.text.bind("<>",\ self.clear_this_breakpoint) # EKR self.text.bind("<>", self.flist.open_shell) rmenu_specs = [ ("Set breakpoint here", "<>"), ("Clear this breakpoint", "<>"), # EKR ] 2. In PyShell.py, add the following new method: def clear_this_breakpoint(self, event=None): if not self.flist.pyshell or \ not self.flist.pyshell.interp.debugger: self.text.bell() return self.flist.pyshell.interp.debugger.clear_this_breakpoint(self) 3. In Debugger.py, add the following new method: def clear_this_breakpoint(self, edit): text = edit.text filename = edit.io.filename if not filename: text.bell() return lineno = int(float(text.index("insert"))) msg = self.clear_break(filename, lineno) if msg: text.bell() return text.tag_remove("BREAK", "insert linestart", \ "insert lineend+1char") I believe that's all there is to it. Aside 1: Unlike the set_breakpoint_here routine, the call to self.clear_break in clear_this_breakpoint calls the method of the super class, i.e., the Bcb class. I don't understand why Debugger.py bothers to create a set_break method. Indeed this comment is strange: # A literal copy of Bdb.set_break() without the print statement at the end There is no print statement in Bdb.set_break in v2.1. Aside 2: In PyShell.py, it seems silly just to ring a bell in set_breakpoint_here if the debugger hasn't been opened by the user. How about opening it for her? Like this: def set_breakpoint_here(self, event=None): if not self.flist.pyshell or \ not self.flist.pyshell.interp.debugger: if 1: # EKR: Try to open debugger automatically. self.flist.pyshell.toggle_debugger() if not self.flist.pyshell or \ not self.flist.pyshell.interp.debugger: self.text.bell() return else: # old way self.text.bell() self.flist.pyshell.interp.debugger.set_breakpoint_here(self) This seems to work for me. Edward -------------------------------------------------------------------- Edward K. Ream email: edream@tds.net Leo: Literate Editor with Outlines Leo: http://personalpages.tds.net/~edream/front.html -------------------------------------------------------------------- From skip@pobox.com Fri Mar 8 01:13:46 2002 From: skip@pobox.com (Skip Montanaro) Date: Thu, 7 Mar 2002 19:13:46 -0600 Subject: [Idle-dev] Re: [Python-Help] What was that regarding raw_input and Unicode? (fwd) Message-ID: <15496.4170.278342.900140@12-248-41-177.client.attbi.com> --vhfKMF5ZMl Content-Type: text/plain; charset=us-ascii Content-Description: message body and .signature Content-Transfer-Encoding: 7bit The topic of raw_input failing when fed non-ASCII data came up on python-help in the past day or two. Alex Martelli wound up filing a bug report against IDLE. I figured the IDLEfork-sters might be interested in it as well. Cheers, -- Skip Montanaro (skip@pobox.com - http://www.mojam.com/) --vhfKMF5ZMl Content-Type: message/rfc822 Content-Description: forwarded message Content-Transfer-Encoding: 7bit CONTENT-TRANSFER-ENCODING: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-Path: Received: from cali-2.pobox.com (cali-2.pobox.com [64.71.166.115]) by manatee.mojam.com (8.12.1/8.12.1) with ESMTP id g27GcS9A011614 for ; Thu, 7 Mar 2002 10:38:28 -0600 Received: from cali-2.pobox.com (localhost.localdomain [127.0.0.1]) by cali-2.pobox.com (Postfix) with ESMTP id BAFB53E6B9 for ; Thu, 7 Mar 2002 11:38:27 -0500 (EST) Delivered-To: skip@pobox.com Received: from mx1.aruba.it (mx1.aruba.it [62.149.128.130]) by cali-2.pobox.com (Postfix) with SMTP id 95A323E6DB for ; Thu, 7 Mar 2002 11:38:26 -0500 (EST) Received: (qmail 14717 invoked from network); 7 Mar 2002 16:39:51 -0000 Received: from unknown (HELO there) (213.45.32.5) by mx1.aruba.it with SMTP; 7 Mar 2002 16:39:51 -0000 Organization: None in Sight X-Mailer: KMail [version 1.3.1] References: <15495.36085.481502.529570@12-248-41-177.client.attbi.com> In-Reply-To: <15495.36085.481502.529570@12-248-41-177.client.attbi.com> Message-Id: <20020307163826.95A323E6DB@cali-2.pobox.com> From: Alex Martelli To: skip@pobox.com, python-help@python.org Subject: Re: [Python-Help] What was that regarding raw_input and Unicode? Date: Thu, 7 Mar 2002 17:38:21 +0100 On Thursday 07 March 2002 04:53 pm, Skip Montanaro wrote: > Folks, > > Raymond's note about modifying the site default encoding stuck in my = head, > and sure enough, Martin v. L=F6wis made a comment about it being a ba= d thing > to do. > > Can we reconstruct what was asked and answered to decide if there is = a bug > lurking in either raw_input() or IDLE that requires a bug report (thi= s list > is not archived)? Attached is Martin's response to my question in c.= l.py. Hmmm... I was the one who answered Raymond, and I'm at fault for not checking things through, I guess. I've come to EXPECT trouble with just about any non-ascii thing on sites which leave default encoding to 'ascii'... sorry:-(. I can confirm that raw_input works fine with non-ascii input on a Linux= KDE=20 Console, and on Windows 98 in both a textmode interactive interpreter a= nd=20 IDLE (all Python 2.2). With IDLE under Linux (Mandrake 8.1, and its released KDE), however: Python 2.2 (#1, Dec 23 2001, 20:09:01)=20 [GCC 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)] on linux2 Type "copyright", "credits" or "license" for more information. IDLE 0.8 -- press F1 for help >>> pal=F6 UnicodeError: ASCII encoding error: ordinal not in range(128) >>> x=3Draw_input('say something funny: ') say something funny: pal=F6 Traceback (most recent call last): File "", line 1, in ? x=3Draw_input('say something funny: ') TypeError: object.readline() returned non-string >>>=20 I think Tk is returning a Unicode object (which can't be converted to a string in this case with the default encoding 'ascii' as it includes = a non-ascii character), as it always does I believe; this is feeding through to some readline method, and raw_input raises because it can't get a string from that. I'm not sure which component is at fault or how IDLE is managing to work in the Windows 98 case. Checking up in SF, I can't see any open bugs for IDLE and the 6 open bugs for Unicode don't seem to have anything to do with this specific one. So, I reported this -- it's now bug 527022. Alex --vhfKMF5ZMl-- From elguavas@users.sourceforge.net Tue Mar 12 00:21:25 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Mon, 11 Mar 2002 16:21:25 -0800 Subject: [Idle-dev] CVS: idle configDialog.py,1.40,1.41 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv16532 Modified Files: configDialog.py Log Message: further work on dynamic config changes; editor font Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** configDialog.py 5 Mar 2002 00:31:43 -0000 1.40 --- configDialog.py 12 Mar 2002 00:21:23 -0000 1.41 *************** *** 940,944 **** ##currently set theme currentOption=idleConf.CurrentTheme() - print 'current option',currentOption ##load available theme option menus if self.themeIsBuiltin.get(): #default theme selected --- 940,943 ---- *************** *** 1097,1100 **** --- 1096,1100 ---- for instance in winInstances: instance.ResetColorizer() + instance.ResetFont() def Cancel(self): From elguavas@users.sourceforge.net Tue Mar 12 00:21:58 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Mon, 11 Mar 2002 16:21:58 -0800 Subject: [Idle-dev] CVS: idle EditorWindow.py,1.18,1.19 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv16676 Modified Files: EditorWindow.py Log Message: further work on dynamic config changes; editor font Index: EditorWindow.py =================================================================== RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** EditorWindow.py 2 Mar 2002 07:16:21 -0000 1.18 --- EditorWindow.py 12 Mar 2002 00:21:56 -0000 1.19 *************** *** 160,165 **** text['yscrollcommand'] = vbar.set text.config(font=(idleConf.GetOption('main','EditorWindow','font'), ! idleConf.GetOption('main','EditorWindow','font-size'))) text_frame.pack(side=LEFT, fill=BOTH, expand=1) text.pack(side=TOP, fill=BOTH, expand=1) --- 160,169 ---- text['yscrollcommand'] = vbar.set + fontWeight='normal' + if idleConf.GetOption('main','EditorWindow','font-bold',type='bool'): + fontWeight='bold' text.config(font=(idleConf.GetOption('main','EditorWindow','font'), ! idleConf.GetOption('main','EditorWindow','font-size'), ! fontWeight)) text_frame.pack(side=LEFT, fill=BOTH, expand=1) text.pack(side=TOP, fill=BOTH, expand=1) *************** *** 478,481 **** --- 482,495 ---- self.color = self.ColorDelegator() self.per.insertfilter(self.color) + + def ResetFont(self): + #this function is called from configDialog.py + #to update the text widgets' font if it is changed + fontWeight='normal' + if idleConf.GetOption('main','EditorWindow','font-bold',type='bool'): + fontWeight='bold' + self.text.config(font=(idleConf.GetOption('main','EditorWindow','font'), + idleConf.GetOption('main','EditorWindow','font-size'), + fontWeight)) def saved_change_hook(self): From elguavas@users.sourceforge.net Tue Mar 12 00:52:45 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Mon, 11 Mar 2002 16:52:45 -0800 Subject: [Idle-dev] CVS: idle configDialog.py,1.41,1.42 config-main.def,1.9,1.10 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv23349 Modified Files: configDialog.py config-main.def Log Message: remove tabwidth (for tabs) config stuff, because of the way the tk text widget handles tabs they must remain a fixed size in idle Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** configDialog.py 12 Mar 2002 00:21:23 -0000 1.41 --- configDialog.py 12 Mar 2002 00:52:42 -0000 1.42 *************** *** 126,136 **** text='Choose indentation size :') labelSpaceNumTitle=Label(frameIndentSize,justify=LEFT, ! text='when tab key inserts spaces,\nspaces per tab') self.scaleSpaceNum=Scale(frameIndentSize,variable=self.spaceNum, orient='horizontal',tickinterval=2,from_=2,to=8) ! labeltabColsTitle=Label(frameIndentSize,justify=LEFT, ! text='when tab key inserts tabs,\ncolumns per tab') ! self.scaleTabCols=Scale(frameIndentSize,variable=self.tabCols, ! orient='horizontal',tickinterval=2,from_=2,to=8) #widget packing #body --- 126,136 ---- text='Choose indentation size :') labelSpaceNumTitle=Label(frameIndentSize,justify=LEFT, ! text='when tab key inserts spaces,\nspaces per indent') self.scaleSpaceNum=Scale(frameIndentSize,variable=self.spaceNum, orient='horizontal',tickinterval=2,from_=2,to=8) ! #labeltabColsTitle=Label(frameIndentSize,justify=LEFT, ! # text='when tab key inserts tabs,\ncolumns per tab') ! #self.scaleTabCols=Scale(frameIndentSize,variable=self.tabCols, ! # orient='horizontal',tickinterval=2,from_=2,to=8) #widget packing #body *************** *** 159,164 **** labelSpaceNumTitle.pack(side=TOP,anchor=W,padx=5) self.scaleSpaceNum.pack(side=TOP,padx=5,fill=X) ! labeltabColsTitle.pack(side=TOP,anchor=W,padx=5) ! self.scaleTabCols.pack(side=TOP,padx=5,fill=X) return frame --- 159,164 ---- labelSpaceNumTitle.pack(side=TOP,anchor=W,padx=5) self.scaleSpaceNum.pack(side=TOP,padx=5,fill=X) ! #labeltabColsTitle.pack(side=TOP,anchor=W,padx=5) ! #self.scaleTabCols.pack(side=TOP,padx=5,fill=X) return frame *************** *** 922,926 **** def LoadTabCfg(self): ! ##indent type radibuttons spaceIndent=idleConf.GetOption('main','Indent','use-spaces', default=1,type='bool') --- 922,926 ---- def LoadTabCfg(self): ! ##indent type radiobuttons spaceIndent=idleConf.GetOption('main','Indent','use-spaces', default=1,type='bool') *************** *** 929,936 **** spaceNum=idleConf.GetOption('main','Indent','num-spaces', default=4,type='int') ! tabCols=idleConf.GetOption('main','Indent','tab-cols', ! default=4,type='int') self.spaceNum.set(spaceNum) ! self.tabCols.set(tabCols) def LoadThemeCfg(self): --- 929,936 ---- spaceNum=idleConf.GetOption('main','Indent','num-spaces', default=4,type='int') ! #tabCols=idleConf.GetOption('main','Indent','tab-cols', ! # default=4,type='int') self.spaceNum.set(spaceNum) ! #self.tabCols.set(tabCols) def LoadThemeCfg(self): Index: config-main.def =================================================================== RCS file: /cvsroot/idlefork/idle/config-main.def,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** config-main.def 5 Feb 2002 04:51:35 -0000 1.9 --- config-main.def 12 Mar 2002 00:52:42 -0000 1.10 *************** *** 42,46 **** use-spaces= 1 num-spaces= 4 - tab-cols= 4 [Theme] --- 42,45 ---- From elguavas@users.sourceforge.net Tue Mar 12 02:33:54 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Mon, 11 Mar 2002 18:33:54 -0800 Subject: [Idle-dev] CVS: idle configDialog.py,1.42,1.43 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv10926 Modified Files: configDialog.py Log Message: fixes to tabwidth code removal Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** configDialog.py 12 Mar 2002 00:52:42 -0000 1.42 --- configDialog.py 12 Mar 2002 02:33:52 -0000 1.43 *************** *** 83,87 **** self.fontName=StringVar(self) self.spaceNum=IntVar(self) ! self.tabCols=IntVar(self) self.indentBySpaces=BooleanVar(self) self.editFont=tkFont.Font(self,('courier',12,'normal')) --- 83,87 ---- self.fontName=StringVar(self) self.spaceNum=IntVar(self) ! #self.tabCols=IntVar(self) self.indentBySpaces=BooleanVar(self) self.editFont=tkFont.Font(self,('courier',12,'normal')) *************** *** 128,132 **** text='when tab key inserts spaces,\nspaces per indent') self.scaleSpaceNum=Scale(frameIndentSize,variable=self.spaceNum, ! orient='horizontal',tickinterval=2,from_=2,to=8) #labeltabColsTitle=Label(frameIndentSize,justify=LEFT, # text='when tab key inserts tabs,\ncolumns per tab') --- 128,132 ---- text='when tab key inserts spaces,\nspaces per indent') self.scaleSpaceNum=Scale(frameIndentSize,variable=self.spaceNum, ! orient='horizontal',tickinterval=2,from_=2,to=10) #labeltabColsTitle=Label(frameIndentSize,justify=LEFT, # text='when tab key inserts tabs,\ncolumns per tab') *************** *** 408,412 **** self.fontBold.trace_variable('w',self.VarChanged_fontBold) self.spaceNum.trace_variable('w',self.VarChanged_spaceNum) ! self.tabCols.trace_variable('w',self.VarChanged_tabCols) self.indentBySpaces.trace_variable('w',self.VarChanged_indentBySpaces) self.colour.trace_variable('w',self.VarChanged_colour) --- 408,412 ---- self.fontBold.trace_variable('w',self.VarChanged_fontBold) self.spaceNum.trace_variable('w',self.VarChanged_spaceNum) ! #self.tabCols.trace_variable('w',self.VarChanged_tabCols) self.indentBySpaces.trace_variable('w',self.VarChanged_indentBySpaces) self.colour.trace_variable('w',self.VarChanged_colour) *************** *** 443,449 **** self.AddChangedItem('main','Indent','num-spaces',value) ! def VarChanged_tabCols(self,*params): ! value=self.tabCols.get() ! self.AddChangedItem('main','Indent','tab-cols',value) def VarChanged_colour(self,*params): --- 443,449 ---- self.AddChangedItem('main','Indent','num-spaces',value) ! #def VarChanged_tabCols(self,*params): ! # value=self.tabCols.get() ! # self.AddChangedItem('main','Indent','tab-cols',value) def VarChanged_colour(self,*params): From elguavas@users.sourceforge.net Mon Mar 18 02:38:46 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Sun, 17 Mar 2002 18:38:46 -0800 Subject: [Idle-dev] CVS: idle EditorWindow.py,1.19,1.20 configDialog.py,1.43,1.44 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv25917 Modified Files: EditorWindow.py configDialog.py Log Message: further work on dynamic reconfiguration; keybindings Index: EditorWindow.py =================================================================== RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** EditorWindow.py 12 Mar 2002 00:21:56 -0000 1.19 --- EditorWindow.py 18 Mar 2002 02:38:44 -0000 1.20 *************** *** 493,496 **** --- 493,529 ---- fontWeight)) + def ResetKeybindings(self): + #this function is called from configDialog.py + #to update the keybindings if they are changed + self.Bindings.default_keydefs=idleConf.GetCurrentKeySet() + keydefs = self.Bindings.default_keydefs + for event, keylist in keydefs.items(): + self.text.event_delete(event) + self.apply_bindings() + #update menu accelerators + menuEventDict={} + for menu in self.Bindings.menudefs: + menuEventDict[menu[0]]={} + for item in menu[1]: + if item: + menuEventDict[menu[0]][prepstr(item[0])[1]]=item[1] + for menubarItem in self.menudict.keys(): + menu=self.menudict[menubarItem] + end=menu.index(END)+1 + for index in range(0,end): + if menu.type(index)=='command': + accel=menu.entrycget(index,'accelerator') + if accel: + itemName=menu.entrycget(index,'label') + event='' + if menuEventDict.has_key(menubarItem): + if menuEventDict[menubarItem].has_key(itemName): + event=menuEventDict[menubarItem][itemName] + if event: + #print 'accel was:',accel + accel=get_accelerator(keydefs, event) + menu.entryconfig(index,accelerator=accel) + #print 'accel now:',accel,'\n' + def saved_change_hook(self): short = self.short_title() Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** configDialog.py 12 Mar 2002 02:33:52 -0000 1.43 --- configDialog.py 18 Mar 2002 02:38:44 -0000 1.44 *************** *** 1097,1100 **** --- 1097,1101 ---- instance.ResetColorizer() instance.ResetFont() + instance.ResetKeybindings() def Cancel(self): From gohotel@gotohotel.com.tw Mon Mar 25 13:13:06 2002 From: gohotel@gotohotel.com.tw (¥ø·~®a¤j¶º©±(¥xÆW.¥x¤¤)) Date: Mon, 25 Mar 2002 21:13:06 +0800 Subject: [Idle-dev] ­»´ä¶g-´_¬¡¸`¯S´f¬¡°Ê Message-ID: home-test
     ­»´ä¶g-´_¬¡¸`¯S´f¬¡°Ê      
¡@
¸g¥Ñ¦¹ Emaill §iª¾±z¸Ô²Ó¤º®e
¡@
 ¹L©]½Ð¤W   http://gohotel.com.tw    ºô¯¸ÂsÄý
¥xÆW.¥x¤¤
Your best choice for accommodation in Taichung.
¤@¦¸º¡¨¬     ¦í±J.¦Y³Ü.ª±¼Ö.Áʪ«     ¤@¦¸º¡¨¬
¡@
¥ø·~®a¤j¶º©±  Âù¬P¤j¶º©±
¡@
¦h¦¸ºaÀò¥x¤¤¥«Àu¨}®ÈÀ]µûŲ²Ä¤@¦W
¡@
­Y±z¤£·Q¦A¦¬¨ì¦¹¬¡°Ê
½Ð¥Ñ gohotel@gotohotel.com.tw §iª¾§Ú­Ì  ÁÂÁÂ

¡@

From SCI E-mailing" ------=_NextPart_84815C5ABAF209EF376268C8 Content-type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable ------=_NextPart_84815C5ABAF209EF376268C8 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable emaling

 

 

<= /p>

=

 

SCI emailing todo el poder audiovisual en su casilla de correo

Si no puede visualizar este comer= cial, haga un click aqu=ED

 

 

A trav=E9s de nuestra combinaci=F3n =FAnica de creatividad, permission marketing y una pot= ente plataforma tecnol=F3gica, ayudamos a las empresas a crear exitosas C= ampa=F1as de Marketing Directo on line de alta respuesta para captar clientes = y profundizar en la relaci=F3n con los mismos=2E
Brindamos una completa gama de soluciones que lo llevan "de la estrategia a la acci=F3n" de alcanzar resultados superiores=2E<= /span>

 

 

 

 

<= span lang=3DES-MX style=3D'font-size:10=2E0pt;font-family:Arial;color:whi= te; mso-ansi-language:ES-MX'>Como cliente de SCI usted puede tomar venta= ja de
nuestras soluciones individualmente o de forma
combinada dependiendo de sus necesidades espec=EDficas=2E

 

 

 

 

 

<= span style=3D'color:white'>

=

 

Buenos Aires =
Talcahuano 446 2=BA piso
Buenos Aires, Argentina
54-11-4375-5000
buenosaires@soluciones=2Ecom

Miami
3255 NE 184th Street Aventura Fl=2E 33160
Miami, Usa
Phone 786-2717171
miami@soluciones=2Ecom

sea no recibir m=E1s informaci=F3= n haga click en Remover

 

=

 =

=

s

 =

------=_NextPart_84815C5ABAF209EF376268C8-- From elguavas@users.sourceforge.net Wed Mar 27 00:51:55 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Tue, 26 Mar 2002 16:51:55 -0800 Subject: [Idle-dev] CVS: idle PyShell.py,1.12,1.13 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv18908 Modified Files: PyShell.py Log Message: _finally_ tracked down and eliminated a major problem in PyShell.py that was causing extreme headaches in working on EditorWindow.py Index: PyShell.py =================================================================== RCS file: /cvsroot/idlefork/idle/PyShell.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** PyShell.py 2 Mar 2002 07:16:21 -0000 1.12 --- PyShell.py 27 Mar 2002 00:51:53 -0000 1.13 *************** *** 741,748 **** flist = PyShellFileList(root) ! dbg=OnDemandOutputWindow(flist) ! dbg.set_title('IDLE Debugging Messages') ! sys.stdout = PseudoFile(dbg,['stdout']) ! sys.stderr = PseudoFile(dbg,['stderr']) try: --- 741,751 ---- flist = PyShellFileList(root) ! # the following causes lockups and silent failures when debugging ! # changes to EditorWindow.__init__ ; the console works fine for idle ! # debugging in any case, so disable this unnescesary stuff. ! #dbg=OnDemandOutputWindow(flist) ! #dbg.set_title('IDLE Debugging Messages') ! #sys.stdout = PseudoFile(dbg,['stdout']) ! #sys.stderr = PseudoFile(dbg,['stderr']) try: From elguavas@users.sourceforge.net Wed Mar 27 02:24:56 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Tue, 26 Mar 2002 18:24:56 -0800 Subject: [Idle-dev] CVS: idle EditorWindow.py,1.20,1.21 configHelpSourceEdit.py,1.1,1.2 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv5746 Modified Files: EditorWindow.py configHelpSourceEdit.py Log Message: further work on new config system; user defined help items Index: EditorWindow.py =================================================================== RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** EditorWindow.py 18 Mar 2002 02:38:44 -0000 1.20 --- EditorWindow.py 27 Mar 2002 02:24:54 -0000 1.21 *************** *** 99,109 **** root = root or flist.root self.root = root - if flist: - self.vars = flist.vars self.menubar = Menu(root) self.top = top = self.Toplevel(root, menu=self.menubar) ! #self.top.instanceDict makes flist.inversedict avalable to ! #configDialog.py so it can access all EditorWindow instaces ! self.top.instanceDict=flist.inversedict self.vbar = vbar = Scrollbar(top, name='vbar') self.text_frame = text_frame = Frame(top) --- 99,109 ---- root = root or flist.root self.root = root self.menubar = Menu(root) self.top = top = self.Toplevel(root, menu=self.menubar) ! if flist: ! self.vars = flist.vars ! #self.top.instanceDict makes flist.inversedict avalable to ! #configDialog.py so it can access all EditorWindow instaces ! self.top.instanceDict=flist.inversedict self.vbar = vbar = Scrollbar(top, name='vbar') self.text_frame = text_frame = Frame(top) *************** *** 214,218 **** self.extensions['AutoIndent'].set_indentation_params( self.ispythonsource(filename)) ! def set_status_bar(self): self.status_bar = self.MultiStatusBar(self.top) --- 214,218 ---- self.extensions['AutoIndent'].set_indentation_params( self.ispythonsource(filename)) ! def set_status_bar(self): self.status_bar = self.MultiStatusBar(self.top) *************** *** 254,257 **** --- 254,258 ---- mbar.add_cascade(label=label, menu=menu, underline=underline) self.fill_menus() + self.ResetExtraHelpMenu() def postwindowsmenu(self): *************** *** 324,328 **** def python_docs(self, event=None): ! webbrowser.open(self.help_url) def select_all(self, event=None): --- 325,332 ---- def python_docs(self, event=None): ! self.display_docs(self.help_url) ! ! def display_docs(self, url): ! webbrowser.open(url) def select_all(self, event=None): *************** *** 526,529 **** --- 530,552 ---- #print 'accel now:',accel,'\n' + def ResetExtraHelpMenu(self): + #load or update the Extra Help menu if required + menuList=idleConf.GetAllExtraHelpSourcesList() + helpMenu=self.menudict['help'] + cascadeIndex=helpMenu.index(END)-1 + if menuList: + if not hasattr(self,'menuExtraHelp'): + self.menuExtraHelp=Menu(self.menubar) + helpMenu.insert_cascade(cascadeIndex,label='Extra Help', + underline=1,menu=self.menuExtraHelp) + self.menuExtraHelp.delete(1,END) + for menuItem in menuList: + self.menuExtraHelp.add_command(label=menuItem[0], + command=lambda:self.display_docs(menuItem[1])) + else: #no extra help items + if hasattr(self,'menuExtraHelp'): + helpMenu.delete(cascadeIndex-1) + del(self.menuExtraHelp) + def saved_change_hook(self): short = self.short_title() Index: configHelpSourceEdit.py =================================================================== RCS file: /cvsroot/idlefork/idle/configHelpSourceEdit.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** configHelpSourceEdit.py 5 Feb 2002 04:52:32 -0000 1.1 --- configHelpSourceEdit.py 27 Mar 2002 02:24:54 -0000 1.2 *************** *** 23,26 **** --- 23,28 ---- self.result=None self.CreateWidgets() + self.menu.set(menuItem) + self.path.set(filePath) self.withdraw() #hide while setting geometry self.update_idletasks() From elguavas@users.sourceforge.net Wed Mar 27 02:25:46 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Tue, 26 Mar 2002 18:25:46 -0800 Subject: [Idle-dev] CVS: idle configDialog.py,1.44,1.45 config-main.def,1.10,1.11 config-keys.def,1.8,1.9 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv5971 Modified Files: configDialog.py config-main.def config-keys.def Log Message: further work on new config system; user defined help items Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -r1.44 -r1.45 *** configDialog.py 18 Mar 2002 02:38:44 -0000 1.44 --- configDialog.py 27 Mar 2002 02:25:44 -0000 1.45 *************** *** 368,376 **** self.buttonHelpListRemove=Button(frameHelpListButtons,text='Remove', state=DISABLED,width=8,command=self.HelpListItemRemove) ! checkHelpBrowser=Checkbutton(frameHelp,variable=self.userHelpBrowser, ! onvalue=1,offvalue=0,text='user specified (html) help browser:', ! command=self.OnCheckUserHelpBrowser) ! self.entryHelpBrowser=Entry(frameHelp,textvariable=self.helpBrowser, ! width=40) #widget packing #body --- 368,378 ---- self.buttonHelpListRemove=Button(frameHelpListButtons,text='Remove', state=DISABLED,width=8,command=self.HelpListItemRemove) ! # the following is better handled by the BROWSER environment ! # variable under unix/linux ! #checkHelpBrowser=Checkbutton(frameHelp,variable=self.userHelpBrowser, ! # onvalue=1,offvalue=0,text='user specified (html) help browser:', ! # command=self.OnCheckUserHelpBrowser) ! #self.entryHelpBrowser=Entry(frameHelp,textvariable=self.helpBrowser, ! # width=40) #widget packing #body *************** *** 399,404 **** self.buttonHelpListAdd.pack(side=TOP,anchor=W) self.buttonHelpListRemove.pack(side=TOP,anchor=W,pady=5) ! checkHelpBrowser.pack(side=TOP,anchor=W,padx=5) ! self.entryHelpBrowser.pack(side=TOP,anchor=W,padx=5,pady=5) return frame --- 401,406 ---- self.buttonHelpListAdd.pack(side=TOP,anchor=W) self.buttonHelpListRemove.pack(side=TOP,anchor=W,pady=5) ! #checkHelpBrowser.pack(side=TOP,anchor=W,padx=5) ! #self.entryHelpBrowser.pack(side=TOP,anchor=W,padx=5,pady=5) return frame *************** *** 871,875 **** itemIndex=self.listHelp.index(ANCHOR) helpSource=self.userHelpList[itemIndex] ! newHelpSource=GetHelpSourceDialog(self,'New Help Source', menuItem=helpSource[0],filePath=helpSource[1]).result if (not newHelpSource) or (newHelpSource==helpSource): --- 873,877 ---- itemIndex=self.listHelp.index(ANCHOR) helpSource=self.userHelpList[itemIndex] ! newHelpSource=GetHelpSourceDialog(self,'Edit Help Source', menuItem=helpSource[0],filePath=helpSource[1]).result if (not newHelpSource) or (newHelpSource==helpSource): *************** *** 1014,1022 **** self.listHelp.insert(END,helpItem[0]+' '+helpItem[1]) self.SetHelpListButtonStates() ! self.userHelpBrowser.set(idleConf.GetOption('main','General', ! 'user-help-browser',default=0,type='bool')) ! self.helpBrowser.set(idleConf.GetOption('main','General', ! 'user-help-browser-command',default='')) ! self.OnCheckUserHelpBrowser() def LoadConfigs(self): --- 1016,1024 ---- self.listHelp.insert(END,helpItem[0]+' '+helpItem[1]) self.SetHelpListButtonStates() ! #self.userHelpBrowser.set(idleConf.GetOption('main','General', ! # 'user-help-browser',default=0,type='bool')) ! #self.helpBrowser.set(idleConf.GetOption('main','General', ! # 'user-help-browser-command',default='')) ! #self.OnCheckUserHelpBrowser() def LoadConfigs(self): *************** *** 1071,1077 **** save all configuration changes to user config files. """ ! if self.changedItems['main'].has_key('HelpFiles'): ! #this section gets completely replaced ! idleConf.userCfg['main'].remove_section('HelpFiles') for configType in self.changedItems.keys(): cfgTypeHasChanges=0 --- 1073,1082 ---- save all configuration changes to user config files. """ ! #if self.changedItems['main'].has_key('HelpFiles'): ! #this section gets completely replaced ! print idleConf.GetAllExtraHelpSourcesList() ! idleConf.userCfg['main'].remove_section('HelpFiles') ! idleConf.userCfg['main'].Save() ! print idleConf.GetAllExtraHelpSourcesList() for configType in self.changedItems.keys(): cfgTypeHasChanges=0 *************** *** 1082,1085 **** --- 1087,1091 ---- cfgTypeHasChanges=1 if cfgTypeHasChanges: + print configType,'- changed' idleConf.userCfg[configType].Save() self.ResetChangedItems() #clear the changed items dict *************** *** 1098,1101 **** --- 1104,1108 ---- instance.ResetFont() instance.ResetKeybindings() + instance.ResetExtraHelpMenu() def Cancel(self): Index: config-main.def =================================================================== RCS file: /cvsroot/idlefork/idle/config-main.def,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** config-main.def 12 Mar 2002 00:52:42 -0000 1.10 --- config-main.def 27 Mar 2002 02:25:44 -0000 1.11 *************** *** 29,34 **** [General] editor-on-startup= 1 - user-help-browser= 0 - user-help-browser-command= [EditorWindow] --- 29,32 ---- Index: config-keys.def =================================================================== RCS file: /cvsroot/idlefork/idle/config-keys.def,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** config-keys.def 18 Feb 2002 01:43:11 -0000 1.8 --- config-keys.def 27 Mar 2002 02:25:44 -0000 1.9 *************** *** 30,34 **** remove-selection= save-copy-of-window-as-file= ! save-window-as-file= save-window= select-all= --- 30,34 ---- remove-selection= save-copy-of-window-as-file= ! save-window-as-file= save-window= select-all= From elguavas@users.sourceforge.net Wed Mar 27 08:40:48 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: Wed, 27 Mar 2002 00:40:48 -0800 Subject: [Idle-dev] CVS: idle EditorWindow.py,1.21,1.22 IOBinding.py,1.3,1.4 configDialog.py,1.45,1.46 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv11862 Modified Files: EditorWindow.py IOBinding.py configDialog.py Log Message: further work on new config system; recent files menu Index: EditorWindow.py =================================================================== RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** EditorWindow.py 27 Mar 2002 02:24:54 -0000 1.21 --- EditorWindow.py 27 Mar 2002 08:40:46 -0000 1.22 *************** *** 106,109 **** --- 106,111 ---- #configDialog.py so it can access all EditorWindow instaces self.top.instanceDict=flist.inversedict + self.recentFilesPath=os.path.join(idleConf.GetUserCfgDir(), + 'recent-files.lst') self.vbar = vbar = Scrollbar(top, name='vbar') self.text_frame = text_frame = Frame(top) *************** *** 179,182 **** --- 181,189 ---- self.undo = undo = self.UndoDelegator(); per.insertfilter(undo) self.io = io = self.IOBinding(self) + #create the Recent Files submenu + self.menuRecentFiles=Menu(self.menubar) + self.menudict['file'].insert_cascade(3,label='Recent Files', + underline=0,menu=self.menuRecentFiles) + self.UpdateRecentFilesList() text.undo_block_start = undo.undo_block_start *************** *** 254,257 **** --- 261,265 ---- mbar.add_cascade(label=label, menu=menu, underline=underline) self.fill_menus() + #create the ExtraHelp menu, if required self.ResetExtraHelpMenu() *************** *** 543,552 **** for menuItem in menuList: self.menuExtraHelp.add_command(label=menuItem[0], ! command=lambda:self.display_docs(menuItem[1])) else: #no extra help items if hasattr(self,'menuExtraHelp'): helpMenu.delete(cascadeIndex-1) del(self.menuExtraHelp) def saved_change_hook(self): short = self.short_title() --- 551,617 ---- for menuItem in menuList: self.menuExtraHelp.add_command(label=menuItem[0], ! command=self.__DisplayExtraHelpCallback(menuItem[1])) else: #no extra help items if hasattr(self,'menuExtraHelp'): helpMenu.delete(cascadeIndex-1) del(self.menuExtraHelp) + + def __DisplayExtraHelpCallback(self,helpFile): + def DisplayExtraHelp(helpFile=helpFile): + self.display_docs(helpFile) + return DisplayExtraHelp + def UpdateRecentFilesList(self,newFile=None): + #load or update the recent files list, and menu if required + rfList=[] + if os.path.exists(self.recentFilesPath): + RFfile=open(self.recentFilesPath,'r') + try: + rfList=RFfile.readlines() + finally: + RFfile.close() + if newFile: + newFile=os.path.abspath(newFile)+'\n' + if newFile in rfList: + rfList.remove(newFile) + rfList.insert(0,newFile) + rfList=self.__CleanRecentFiles(rfList) + print self.top.instanceDict + print self + if rfList: + for instance in self.top.instanceDict.keys(): + instance.menuRecentFiles.delete(1,END) + for file in rfList: + fileName=file[0:-1] + instance.menuRecentFiles.add_command(label=fileName, + command=instance.__RecentFileCallback(fileName)) + + def __CleanRecentFiles(self,rfList): + origRfList=rfList[:] + count=0 + nonFiles=[] + for path in rfList: + if not os.path.exists(path[0:-1]): + nonFiles.append(count) + count=count+1 + if nonFiles: + nonFiles.reverse() + for index in nonFiles: + del(rfList[index]) + if len(rfList)>19: + rfList=rfList[0:19] + #if rfList != origRfList: + RFfile=open(self.recentFilesPath,'w') + try: + RFfile.writelines(rfList) + finally: + RFfile.close() + return rfList + + def __RecentFileCallback(self,fileName): + def OpenRecentFile(fileName=fileName): + self.io.open(editFile=fileName) + return OpenRecentFile + def saved_change_hook(self): short = self.short_title() *************** *** 629,632 **** --- 694,701 ---- def _close(self): + print self.io.filename + if self.io.filename: + self.UpdateRecentFilesList(newFile=self.io.filename) + WindowList.unregister_callback(self.postwindowsmenu) if self.close_hook: Index: IOBinding.py =================================================================== RCS file: /cvsroot/idlefork/idle/IOBinding.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** IOBinding.py 13 Jul 2001 04:18:32 -0000 1.3 --- IOBinding.py 27 Mar 2002 08:40:46 -0000 1.4 *************** *** 73,79 **** self.filename_change_hook() ! def open(self, event): if self.editwin.flist: ! filename = self.askopenfile() if filename: # if the current window has no filename and hasn't been --- 73,82 ---- self.filename_change_hook() ! def open(self, event=None, editFile=None): if self.editwin.flist: ! if not editFile: ! filename = self.askopenfile() ! else: ! filename=editFile if filename: # if the current window has no filename and hasn't been *************** *** 94,98 **** self.text.focus_set() return "break" ! filename = self.askopenfile() if filename: self.loadfile(filename) --- 97,104 ---- self.text.focus_set() return "break" ! if not editFile: ! filename = self.askopenfile() ! else: ! filename=editFile if filename: self.loadfile(filename) Index: configDialog.py =================================================================== RCS file: /cvsroot/idlefork/idle/configDialog.py,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -r1.45 -r1.46 *** configDialog.py 27 Mar 2002 02:25:44 -0000 1.45 --- configDialog.py 27 Mar 2002 08:40:46 -0000 1.46 *************** *** 1073,1082 **** save all configuration changes to user config files. """ - #if self.changedItems['main'].has_key('HelpFiles'): #this section gets completely replaced - print idleConf.GetAllExtraHelpSourcesList() idleConf.userCfg['main'].remove_section('HelpFiles') idleConf.userCfg['main'].Save() - print idleConf.GetAllExtraHelpSourcesList() for configType in self.changedItems.keys(): cfgTypeHasChanges=0 --- 1073,1079 ---- *************** *** 1087,1091 **** cfgTypeHasChanges=1 if cfgTypeHasChanges: - print configType,'- changed' idleConf.userCfg[configType].Save() self.ResetChangedItems() #clear the changed items dict --- 1084,1087 ----