From josh_robb@fastmail.fm Tue Oct 1 00:14:23 2002 From: josh_robb@fastmail.fm (Josh Robb) Date: Tue, 1 Oct 2002 01:14:23 +0200 Subject: [Idle-dev] Fw: Calltip's patch... Message-ID: <018901c268d7$28cbafd0$ed1c0b3e@aaa6kypxrpjb4c> This is a multi-part message in MIME format. ------=_NextPart_000_0186_01C268E7.E0739340 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Dam, dam, dam... sorry about that! Here's the attatchment. j. ------=_NextPart_000_0186_01C268E7.E0739340 Content-Type: application/octet-stream; name="calltip.diffs" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="calltip.diffs" Index: CallTips.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/idlefork/idle/CallTips.py,v retrieving revision 1.6 diff -c -r1.6 CallTips.py *** CallTips.py 15 Sep 2002 22:02:58 -0000 1.6 --- CallTips.py 30 Sep 2002 20:33:27 -0000 *************** *** 13,18 **** --- 13,28 ---- 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 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \ + '!"#$%&\'()*+,-/:;<=3D>?@[\\]^_`{|}~ = \t\n\r\x0b\x0c' + self.pattern =3D "" + =20 if hasattr(self.text, "make_calltip_window"): self._make_calltip_window =3D = self.text.make_calltip_window else: *************** *** 33,44 **** self.calltip =3D None =20 def paren_open_event(self, event): 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") self.calltip =3D self._make_calltip_window() ! self.calltip.showtip(arg_text) return "" #so the event is handled normally. =20 def paren_close_event(self, event): --- 43,56 ---- self.calltip =3D None =20 def paren_open_event(self, event): + self.member =3D None =20 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 [arg_text] ! self.calltip.showtip(list) return "" #so the event is handled normally. =20 def paren_close_event(self, event): *************** *** 47,52 **** --- 59,160 ---- self._remove_calltip_window() return "" #so the event is handled normally. =20 + def dot_check_event(self, event): + self._remove_calltip_window() + obj =3D self.get_object_at_cursor() +=20 + if obj: + names =3D dir(obj) + names.sort() + self.member =3D 'true' + self.members =3D [] + self.word =3D "" + self.line =3D 0 + for name in names: + if (name.find("__",0) =3D=3D 0): + pass + else: + subobj =3D getattr(obj, name) + if callable(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) +=20 + return "" #so the event is handled normally. =20 +=20 + # TODO: rename event? + def check_key_event(self, event): + if not self.member: + return "" + =20 + if self.calltip: + #TODO: customize keys. + if event.keysym =3D=3D 'space': + self._remove_calltip_window() + =20 + if self.sub_members: + first =3D len(self.word) + last =3D self.sub_members[self.line].rfind("(") + if last < 0: + last =3D len(self.sub_members[self.line]) + self.text.insert("insert", = self.sub_members[self.line][first:last]) + #TODO do we need to remove the calltip window? + return "break" + =20 + elif (self.wordchars.find(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 member.find(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. +=20 + def calltip_down_event(self, event): + if self.calltip: + if self.line < (len(self.sub_members) - 1): + self.line +=3D 1 + #TODO: can't we speed this up? + 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 calltip_up_event(self, event): + if self.calltip: + if self.line > 0: + self.line -=3D 1 + #TODO: can't we speed this up? + 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, Index: CallTipWindow.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/idlefork/idle/CallTipWindow.py,v retrieving revision 1.5 diff -c -r1.5 CallTipWindow.py *** CallTipWindow.py 23 Sep 2002 01:04:05 -0000 1.5 --- CallTipWindow.py 30 Sep 2002 20:33:27 -0000 *************** *** 12,30 **** self.id =3D None self.x =3D self.y =3D 0 =20 ! def showtip(self, text): # SF bug 546078: IDLE calltips cause application error. # There were crashes on various Windows flavors, and even a # crashing X server on Linux, with very long calltips. ! if len(text) >=3D 79: ! text =3D text[:75] + ' ...' ! self.text =3D text =20 ! if self.tipwindow or not self.text: return self.widget.see("insert") ! x, y, cx, cy =3D self.widget.bbox("insert") ! x =3D x + self.widget.winfo_rootx() + 2 y =3D y + cy + self.widget.winfo_rooty() self.tipwindow =3D tw =3D Toplevel(self.widget) tw.wm_overrideredirect(1) --- 12,54 ---- self.id =3D None self.x =3D self.y =3D 0 =20 ! def showtip(self, texts, xoffset=3D0, line=3D0, maxcount=3D10): # SF bug 546078: IDLE calltips cause application error. # There were crashes on various Windows flavors, and even a # crashing X server on Linux, with very long calltips. ! tmp =3D [] ! for text in texts: ! if len(text) >=3D 75: ! text =3D text[:75] + ' ...' ! tmp.append(text) ! texts =3D tmp =20 ! self.texts =3D texts # List of text strings ! if self.tipwindow or not self.texts: return + # Setup visible region + if maxcount < 0: + maxcount =3D 1 + first =3D 0 + last =3D len(self.texts) + if line > first: + first =3D line + if first > last: + first =3D last + if (last - first + 1) > maxcount: + last =3D first + maxcount +=20 + # Extract visible region + self.text =3D "\n".join(self.texts[first:last]) +=20 self.widget.see("insert") ! # To avoid incorrect values for cx take "insert - 1 chars" ! x, y, cx, cy =3D self.widget.bbox("insert - 1 chars") ! # Estimate current cursor position ! x =3D x + cx !=20 ! # Top left coordinates for the new toplevel widget ! x =3D x + cx*xoffset + self.widget.winfo_rootx() - 1=20 y =3D y + cy + self.widget.winfo_rooty() self.tipwindow =3D tw =3D Toplevel(self.widget) tw.wm_overrideredirect(1) *************** *** 68,77 **** text.bind("<>", self.calltip_hide) =20 text.focus_set() ! # root.mainloop() # not in idle =20 def calltip_show(self, event): ! self.calltip.showtip("Hello world") =20 def calltip_hide(self, event): self.calltip.hidetip() --- 92,101 ---- text.bind("<>", self.calltip_hide) =20 text.focus_set() ! root.mainloop() # not in idle =20 def calltip_show(self, event): ! self.calltip.showtip(["Hello world"]) =20 def calltip_hide(self, event): self.calltip.hidetip() Index: config-extensions.def =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/idlefork/idle/config-extensions.def,v retrieving revision 1.7 diff -c -r1.7 config-extensions.def *** config-extensions.def 14 Sep 2002 03:15:06 -0000 1.7 --- config-extensions.def 30 Sep 2002 20:33:27 -0000 *************** *** 47,52 **** --- 47,56 ---- paren-close=3D check-calltip-cancel=3D calltip-cancel=3D + dot-check=3D + check-key=3D + calltip-down=3D + calltip-up=3D =20 [ParenMatch] enable=3D0 ------=_NextPart_000_0186_01C268E7.E0739340-- From josh_robb@fastmail.fm Tue Oct 1 00:15:05 2002 From: josh_robb@fastmail.fm (Josh Robb) Date: Tue, 1 Oct 2002 01:15:05 +0200 Subject: [Idle-dev] EditorWindow.py: Add underlining to recent files list. Message-ID: <018d01c268d7$4722de40$ed1c0b3e@aaa6kypxrpjb4c> This is a multi-part message in MIME format. ------=_NextPart_000_018A_01C268E7.F9BC8190 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Ok, here's a patch to add quick keys to the recent files list... so that I can go, Alt-F, R, 1 to open the most recently used file on Recent Files list. Any thoughts? j. ------=_NextPart_000_018A_01C268E7.F9BC8190 Content-Type: application/octet-stream; name="recentfiles.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="recentfiles.diff" Index: EditorWindow.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.32 diff -c -r1.32 EditorWindow.py *** EditorWindow.py 26 Sep 2002 22:13:22 -0000 1.32 --- EditorWindow.py 30 Sep 2002 22:28:32 -0000 *************** *** 570,579 **** if rfList: for instance in self.top.instanceDict.keys(): instance.menuRecentFiles.delete(1,END) for file in rfList: fileName=3Dfile[0:-1] ! = instance.menuRecentFiles.add_command(label=3DfileName, ! = command=3Dinstance.__RecentFileCallback(fileName)) =20 def __CleanRecentFiles(self,rfList): origRfList=3DrfList[:] --- 575,589 ---- if rfList: for instance in self.top.instanceDict.keys(): instance.menuRecentFiles.delete(1,END) + ullist =3D = ('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H',= 'I','J') + i =3D 0 ; ul =3D 0; ullen =3D len(ullist) = =20 for file in rfList: fileName=3Dfile[0:-1] ! if i > ullen: # don't underline menuitems ! ul=3DNone ! = instance.menuRecentFiles.add_command(label=3Dullist[i] + " " + fileName, ! = command=3Dinstance.__RecentFileCallback(fileName), underline=3Dul) ! i +=3D 1 =20 def __CleanRecentFiles(self,rfList): origRfList=3DrfList[:] ------=_NextPart_000_018A_01C268E7.F9BC8190-- From josh_robb@fastmail.fm Tue Oct 1 00:19:06 2002 From: josh_robb@fastmail.fm (Josh Robb) Date: Tue, 1 Oct 2002 01:19:06 +0200 Subject: [Idle-dev] EditorWindow.py: Fix the wrap constant on the text widget Message-ID: <019901c268d7$c9aada70$ed1c0b3e@aaa6kypxrpjb4c> This is a multi-part message in MIME format. ------=_NextPart_000_0196_01C268E8.89603440 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Does what it says... fixes a case problem. For me this was a regression from idle-python to idle-fork. I never want this behavior in a file editor window. Maybe it should be configurable in the future but for now at least it should go back to a sane default. (One day i'll get a chance to look at the configuration system but not yet). j. ------=_NextPart_000_0196_01C268E8.89603440 Content-Type: application/octet-stream; name="wrap.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="wrap.diff" Index: EditorWindow.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.32 diff -c -r1.32 EditorWindow.py *** EditorWindow.py 26 Sep 2002 22:13:22 -0000 1.32 --- EditorWindow.py 30 Sep 2002 22:28:32 -0000 *************** *** 61,67 **** self.break_set =3D False self.vbar =3D vbar =3D Scrollbar(top, name=3D'vbar') self.text_frame =3D text_frame =3D Frame(top) ! self.text =3D text =3D Text(text_frame, name=3D'text', = padx=3D5, wrap=3DNone, foreground=3DidleConf.GetHighlight(currentTheme, 'normal',fgBg=3D'fg'), background=3DidleConf.GetHighlight(currentTheme, --- 61,67 ---- self.break_set =3D False self.vbar =3D vbar =3D Scrollbar(top, name=3D'vbar') self.text_frame =3D text_frame =3D Frame(top) ! self.text =3D text =3D Text(text_frame, name=3D'text', = padx=3D5, wrap=3DNONE, foreground=3DidleConf.GetHighlight(currentTheme, 'normal',fgBg=3D'fg'), background=3DidleConf.GetHighlight(currentTheme, ------=_NextPart_000_0196_01C268E8.89603440-- From josh_robb@fastmail.fm Tue Oct 1 00:23:37 2002 From: josh_robb@fastmail.fm (Josh Robb) Date: Tue, 1 Oct 2002 01:23:37 +0200 Subject: [Idle-dev] EditorWindow.py: Fix the help_url discovery Message-ID: <01a601c268d8$6b830b10$ed1c0b3e@aaa6kypxrpjb4c> This is a multi-part message in MIME format. ------=_NextPart_000_01A3_01C268E9.2B1E7440 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit * EditorWindow.py: Fix the help_url discovery code on Win98. (Improves on Patch #470637 by using pydoc logic). There is already a patch to do this in the patch manager which is identical to my origional solution to this problem. However during the writing of the online help system (patch coming) i discovered that this code already exists in the pydoc module. This code works on UNIX/Windows i have no idea if it works on Mac but if it doesn't it should be fixed in pydoc which needs this logic anyway. Thoughts? j. ------=_NextPart_000_01A3_01C268E9.2B1E7440 Content-Type: application/octet-stream; name="help_url.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="help_url.diff" Index: EditorWindow.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.32 diff -c -r1.32 EditorWindow.py *** EditorWindow.py 26 Sep 2002 22:13:22 -0000 1.32 --- EditorWindow.py 30 Sep 2002 22:28:32 -0000 *************** *** 290,319 **** def help_dialog(self, event=3DNone): = fn=3Dos.path.join(os.path.abspath(os.path.dirname(__file__)),'help.txt') textView.TextViewer(self.top,'Help',fn) =20 ! =20 ! help_url =3D "http://www.python.org/doc/current/" ! if sys.platform[:3] =3D=3D "win": ! fn =3D os.path.dirname(__file__) ! fn =3D os.path.join(fn, os.pardir, os.pardir, "pythlp.chm") ! fn =3D os.path.normpath(fn) ! if os.path.isfile(fn): ! help_url =3D fn ! else: ! fn =3D os.path.dirname(__file__) ! fn =3D os.path.join(fn, os.pardir, os.pardir, "Doc", = "index.html") ! fn =3D os.path.normpath(fn) ! if os.path.isfile(fn): ! help_url =3D fn ! del fn ! def python_docs(self, event=3DNone): ! os.startfile(self.help_url) else: ! def python_docs(self, event=3DNone): ! self.display_docs(self.help_url) =20 def display_docs(self, url): webbrowser.open(url) =20 def cut(self,event): self.text.event_generate("<>") return "break" --- 290,324 ---- def help_dialog(self, event=3DNone): = fn=3Dos.path.join(os.path.abspath(os.path.dirname(__file__)),'help.txt') textView.TextViewer(self.top,'Help',fn) =20 !=20 ! ## TODO help_url should be user configurable ! ## first time we should ask for location if we can't figure it out = automagically. !=20 ! #Ka-Ping & co have already figured out how to do this. ! import pydoc ! dirroot =3D pydoc.Helper(None, None).docdir ! fn =3D os.path.join(dirroot, "index.html") ! if os.path.isfile(fn): ! help_url =3D fn else: ! help_url =3D "http://www.python.org/doc/current/" ! del pydoc, fn, dirroot =20 def display_docs(self, url): webbrowser.open(url) =20 + if sys.platform[:3] =3D=3D "win": + dirroot =3D os.path.dirname(sys.executable) + fn =3D os.path.join(dirroot, "pythlp.chm") + if os.path.isfile(fn): + help_url =3D fn + def display_docs(self, url): + os.startfile(url) + del fn, dirroot +=20 + def python_docs(self, event=3DNone): + self.display_docs(self.help_url) +=20 def cut(self,event): self.text.event_generate("<>") return "break" ------=_NextPart_000_01A3_01C268E9.2B1E7440-- From josh_robb@fastmail.fm Tue Oct 1 00:53:56 2002 From: josh_robb@fastmail.fm (Josh Robb) Date: Tue, 1 Oct 2002 01:53:56 +0200 Subject: [Idle-dev] Windowlist.py... force quit after last window closed. Message-ID: <023701c268dc$a7112e10$ed1c0b3e@aaa6kypxrpjb4c> This is a multi-part message in MIME format. ------=_NextPart_000_0232_01C268ED.66DEF1E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Sometimes on Windows 98 Idle fails to terminate the mainloop if all the windows are closed. I.e. no more TKinter windows are visable but you are left with a python.exe dos box running. There is no good way of terminating this on Wind98 because ^c does nothing and the task manager is very rudimentry. I have been running this change on my Win98 box since my first day runing idlefork with out any problems. Mainly because waiting for the python process to be killed was _really_ annoying! j. ------=_NextPart_000_0232_01C268ED.66DEF1E0 Content-Type: application/octet-stream; name="windowlist.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="windowlist.diff" Index: WindowList.py =================================================================== RCS file: /cvsroot/idlefork/idle/WindowList.py,v retrieving revision 1.3 diff -c -r1.3 WindowList.py *** WindowList.py 12 Jul 2001 05:35:17 -0000 1.3 --- WindowList.py 30 Sep 2002 23:49:31 -0000 *************** *** 67,72 **** --- 67,77 ---- def destroy(self): registry.delete(self) Toplevel.destroy(self) + + ## if this is the last idle window then quit the mainloop.. + ## cause ^c doesn't work on Windows 98. + if not registry.dict: + self.quit() def get_title(self): # Subclass can override ------=_NextPart_000_0232_01C268ED.66DEF1E0-- From noreply@sourceforge.net Tue Oct 1 01:33:35 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 30 Sep 2002 17:33:35 -0700 Subject: [Idle-dev] [ idlefork-Patches-610763 ] Extension to Calltips / Show attributes Message-ID: Patches item #610763, was opened at 2002-09-17 15:16 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=610763&group_id=9579 Category: None Group: None Status: Open Resolution: Accepted Priority: 5 Submitted By: Neal Norwitz (nnorwitz) >Assigned to: Kurt B. Kaiser (kbk) Summary: Extension to Calltips / Show attributes Initial Comment: See http://python.org/sf/525109 just don't want to lose track of it, if it's desirable in idlefork. ---------------------------------------------------------------------- >Comment By: Kurt B. Kaiser (kbk) Date: 2002-09-30 19:33 Message: Logged In: YES user_id=149084 Add Martin Liebmans' Patch from Python-Idle Patch 525109 ---------------------------------------------------------------------- Comment By: Kurt B. Kaiser (kbk) Date: 2002-09-19 09:36 Message: Logged In: YES user_id=149084 >From Martin Liebman's Python-idle patch: "Extension to Calltips / Show attributes The attached files (unified diff files) implement a (quick and dirty but usefull) extension to IDLE 0.8 (Python 2.2) - Tested on WINDOWS 95/98/NT/2000 - Similar to "CallTips" this extension shows (context sensitive) all available member functions and attributes of the current object after hitting the 'dot'-key. The toplevel help widget now supports scrolling. (Key- Up and Key-Down events) ...that is why I changed among else the first argument of 'showtip' from 'text string' to a 'list of text strings' ... The 'space'-key is used to insert the topmost item of the help widget into an IDLE text window. ...the even handling seems to be a critical part of the current IDLE implementation. That is why I added the new functionallity as a patch of CallTips.py and CallTipWindow.py. May be you still have a better implementation ... Greetings Martin Liebmann " See also Idle-dev 02Mar02. Files left on Python Patches for now. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=610763&group_id=9579 From kbk@shore.net Tue Oct 1 03:58:30 2002 From: kbk@shore.net (Kurt B. Kaiser) Date: 30 Sep 2002 22:58:30 -0400 Subject: [Idle-dev] Patches Submitted to Idlefork Message-ID: Hi Josh, Please open Idlefork Tracker patches for the three EditorWindow patches and the WindowList patch and upload the files to Tracker. That way they won't get lost and the discussion is properly channeled. The CallTip patch is a special case. Normally, it should be offered as a patch to Martin Liebman's contibution. In other words, apply his patch to your copy of CVS, save the result locally as A , add your mods resulting in B, prepare a diff -c A B and post to Tracker. However, his patch is stale, especially with the new config system, and even after correcting the 0D 0A line endings would have to applied manually. I gave it a shot but it's not worth the effort and you have done it already. It would be well if you could figure out a way of properly crediting Martin's part of the work when you submit your patch to Tracker. Thanks for the patches!! KBK From noreply@sourceforge.net Tue Oct 1 17:10:03 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 01 Oct 2002 09:10:03 -0700 Subject: [Idle-dev] [ idlefork-Patches-617097 ] EditorWindow.py: underline recent files Message-ID: Patches item #617097, was opened at 2002-10-01 18:10 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=617097&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Josh Robb (josh_robb) Assigned to: Nobody/Anonymous (nobody) Summary: EditorWindow.py: underline recent files Initial Comment: EditorWindow.py: Add underlining to recent files list. Here's a patch to add quick keys to the recent files list... so that I can go, Alt-F, R, 1 to open the most recently used file on Recent Files list. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=617097&group_id=9579 From noreply@sourceforge.net Tue Oct 1 17:24:45 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 01 Oct 2002 09:24:45 -0700 Subject: [Idle-dev] [ idlefork-Patches-617109 ] WindowList.py: fix win98 quit. Message-ID: Patches item #617109, was opened at 2002-10-01 18:24 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=617109&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Josh Robb (josh_robb) Assigned to: Nobody/Anonymous (nobody) Summary: WindowList.py: fix win98 quit. Initial Comment: WindowList.py: when the last idle window is closed quit() the mainloop. Sometimes on Windows 98 Idle fails to terminate the mainloop if all the windows are closed. I.e. no more TKinter windows are visable but you are left with a python.exe dos box running. There is no good way of terminating this on Wind98 because ^c does nothing and the task manager is very rudimentry. I have been running this change on my Win98 box since my first day runing idlefork with out any problems. Mainly because waiting for the python process to be killed was _really_ annoying! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=617109&group_id=9579 From noreply@sourceforge.net Tue Oct 1 18:02:52 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 01 Oct 2002 10:02:52 -0700 Subject: [Idle-dev] [ idlefork-Patches-617125 ] EditorWindow.py: Fix the wrap Message-ID: Patches item #617125, was opened at 2002-10-01 19:02 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=617125&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Josh Robb (josh_robb) Assigned to: Nobody/Anonymous (nobody) Summary: EditorWindow.py: Fix the wrap Initial Comment: EditorWindow.py: Fix the wrap constant on the text widget so that text is not wraped. this was a regression from idle-python to idle-fork. Maybe it should be configurable in the future but for now at least it should go back to a sane default. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=617125&group_id=9579 From noreply@sourceforge.net Tue Oct 1 18:08:07 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 01 Oct 2002 10:08:07 -0700 Subject: [Idle-dev] [ idlefork-Patches-470637 ] better doc path on windows Message-ID: Patches item #470637, was opened at 2001-10-12 19:21 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=470637&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 7 Submitted By: Bruce Sherwood (bsherwood) Assigned to: Nobody/Anonymous (nobody) Summary: better doc path on windows Initial Comment: In EditorWindow.py, I suggest a better path to the documentation on Windows. The old way is commented out below; it says to start from where EditorWindow.py is located, come up two parent levels, then go down to \Doc\index.html. This works fine as long as idle is in Python21\Tools, but would not work if idle were in some arbitrary location. if sys.platform[:3] == "win": fn = os.path.split(sys.executable)[0] +'\Doc\index.html' ## fn = os.path.dirname(__file__) ## fn = os.path.join(fn, os.pardir, os.pardir, "Doc", "index.html") ## fn = os.path.normpath(fn) ---------------------------------------------------------------------- Comment By: Josh Robb (josh_robb) Date: 2002-10-01 19:08 Message: Logged In: YES user_id=614376 During the writing of the online help system (patch coming) i discovered that this code already exists in the pydoc module. This code works on UNIX/Windows i have no idea if it works on Mac but if it doesn't it should be fixed in pydoc which needs this logic anyway. ---------------------------------------------------------------------- Comment By: Kurt B. Kaiser (kbk) Date: 2002-09-23 04:56 Message: Logged In: YES user_id=149084 Stephen Gava made some improvements in Rev 1.23 which added pythlp.chm support for the win platform. (22Apr2002) PEP 250 standardizes the location of Idle on Windows but the canonical location of the docs requires investigation. Also, EditorWindow does not handle locally installed html docs on other platforms, e.g. Linux. It accesses the mother ship. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=470637&group_id=9579 From noreply@sourceforge.net Tue Oct 1 18:09:58 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 01 Oct 2002 10:09:58 -0700 Subject: [Idle-dev] [ idlefork-Patches-470637 ] better doc path on windows Message-ID: Patches item #470637, was opened at 2001-10-12 19:21 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=470637&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 7 Submitted By: Bruce Sherwood (bsherwood) Assigned to: Nobody/Anonymous (nobody) Summary: better doc path on windows Initial Comment: In EditorWindow.py, I suggest a better path to the documentation on Windows. The old way is commented out below; it says to start from where EditorWindow.py is located, come up two parent levels, then go down to \Doc\index.html. This works fine as long as idle is in Python21\Tools, but would not work if idle were in some arbitrary location. if sys.platform[:3] == "win": fn = os.path.split(sys.executable)[0] +'\Doc\index.html' ## fn = os.path.dirname(__file__) ## fn = os.path.join(fn, os.pardir, os.pardir, "Doc", "index.html") ## fn = os.path.normpath(fn) ---------------------------------------------------------------------- Comment By: Josh Robb (josh_robb) Date: 2002-10-01 19:09 Message: Logged In: YES user_id=614376 How do you add a patch attatchment to an existing issue? Index: EditorWindow.py =============================================== ==================== RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.32 diff -c -r1.32 EditorWindow.py *** EditorWindow.py 26 Sep 2002 22:13:22 -0000 1.32 --- EditorWindow.py 30 Sep 2002 22:28:32 -0000 *************** *** 290,319 **** def help_dialog(self, event=None): fn=os.path.join(os.path.abspath(os.path.dirname (__file__)),'help.txt') textView.TextViewer(self.top,'Help',fn) ! ! help_url = "http://www.python.org/doc/current/" ! if sys.platform[:3] == "win": ! fn = os.path.dirname(__file__) ! fn = os.path.join(fn, os.pardir, os.pardir, "pythlp.chm") ! fn = os.path.normpath(fn) ! if os.path.isfile(fn): ! help_url = fn ! else: ! fn = os.path.dirname(__file__) ! fn = os.path.join(fn, os.pardir, os.pardir, "Doc", "index.html") ! fn = os.path.normpath(fn) ! if os.path.isfile(fn): ! help_url = fn ! del fn ! def python_docs(self, event=None): ! os.startfile(self.help_url) else: ! def python_docs(self, event=None): ! self.display_docs(self.help_url) def display_docs(self, url): webbrowser.open(url) def cut(self,event): self.text.event_generate("<>") return "break" --- 290,324 ---- def help_dialog(self, event=None): fn=os.path.join(os.path.abspath(os.path.dirname (__file__)),'help.txt') textView.TextViewer(self.top,'Help',fn) ! ! ## TODO help_url should be user configurable ! ## first time we should ask for location if we can't figure it out automagically. ! ! #Ka-Ping & co have already figured out how to do this. ! import pydoc ! dirroot = pydoc.Helper(None, None).docdir ! fn = os.path.join(dirroot, "index.html") ! if os.path.isfile(fn): ! help_url = fn else: ! help_url = "http://www.python.org/doc/current/" ! del pydoc, fn, dirroot def display_docs(self, url): webbrowser.open(url) + if sys.platform[:3] == "win": + dirroot = os.path.dirname(sys.executable) + fn = os.path.join(dirroot, "pythlp.chm") + if os.path.isfile(fn): + help_url = fn + def display_docs(self, url): + os.startfile(url) + del fn, dirroot + + def python_docs(self, event=None): + self.display_docs(self.help_url) + def cut(self,event): self.text.event_generate("<>") return "break" ---------------------------------------------------------------------- Comment By: Josh Robb (josh_robb) Date: 2002-10-01 19:08 Message: Logged In: YES user_id=614376 During the writing of the online help system (patch coming) i discovered that this code already exists in the pydoc module. This code works on UNIX/Windows i have no idea if it works on Mac but if it doesn't it should be fixed in pydoc which needs this logic anyway. ---------------------------------------------------------------------- Comment By: Kurt B. Kaiser (kbk) Date: 2002-09-23 04:56 Message: Logged In: YES user_id=149084 Stephen Gava made some improvements in Rev 1.23 which added pythlp.chm support for the win platform. (22Apr2002) PEP 250 standardizes the location of Idle on Windows but the canonical location of the docs requires investigation. Also, EditorWindow does not handle locally installed html docs on other platforms, e.g. Linux. It accesses the mother ship. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=470637&group_id=9579 From kbk@users.sourceforge.net Fri Oct 4 22:34:01 2002 From: kbk@users.sourceforge.net (Kurt B. Kaiser) Date: Fri, 04 Oct 2002 14:34:01 -0700 Subject: [Idle-dev] CVS: idle EditorWindow.py,1.32,1.33 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv6625 Modified Files: EditorWindow.py Log Message: Apply Josh Robb's Patch [ 617125 ] EditorWindow.py: Fix the wrap (used 'none' instead of NONE) Index: EditorWindow.py =================================================================== RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** EditorWindow.py 26 Sep 2002 22:13:22 -0000 1.32 --- EditorWindow.py 4 Oct 2002 21:33:57 -0000 1.33 *************** *** 62,66 **** self.vbar = vbar = Scrollbar(top, name='vbar') self.text_frame = text_frame = Frame(top) ! self.text = text = Text(text_frame, name='text', padx=5, wrap=None, foreground=idleConf.GetHighlight(currentTheme, 'normal',fgBg='fg'), --- 62,66 ---- self.vbar = vbar = Scrollbar(top, name='vbar') self.text_frame = text_frame = Frame(top) ! self.text = text = Text(text_frame, name='text', padx=5, wrap='none', foreground=idleConf.GetHighlight(currentTheme, 'normal',fgBg='fg'), From noreply@sourceforge.net Fri Oct 4 22:36:00 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Fri, 04 Oct 2002 14:36:00 -0700 Subject: [Idle-dev] [ idlefork-Patches-617125 ] EditorWindow.py: Fix the wrap Message-ID: Patches item #617125, was opened at 2002-10-01 12:02 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=617125&group_id=9579 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Josh Robb (josh_robb) >Assigned to: Kurt B. Kaiser (kbk) Summary: EditorWindow.py: Fix the wrap Initial Comment: EditorWindow.py: Fix the wrap constant on the text widget so that text is not wraped. this was a regression from idle-python to idle-fork. Maybe it should be configurable in the future but for now at least it should go back to a sane default. ---------------------------------------------------------------------- >Comment By: Kurt B. Kaiser (kbk) Date: 2002-10-04 16:36 Message: Logged In: YES user_id=149084 Used 'none' instead of NONE as that appears more consistent with Tkinter.py ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=617125&group_id=9579 From kbk@users.sourceforge.net Fri Oct 4 22:54:43 2002 From: kbk@users.sourceforge.net (Kurt B. Kaiser) Date: Fri, 04 Oct 2002 14:54:43 -0700 Subject: [Idle-dev] CVS: idle WindowList.py,1.3,1.4 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv13975 Modified Files: WindowList.py Log Message: Josh Robb's Patch [ 617109 ] WindowList.py: fix win98 quit. Index: WindowList.py =================================================================== RCS file: /cvsroot/idlefork/idle/WindowList.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** WindowList.py 12 Jul 2001 05:35:17 -0000 1.3 --- WindowList.py 4 Oct 2002 21:54:41 -0000 1.4 *************** *** 68,71 **** --- 68,75 ---- registry.delete(self) Toplevel.destroy(self) + # If this is Idle's last window then quit the mainloop + # (Needed for clean exit on Windows 98) + if not registry.dict: + self.quit() def get_title(self): From noreply@sourceforge.net Fri Oct 4 22:56:20 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Fri, 04 Oct 2002 14:56:20 -0700 Subject: [Idle-dev] [ idlefork-Patches-617109 ] WindowList.py: fix win98 quit. Message-ID: Patches item #617109, was opened at 2002-10-01 11:24 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=617109&group_id=9579 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Josh Robb (josh_robb) >Assigned to: Kurt B. Kaiser (kbk) Summary: WindowList.py: fix win98 quit. Initial Comment: WindowList.py: when the last idle window is closed quit() the mainloop. Sometimes on Windows 98 Idle fails to terminate the mainloop if all the windows are closed. I.e. no more TKinter windows are visable but you are left with a python.exe dos box running. There is no good way of terminating this on Wind98 because ^c does nothing and the task manager is very rudimentry. I have been running this change on my Win98 box since my first day runing idlefork with out any problems. Mainly because waiting for the python process to be killed was _really_ annoying! ---------------------------------------------------------------------- >Comment By: Kurt B. Kaiser (kbk) Date: 2002-10-04 16:56 Message: Logged In: YES user_id=149084 WindowList.py 1.4 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=617109&group_id=9579 From kbk@users.sourceforge.net Sun Oct 6 02:57:48 2002 From: kbk@users.sourceforge.net (Kurt B. Kaiser) Date: Sat, 05 Oct 2002 18:57:48 -0700 Subject: [Idle-dev] CVS: idle EditorWindow.py,1.33,1.34 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv26116 Modified Files: EditorWindow.py Log Message: Apply Josh Robb's Patch: [ 617097 ] EditorWindow.py: underline recent files Added a couple of mods to reduce the indentation level. Note that the recent files menu doesn't update until Idle is restarted, pre-existing bug, at least on Linux. Index: EditorWindow.py =================================================================== RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** EditorWindow.py 4 Oct 2002 21:33:57 -0000 1.33 --- EditorWindow.py 6 Oct 2002 01:57:45 -0000 1.34 *************** *** 568,578 **** #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): --- 568,586 ---- #print self.top.instanceDict #print self + ullist = "1234567890ABCDEFGHIJ" if rfList: for instance in self.top.instanceDict.keys(): ! menu = instance.menuRecentFiles ! menu.delete(1,END) ! i = 0 ; ul = 0; ullen = len(ullist) for file in rfList: fileName=file[0:-1] ! callback = instance.__RecentFileCallback(fileName) ! if i > ullen: # don't underline menuitems ! ul=None ! menu.add_command(label=ullist[i] + " " + fileName, ! command=callback, ! underline=ul) ! i += 1 def __CleanRecentFiles(self,rfList): From noreply@sourceforge.net Sun Oct 6 02:59:01 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Sat, 05 Oct 2002 18:59:01 -0700 Subject: [Idle-dev] [ idlefork-Patches-617097 ] EditorWindow.py: underline recent files Message-ID: Patches item #617097, was opened at 2002-10-01 11:10 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=617097&group_id=9579 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Josh Robb (josh_robb) >Assigned to: Kurt B. Kaiser (kbk) Summary: EditorWindow.py: underline recent files Initial Comment: EditorWindow.py: Add underlining to recent files list. Here's a patch to add quick keys to the recent files list... so that I can go, Alt-F, R, 1 to open the most recently used file on Recent Files list. ---------------------------------------------------------------------- >Comment By: Kurt B. Kaiser (kbk) Date: 2002-10-05 20:59 Message: Logged In: YES user_id=149084 EditorWindow.py Rev 1.34 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=617097&group_id=9579 From noreply@sourceforge.net Sun Oct 6 03:01:21 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Sat, 05 Oct 2002 19:01:21 -0700 Subject: [Idle-dev] [ idlefork-Patches-610329 ] Forwardport tempfile.py Interface Message-ID: Patches item #610329, was opened at 2002-09-16 22:23 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=610329&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Kurt B. Kaiser (kbk) Assigned to: Kurt B. Kaiser (kbk) >Summary: Forwardport tempfile.py Interface Initial Comment: Attached patch must be integrated into IOBinding.py to track Python 2.3 Idle. Since Idlefork is intended to run under Python 2.2 it will not be merged at this time. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=610329&group_id=9579 From noreply@sourceforge.net Sun Oct 6 03:18:08 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Sat, 05 Oct 2002 19:18:08 -0700 Subject: [Idle-dev] [ idlefork-Bugs-619127 ] Recent Files Menu Not Updating Message-ID: Bugs item #619127, was opened at 2002-10-05 21:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=619127&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Kurt B. Kaiser (kbk) Assigned to: Nobody/Anonymous (nobody) Summary: Recent Files Menu Not Updating Initial Comment: Idle must be restarted to update the recent files submenu. Linux 2.2 Python 2.2.1 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=619127&group_id=9579 From noreply@sourceforge.net Mon Oct 7 06:06:35 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Sun, 06 Oct 2002 22:06:35 -0700 Subject: [Idle-dev] [ idlefork-Bugs-619511 ] Calltips Not Functioning Message-ID: Bugs item #619511, was opened at 2002-10-07 00:06 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=619511&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Kurt B. Kaiser (kbk) Assigned to: Kurt B. Kaiser (kbk) Summary: Calltips Not Functioning Initial Comment: CallTips aren't working because the identifiers are being looked up in the main process __main__.__dict__ when they should be looked up in the subprocess. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=619511&group_id=9579 From noreply@sourceforge.net Mon Oct 7 06:11:11 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Sun, 06 Oct 2002 22:11:11 -0700 Subject: [Idle-dev] [ idlefork-Bugs-542764 ] Error message in Shell on run Message-ID: Bugs item #542764, was opened at 2002-04-11 19:29 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=542764&group_id=9579 Category: None Group: None >Status: Closed >Resolution: Out of Date Priority: 5 Submitted By: Michael Williams (mikewilliams) Assigned to: Nobody/Anonymous (nobody) Summary: Error message in Shell on run Initial Comment: Hi, I'm getting the following error message in the Interactive shell (if one is open) when I run a module for which an output window does not already exist. If the output exists then no such error. This doesn't actually seem to do anything (apart from echo the error to Shell) so it's no big problem - just disconcerting for users I guess. I know no Tk(inter) and limited Python so was unable to establish the cause of this: None {: None, : None, : None}Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 1292, in __call__ return apply(self.func, args) File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 436, in callit apply(func, args) File "/home/mw/bin/idle/OutputWindow.py", line 86, in set_line_and_column if (self.text.compare(index, ">", "endmark")): File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 2651, in compare return self.tk.getboolean(self.tk.call( TclError: expected boolean value but got "" This is on Python 2.2.1c1 in Debian Linux with an idlefork CVS grabbed 2002-04-11 with Tk and Tkinter 8.3. ---------------------------------------------------------------------- >Comment By: Kurt B. Kaiser (kbk) Date: 2002-10-07 00:11 Message: Logged In: YES user_id=149084 Not applicable to GRPC version. ---------------------------------------------------------------------- Comment By: Stephen M. Gava (elguavas) Date: 2002-05-19 22:03 Message: Logged In: YES user_id=75867 I can reproduce this with 2.2.1 final and latest cvs also under linux. Confirm it to be non-fatal. Will look into it when I get a chance. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=542764&group_id=9579 From kbk@users.sourceforge.net Thu Oct 10 09:25:26 2002 From: kbk@users.sourceforge.net (Kurt B. Kaiser) Date: Thu, 10 Oct 2002 01:25:26 -0700 Subject: [Idle-dev] CVS: idle CallTips.py,1.6,1.7 PyShell.py,1.28,1.29 rpc.py,1.7,1.8 run.py,1.7,1.8 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv19190 Modified Files: CallTips.py PyShell.py rpc.py run.py Log Message: M CallTips.py Add support for getting calltip from subprocess, refactor a bit and clean up. M PyShell.py Cosmetic changes, delete blank lines, add # on some blank lines. M rpc.py Add more debugging capability M run.py Add support for getting calltip from subprocess Move import statements Index: CallTips.py =================================================================== RCS file: /cvsroot/idlefork/idle/CallTips.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** CallTips.py 15 Sep 2002 22:02:58 -0000 1.6 --- CallTips.py 10 Oct 2002 08:25:24 -0000 1.7 *************** *** 1,8 **** ! # CallTips.py - An IDLE extension that provides "Call Tips" - ie, a floating window that ! # displays parameter information as you open parens. import string import types class CallTips: --- 1,18 ---- ! """CallTips.py - An IDLE Extension to Jog Your Memory + Call Tips are floating windows which display function/method parameter + information as you open the parameter parenthesis, and which disappear when you + type the closing parenthesis. Future plans include extending the functionality + to include class attributes. + + """ + import sys import string import types + import CallTipWindow + + import __main__ + class CallTips: *************** *** 10,29 **** ] ! def __init__(self, editwin): self.editwin = editwin self.text = editwin.text self.calltip = None ! if hasattr(self.text, "make_calltip_window"): ! self._make_calltip_window = self.text.make_calltip_window ! else: ! self._make_calltip_window = self._make_tk_calltip_window def close(self): self._make_calltip_window = 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) --- 20,37 ---- ] ! def __init__(self, editwin=None): ! if editwin == None: # subprocess and test ! self.editwin = None ! return self.editwin = editwin self.text = editwin.text self.calltip = None ! self._make_calltip_window = self._make_tk_calltip_window def close(self): self._make_calltip_window = None def _make_tk_calltip_window(self): ! # See __init__ for usage return CallTipWindow.CallTip(self.text) *************** *** 35,39 **** def paren_open_event(self, event): self._remove_calltip_window() ! arg_text = get_arg_text(self.get_object_at_cursor()) if arg_text: self.calltip_start = self.text.index("insert") --- 43,48 ---- def paren_open_event(self, event): self._remove_calltip_window() ! name = self.get_name_at_cursor() ! arg_text = self.fetch_tip(name) if arg_text: self.calltip_start = self.text.index("insert") *************** *** 54,58 **** # (Later need to be smarter about multi-line, etc) if self.text.compare("insert", "<=", self.calltip_start) or \ ! self.text.compare("insert", ">", self.calltip_start + " lineend"): self._remove_calltip_window() return "" #so the event is handled normally. --- 63,68 ---- # (Later need to be smarter about multi-line, etc) if self.text.compare("insert", "<=", self.calltip_start) or \ ! self.text.compare("insert", ">", self.calltip_start ! + " lineend"): self._remove_calltip_window() return "" #so the event is handled normally. *************** *** 62,88 **** return "" #so the event is handled normally. ! def get_object_at_cursor(self, ! wordchars="._" + string.ascii_letters + string.digits): ! # Usage of ascii_letters is necessary to avoid UnicodeErrors ! # if chars contains non-ASCII. ! ! # XXX - This needs to be moved to a better place ! # so the "." attribute lookup code can also use it. ! text = self.text ! chars = text.get("insert linestart", "insert") ! i = len(chars) ! while i and chars[i-1] in wordchars: ! i = i-1 ! word = chars[i:] ! if word: ! # How is this for a hack! ! import sys, __main__ namespace = 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): --- 72,103 ---- return "" #so the event is handled normally. ! __IDCHARS = "._" + string.ascii_letters + string.digits ! ! def get_name_at_cursor(self): ! idchars = self.__IDCHARS ! str = self.text.get("insert linestart", "insert") ! i = len(str) ! while i and str[i-1] in idchars: ! i -= 1 ! return str[i:] ! ! def fetch_tip(self, name): ! interp = self.editwin and self.editwin.flist.pyshell.interp ! rpcclt = interp and interp.rpcclt ! if rpcclt: ! return rpcclt.remotecall("exec", "get_the_calltip", ! (name,), {}) ! else: ! entity = self.get_entity(name) ! return get_arg_text(entity) ! ! def get_entity(self, name): ! if name: namespace = sys.modules.copy() namespace.update(__main__.__dict__) try: ! return eval(name, namespace) except: ! return None def _find_constructor(class_ob): *************** *** 143,147 **** argText += "\n" argText += doc[:pos] - return argText --- 158,161 ---- *************** *** 169,184 **** def t6(self, a, b=None, *args, **kw): "(a, b=None, ..., ***)" ! def test( tests ): failed=[] for t in tests: expected = t.__doc__ + "\n" + t.__doc__ ! if get_arg_text(t) != 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 = TC() ! tests = t1, t2, t3, t4, t5, t6, \ ! TC, tc.t1, tc.t2, tc.t3, tc.t4, tc.t5, tc.t6 test(tests) --- 183,202 ---- def t6(self, a, b=None, *args, **kw): "(a, b=None, ..., ***)" ! def test(tests): ! ct = CallTips() failed=[] for t in tests: expected = t.__doc__ + "\n" + t.__doc__ ! name = t.__name__ ! arg_text = ct.fetch_tip(name) ! if arg_text != expected: failed.append(t) ! print "%s - expected %s, but got %s" % (t, expected, ! get_arg_text(entity)) print "%d of %d tests failed" % (len(failed), len(tests)) tc = TC() ! tests = (t1, t2, t3, t4, t5, t6, ! TC, tc.t1, tc.t2, tc.t3, tc.t4, tc.t5, tc.t6) test(tests) Index: PyShell.py =================================================================== RCS file: /cvsroot/idlefork/idle/PyShell.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** PyShell.py 29 Sep 2002 00:34:10 -0000 1.28 --- PyShell.py 10 Oct 2002 08:25:24 -0000 1.29 *************** *** 415,419 **** display_executing_dialog() return - # self.checklinecache() if self.save_warnings_filters is not None: --- 415,418 ---- *************** *** 426,430 **** (code,), {}) return - # try: self.tkconsole.beginexecuting() --- 425,428 ---- *************** *** 445,449 **** except: self.showtraceback() - # finally: self.tkconsole.endexecuting() --- 443,446 ---- *************** *** 481,492 **** root.withdraw() flist = PyShellFileList(root) ! OutputWindow.__init__(self, flist, None, None) ! import __builtin__ __builtin__.quit = __builtin__.exit = "To exit, type Ctrl-D." ! self.config(usetabs=1, indentwidth=8, context_use_ps1=1) ! text = self.text text.configure(wrap="char") --- 478,489 ---- root.withdraw() flist = PyShellFileList(root) ! # OutputWindow.__init__(self, flist, None, None) ! # import __builtin__ __builtin__.quit = __builtin__.exit = "To exit, type Ctrl-D." ! # self.config(usetabs=1, indentwidth=8, context_use_ps1=1) ! # text = self.text text.configure(wrap="char") *************** *** 500,504 **** text.bind("<>", self.flist.open_shell) text.bind("<>", self.toggle_jit_stack_viewer) ! self.save_stdout = sys.stdout self.save_stderr = sys.stderr --- 497,501 ---- text.bind("<>", self.flist.open_shell) text.bind("<>", self.toggle_jit_stack_viewer) ! # self.save_stdout = sys.stdout self.save_stderr = sys.stderr *************** *** 511,517 **** sys.stderr = self.stderr sys.stdin = self ! self.history = self.History(self.text) ! if use_subprocess: self.interp.start_subprocess() --- 508,514 ---- sys.stderr = self.stderr sys.stdin = self ! # self.history = self.History(self.text) ! # if use_subprocess: self.interp.start_subprocess() Index: rpc.py =================================================================== RCS file: /cvsroot/idlefork/idle/rpc.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** rpc.py 25 Aug 2002 14:08:07 -0000 1.7 --- rpc.py 10 Oct 2002 08:25:24 -0000 1.8 *************** *** 178,184 **** self.debug("remotecall:", oid, methodname, args, kwargs) seq = self.asynccall(oid, methodname, args, kwargs) ! return self.asyncreturn(seq) def asynccall(self, oid, methodname, args, kwargs): request = ("call", (oid, methodname, args, kwargs)) seq = self.putrequest(request) --- 178,187 ---- self.debug("remotecall:", oid, methodname, args, kwargs) seq = self.asynccall(oid, methodname, args, kwargs) ! ret = self.asyncreturn(seq) ! self.debug("return:", ret) ! return ret def asynccall(self, oid, methodname, args, kwargs): + self.debug("asyncall:", oid, methodname, args, kwargs) request = ("call", (oid, methodname, args, kwargs)) seq = self.putrequest(request) Index: run.py =================================================================== RCS file: /cvsroot/idlefork/idle/run.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** run.py 25 Aug 2002 14:08:07 -0000 1.7 --- run.py 10 Oct 2002 08:25:24 -0000 1.8 *************** *** 2,22 **** import time import socket import rpc def main(): """Start the Python execution server in a subprocess ! In Idle, RPCServer is instantiated with handlerclass MyHandler, which ! inherits register/unregister methods from RPCHandler via the mix-in class ! SocketIO. ! ! When the RPCServer is instantiated, the TCPServer initialization creates an ! instance of run.MyHandler and calls its handle() method. handle() ! instantiates a run.Executive, passing it a reference to the MyHandler ! object. That reference is saved as an attribute of the Executive instance. ! The Executive methods have access to the reference and can pass it on to ! entities that they command (e.g. RemoteDebugger.Debugger.start_debugger()). ! The latter, in turn, can call MyHandler(SocketIO) register/unregister ! methods via the reference to register and unregister themselves. """ --- 2,30 ---- import time import socket + + import CallTips + import RemoteDebugger + import RemoteObjectBrowser + import StackViewer import rpc + import __main__ + def main(): """Start the Python execution server in a subprocess ! In the Python subprocess, RPCServer is instantiated with handlerclass ! MyHandler, which inherits register/unregister methods from RPCHandler via ! the mix-in class SocketIO. ! ! When the RPCServer svr is instantiated, the TCPServer initialization ! creates an instance of run.MyHandler and calls its handle() method. ! handle() instantiates a run.Executive object, passing it a reference to the ! MyHandler object. That reference is saved as attribute rpchandler of the ! Executive instance. The Executive methods have access to the reference and ! can pass it on to entities that they command ! (e.g. RemoteDebugger.Debugger.start_debugger()). The latter, in turn, can ! call MyHandler(SocketIO) register/unregister methods via the reference to ! register and unregister themselves. """ *************** *** 56,61 **** def __init__(self, rpchandler): self.rpchandler = rpchandler - import __main__ self.locals = __main__.__dict__ def runcode(self, code): --- 64,69 ---- def __init__(self, rpchandler): self.rpchandler = rpchandler self.locals = __main__.__dict__ + self.calltip = CallTips.CallTips() def runcode(self, code): *************** *** 63,67 **** def start_the_debugger(self, gui_adap_oid): - import RemoteDebugger return RemoteDebugger.start_debugger(self.rpchandler, gui_adap_oid) --- 71,74 ---- *************** *** 70,73 **** --- 77,83 ---- self.rpchandler.unregister(idb_adap_oid) + def get_the_calltip(self, name): + return self.calltip.fetch_tip(name) + def stackviewer(self, flist_oid=None): if not hasattr(sys, "last_traceback"): *************** *** 76,81 **** if flist_oid is not None: flist = self.rpchandler.get_remote_proxy(flist_oid) - import RemoteObjectBrowser - import StackViewer tb = sys.last_traceback while tb and tb.tb_frame.f_globals["__name__"] in ["rpc", "run"]: --- 86,89 ---- From noreply@sourceforge.net Thu Oct 10 09:33:07 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 10 Oct 2002 01:33:07 -0700 Subject: [Idle-dev] [ idlefork-Bugs-619511 ] Calltips Not Functioning Message-ID: Bugs item #619511, was opened at 2002-10-07 00:06 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=619511&group_id=9579 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Kurt B. Kaiser (kbk) Assigned to: Kurt B. Kaiser (kbk) Summary: Calltips Not Functioning Initial Comment: CallTips aren't working because the identifiers are being looked up in the main process __main__.__dict__ when they should be looked up in the subprocess. ---------------------------------------------------------------------- >Comment By: Kurt B. Kaiser (kbk) Date: 2002-10-10 03:33 Message: Logged In: YES user_id=149084 CallTips Rev 1.7 run.py 1.8 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=619511&group_id=9579 From noreply@sourceforge.net Thu Oct 10 16:57:16 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 10 Oct 2002 08:57:16 -0700 Subject: [Idle-dev] [ idlefork-Bugs-621427 ] module warnings Message-ID: Bugs item #621427, was opened at 2002-10-10 08:57 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=621427&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: module warnings Initial Comment: Import Error: No module named warnings. My Python's version 2.0 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=621427&group_id=9579 From noreply@sourceforge.net Thu Oct 10 17:33:38 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 10 Oct 2002 09:33:38 -0700 Subject: [Idle-dev] [ idlefork-Bugs-621427 ] module warnings Message-ID: Bugs item #621427, was opened at 2002-10-10 11:57 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=621427&group_id=9579 Category: None Group: None >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: module warnings Initial Comment: Import Error: No module named warnings. My Python's version 2.0 ---------------------------------------------------------------------- >Comment By: Guido van Rossum (gvanrossum) Date: 2002-10-10 12:33 Message: Logged In: YES user_id=6380 Python 2.0 doesn't have a module warnings. You must have found this when trying to use 3rd party code. Upgrade to Python 2.1 or (preferably) 2.2. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=621427&group_id=9579 From kbk@users.sourceforge.net Wed Oct 23 05:48:10 2002 From: kbk@users.sourceforge.net (Kurt B. Kaiser) Date: Tue, 22 Oct 2002 21:48:10 -0700 Subject: [Idle-dev] CVS: idle Debugger.py,1.13,1.14 EditorWindow.py,1.34,1.35 PyShell.py,1.29,1.30 Message-ID: Update of /cvsroot/idlefork/idle In directory usw-pr-cvs1:/tmp/cvs-serv24387 Modified Files: Debugger.py EditorWindow.py PyShell.py Log Message: Implement Restoring Breakpoints in Subprocess Debugger M Debugger.py M EditorWindow.py M PyShell.py 0. Polish PyShell.linecache_checkcache() 1. Move break clearing code to PyShell.PyShellEditorWindow from EditorWindow. 2. Add PyShellEditorWindow.breakpoints attribute to __init__, a list of line numbers which are breakpoints for that edit window. 3. Remove the code in Debugger which removes all module breakpoints when debugger is closed. Want to be able to reload into debugger when restarted. 4. Moved the code which sets EditorWindow.text breakpoints from Debugger to PyShell.PyShellEditorWindow and refactored. 5. Implement reloading subprocess debugger with breakpoints from all open PyShellEditorWindows when debugger is opened or subprocess restarted. 6. Eliminate the break_set attribute, use the breakpoint list instead. Index: Debugger.py =================================================================== RCS file: /cvsroot/idlefork/idle/Debugger.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** Debugger.py 16 Sep 2002 01:06:52 -0000 1.13 --- Debugger.py 23 Oct 2002 04:48:08 -0000 1.14 *************** *** 78,86 **** if self.stackviewer: self.stackviewer.close(); self.stackviewer = None - # Remove all EditWindow BREAK tags when closing debugger: - edit_windows = self.pyshell.flist.inversedict.keys() - for window in edit_windows: - window.text.tag_remove("BREAK", 1.0, END) - window.break_set = False # Clean up pyshell if user clicked debugger control close widget. # (Causes a harmless extra cycle through close_debugger() if user --- 78,81 ---- *************** *** 312,357 **** gv.load_dict(gdict, force, self.pyshell.interp.rpcclt) ! def set_breakpoint_here(self, edit): ! text = edit.text ! filename = edit.io.filename ! if not filename: ! text.bell() ! return ! lineno = int(float(text.index("insert"))) msg = self.idb.set_break(filename, lineno) if msg: text.bell() return - text.tag_add("BREAK", "insert linestart", "insert lineend +1char") - edit.break_set = True ! def clear_breakpoint_here(self, edit): ! text = edit.text ! filename = edit.io.filename ! if not filename: ! text.bell() ! return ! lineno = int(float(text.index("insert"))) msg = self.idb.clear_break(filename, lineno) if msg: text.bell() return ! text.tag_remove("BREAK", "insert linestart",\ ! "insert lineend +1char") ! # Don't bother to track break_set status ! ! def clear_file_breaks(self, edit): ! text = edit.text ! filename = edit.io.filename ! if not filename: ! text.bell() ! return msg = self.idb.clear_all_file_breaks(filename) if msg: text.bell() return - text.tag_remove("BREAK", "1.0", END) - edit.break_set = False class StackViewer(ScrolledList): --- 307,338 ---- gv.load_dict(gdict, force, self.pyshell.interp.rpcclt) ! def set_breakpoint_here(self, filename, lineno): msg = self.idb.set_break(filename, lineno) if msg: text.bell() return ! def clear_breakpoint_here(self, filename, lineno): msg = self.idb.clear_break(filename, lineno) if msg: text.bell() return ! ! def clear_file_breaks(self, filename): msg = self.idb.clear_all_file_breaks(filename) if msg: text.bell() return + def load_breakpoints(self): + "Load PyShellEditorWindow breakpoints into subprocess debugger" + pyshell_edit_windows = self.pyshell.flist.inversedict.keys() + for editwin in pyshell_edit_windows: + filename = editwin.io.filename + try: + for lineno in editwin.breakpoints: + self.set_breakpoint_here(filename, lineno) + except AttributeError: + continue class StackViewer(ScrolledList): Index: EditorWindow.py =================================================================== RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** EditorWindow.py 6 Oct 2002 01:57:45 -0000 1.34 --- EditorWindow.py 23 Oct 2002 04:48:08 -0000 1.35 *************** *** 59,63 **** self.recentFilesPath=os.path.join(idleConf.GetUserCfgDir(), 'recent-files.lst') - self.break_set = False self.vbar = vbar = Scrollbar(top, name='vbar') self.text_frame = text_frame = Frame(top) --- 59,62 ---- *************** *** 626,632 **** title = "*%s*" % title icon = "*%s" % icon - if self.break_set: - shell = self.flist.pyshell - shell.interp.debugger.clear_file_breaks(self) self.top.wm_title(title) self.top.wm_iconname(icon) --- 625,628 ---- *************** *** 697,703 **** if self.io.filename: self.UpdateRecentFilesList(newFile=self.io.filename) - if self.break_set: - shell = self.flist.pyshell - shell.interp.debugger.clear_file_breaks(self) WindowList.unregister_callback(self.postwindowsmenu) if self.close_hook: --- 693,696 ---- Index: PyShell.py =================================================================== RCS file: /cvsroot/idlefork/idle/PyShell.py,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** PyShell.py 10 Oct 2002 08:25:24 -0000 1.29 --- PyShell.py 23 Oct 2002 04:48:08 -0000 1.30 *************** *** 45,53 **** warnings.showwarning = idle_showwarning ! # We need to patch linecache.checkcache, because we don't want it ! # to throw away our entries. ! # Rather than repeating its code here, we save those entries, ! # then call the original function, and then restore the saved entries. ! def linecache_checkcache(orig_checkcache=linecache.checkcache): cache = linecache.cache save = {} --- 45,57 ---- warnings.showwarning = idle_showwarning ! def linecache_checkcache(): ! """Extend linecache.checkcache to preserve the entries ! ! Rather than repeating the linecache code, patch it by saving the pyshell# ! entries, call linecache.checkcache(), and then restore the saved ! entries. ! ! """ ! orig_checkcache=linecache.checkcache cache = linecache.cache save = {} *************** *** 57,90 **** orig_checkcache() cache.update(save) linecache.checkcache = linecache_checkcache class PyShellEditorWindow(EditorWindow): "Regular text edit window when a shell is present" ! # XXX ought to merge with regular editor window def __init__(self, *args): apply(EditorWindow.__init__, (self,) + args) self.text.bind("<>", self.set_breakpoint_here) ! self.text.bind("<>", ! self.clear_breakpoint_here) self.text.bind("<>", self.flist.open_shell) ! rmenu_specs = [ ! ("Set Breakpoint", "<>"), ! ("Clear Breakpoint", "<>") ! ] def set_breakpoint_here(self, event=None): ! if not self.flist.pyshell or not self.flist.pyshell.interp.debugger: ! self.text.bell() return ! self.flist.pyshell.interp.debugger.set_breakpoint_here(self) def clear_breakpoint_here(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_breakpoint_here(self) ! class PyShellFileList(FileList): --- 61,149 ---- orig_checkcache() cache.update(save) + linecache.checkcache = linecache_checkcache + class PyShellEditorWindow(EditorWindow): "Regular text edit window when a shell is present" ! ! # XXX KBK 19Oct02 Breakpoints are currently removed if module is ! # changed or closed. Future plans include saving breakpoints in a ! # project file and possibly preserving breakpoints by changing their ! # line numbers as a module is modified. def __init__(self, *args): + self.breakpoints = [] apply(EditorWindow.__init__, (self,) + args) self.text.bind("<>", self.set_breakpoint_here) ! self.text.bind("<>", self.clear_breakpoint_here) self.text.bind("<>", self.flist.open_shell) ! rmenu_specs = [("Set Breakpoint", "<>"), ! ("Clear Breakpoint", "<>")] def set_breakpoint_here(self, event=None): ! text = self.text ! filename = self.io.filename ! if not filename: ! text.bell() return ! lineno = int(float(text.index("insert"))) ! try: ! i = self.breakpoints.index(lineno) ! except: # only add if missing, i.e. do once ! self.breakpoints.append(lineno) ! text.tag_add("BREAK", "insert linestart", "insert lineend +1char") ! try: # update the subprocess debugger ! debug = self.flist.pyshell.interp.debugger ! debug.set_breakpoint_here(filename, lineno) ! except: # but debugger may not be active right now.... ! pass def clear_breakpoint_here(self, event=None): ! text = self.text ! filename = self.io.filename ! if not filename: ! text.bell() return ! lineno = int(float(text.index("insert"))) ! try: ! self.breakpoints.remove(lineno) ! except: ! pass ! text.tag_remove("BREAK", "insert linestart",\ ! "insert lineend +1char") ! try: ! debug = self.flist.pyshell.interp.debugger ! debug.clear_breakpoint_here(filename, lineno) ! except: ! pass ! ! def clear_file_breaks(self): ! if self.breakpoints: ! text = self.text ! filename = self.io.filename ! if not filename: ! text.bell() ! return ! self.breakpoints = [] ! text.tag_remove("BREAK", "1.0", END) ! try: ! debug = self.flist.pyshell.interp.debugger ! debug.clear_file_breaks(filename) ! except: ! pass ! ! def saved_change_hook(self): ! "Extend base method - clear breaks if module is modified" ! if not self.get_saved(): ! self.clear_file_breaks() ! EditorWindow.saved_change_hook(self) ! ! def _close(self): ! "Extend base method - clear breaks when module is closed" ! self.clear_file_breaks() ! EditorWindow._close(self) ! class PyShellFileList(FileList): *************** *** 175,179 **** # sys.prefix. executable = os.path.join(sys.prefix, 'Resources', ! 'Python.app', 'Contents', 'MacOS', 'python') return executable else: --- 234,239 ---- # sys.prefix. executable = os.path.join(sys.prefix, 'Resources', ! 'Python.app', 'Contents', ! 'MacOS', 'python') return executable else: *************** *** 208,213 **** def restart_subprocess(self): # close only the subprocess debugger ! db = self.getdebugger() ! if db: RemoteDebugger.close_subprocess_debugger(self.rpcclt) # kill subprocess, spawn a new one, accept connection --- 268,273 ---- def restart_subprocess(self): # close only the subprocess debugger ! debug = self.getdebugger() ! if debug: RemoteDebugger.close_subprocess_debugger(self.rpcclt) # kill subprocess, spawn a new one, accept connection *************** *** 216,224 **** self.rpcclt.accept() # restart remote debugger ! if db: gui = RemoteDebugger.restart_subprocess_debugger(self.rpcclt) ! # reload remote debugger breakpoints ! pass # XXX KBK 04Sep02 TBD ! active_seq = None --- 276,284 ---- self.rpcclt.accept() # restart remote debugger ! if debug: gui = RemoteDebugger.restart_subprocess_debugger(self.rpcclt) ! # reload remote debugger breakpoints for all PyShellEditWindows ! debug.load_breakpoints() ! active_seq = None *************** *** 266,269 **** --- 326,337 ---- clt.close() + debugger = None + + def setdebugger(self, debugger): + self.debugger = debugger + + def getdebugger(self): + return self.debugger + def remote_stack_viewer(self): import RemoteObjectBrowser *************** *** 383,394 **** del c[key] - debugger = None - - def setdebugger(self, debugger): - self.debugger = debugger - - def getdebugger(self): - return self.debugger - def display_executing_dialog(self): tkMessageBox.showerror( --- 451,454 ---- *************** *** 568,571 **** --- 628,633 ---- gui = RemoteDebugger.start_remote_debugger(self.interp.rpcclt, self) self.interp.setdebugger(gui) + # Load all PyShellEditorWindow breakpoints: + gui.load_breakpoints() sys.ps1 = "[DEBUG ON]\n>>> " self.showprompt() From kbk@shore.net Wed Oct 23 06:36:59 2002 From: kbk@shore.net (Kurt B. Kaiser) Date: 23 Oct 2002 01:36:59 -0400 Subject: [Idle-dev] Vacation Message-ID: I'm taking trip to the West Coast for a few days, and will be back on Nov 6. No cruise ship, though :) KBK From noreply@sourceforge.net Mon Oct 28 17:24:04 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 28 Oct 2002 09:24:04 -0800 Subject: [Idle-dev] [ idlefork-Bugs-629983 ] SyntaxError in module reported poorly Message-ID: Bugs item #629983, was opened at 2002-10-28 12:24 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=629983&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Guido van Rossum (gvanrossum) Assigned to: Nobody/Anonymous (nobody) Summary: SyntaxError in module reported poorly Initial Comment: When an imported module contains a syntax error, the traceback doesn't properly show the line with the error. Example: >>> import foo Traceback (most recent call last): File "", line 1, in ? import foo SyntaxError: invalid syntax ('foo.py', 1, 3, '1/\n') >>> The regular Python interpreter reports this: Traceback (most recent call last): File "", line 1, in ? File "foo.py", line 1 1/ ^ SyntaxError: invalid syntax >>> And IDLE 0.8 similarly: >>> import foo Traceback (most recent call last): File "", line 1, in ? import foo File "/home/guido/trunk/Tools/idle/foo.py", line 1 1/ ^ SyntaxError: invalid syntax >>> ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=629983&group_id=9579 From noreply@sourceforge.net Mon Oct 28 17:26:35 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 28 Oct 2002 09:26:35 -0800 Subject: [Idle-dev] [ idlefork-Bugs-629984 ] Smaller font sizes not supported Message-ID: Bugs item #629984, was opened at 2002-10-28 12:26 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=629984&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Guido van Rossum (gvanrossum) Assigned to: Nobody/Anonymous (nobody) Summary: Smaller font sizes not supported Initial Comment: The config dialog doens't allow selection of font sizes < 10. On Windows, my preferred font happens to be Lucida Console 8 points. There are legitimate uses for even smaller fonts. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=629984&group_id=9579 From noreply@sourceforge.net Mon Oct 28 17:28:57 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 28 Oct 2002 09:28:57 -0800 Subject: [Idle-dev] [ idlefork-Bugs-629985 ] Slow output Message-ID: Bugs item #629985, was opened at 2002-10-28 12:28 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=629985&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 4 Submitted By: Guido van Rossum (gvanrossum) Assigned to: Nobody/Anonymous (nobody) Summary: Slow output Initial Comment: When a program writes many small amounts of text to sys.stdout, the RPC package really seems to slow things down. Perhaps the RPC mechanism can be extended with a special case for "no-return" method calls, where the client doesn't wait for a response and the server doesn't send one. (This should only be done for functions that aren't expected to return a value or raise an exception, of course.) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=629985&group_id=9579 From noreply@sourceforge.net Mon Oct 28 17:31:14 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 28 Oct 2002 09:31:14 -0800 Subject: [Idle-dev] [ idlefork-Bugs-629986 ] Doesn't work with pythonw.exe Message-ID: Bugs item #629986, was opened at 2002-10-28 12:31 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=629986&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Guido van Rossum (gvanrossum) Assigned to: Nobody/Anonymous (nobody) Summary: Doesn't work with pythonw.exe Initial Comment: When I try to start IDLE using Pythonw.exe, IDLE doesn't seem to start; no window ever pops up. I think it's because of the debug messages written to the real stdout or stderr, but it could be deeper. (I only tested this on Win98.) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=629986&group_id=9579 From noreply@sourceforge.net Mon Oct 28 17:20:20 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 28 Oct 2002 09:20:20 -0800 Subject: [Idle-dev] [ idlefork-Bugs-629978 ] No >>> prompt after syntax error Message-ID: Bugs item #629978, was opened at 2002-10-28 12:20 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=629978&group_id=9579 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Guido van Rossum (gvanrossum) Assigned to: Nobody/Anonymous (nobody) Summary: No >>> prompt after syntax error Initial Comment: After a syntax error in an immediate command is reported by the Python Shell window, it forgets to print the >>> prompt. Example: >>> 1/ SyntaxError: invalid syntax (no >>> prompt follows). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109579&aid=629978&group_id=9579 From nobody@maui.dnsvault.com Wed Oct 30 01:02:15 2002 From: nobody@maui.dnsvault.com (Nobody) Date: Tue, 29 Oct 2002 20:02:15 -0500 Subject: [Idle-dev] A larger gold balance! Message-ID: Untitled

Hello all E-Gold and EVOcash account holders!

   We here at Your Gold Chance are honest, reliable and willing to help you achieve what you want most..... A larger e-gold balance! We have developed a program to give you a smart return without the usual wait of hyip's. For speed and convenience we utilize online digital currencies. We accept E-Gold and EVOcash.

    All investments are based on a 33 week plan. We pay you 10% per week for a total of 33 weeks. You first payment starts 7 days after you invest and your capital is returned to you at the end of the 33th week.

   The minimum Investment is $25.00USD and the maximum Investment is $25,000 USD. Do not send us any amount outside these parameters otherwise your investment will be returned without profit.

If you are interested in this program visit site:

http://www.yourgoldchance.net/invest.html

All additional information you can get here:

http://www.yourgoldchance.net/

If you would like to contact us, please send us an email:

yourgoldchance@yourgoldchance.net

Our company will continue its best efforts to make good on every payments on our program without any delay.

Thanks for choosing Your Gold Chance!
Karen Andreozzi,
President
Yor Gold Chance, Inc.