From bernie@pacific.net.hk Fri Feb 2 09:37:35 2001 From: bernie@pacific.net.hk (Bernie) Date: Fri, 02 Feb 2001 17:37:35 +0800 Subject: [Idle-dev] Possible bug in IDLE 0.6 Message-ID: <3A7A7FDF.91C5994B@pacific.net.hk> Hi, I am using Pyhton on MS Windows 98, Second Edition (Chinese), and have encountered a crash when I do the following: Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32 Type "copyright", "credits" or "license" for more information. IDLE 0.6 -- press F1 for help >>> from array import array >>> x = array( 'c', 'Hello World') >>> x <--- IDLE crash when I try to print x Below is the stack trace: PYTHONW caused an invalid page fault in module PYTHON20.DLL at 0167:0042fad9. Registers: EAX=00000000 CS=0167 EIP=0042fad9 EFLGS=00010246 EBX=00000000 SS=016f ESP=006ddcf0 EBP=00000000 ECX=00474b30 DS=016f ESI=0000003a FS=32b7 EDX=00474b30 ES=016f EDI=00000000 GS=0000 Bytes at CS:EIP: 81 7b 04 a0 64 49 00 74 11 8b 0d ac bc 49 00 68 Stack dump: 00b1e3bc 0085535c 0000000b 00b2a620 00000000 00474b31 00000000 00000000 00474b30 005a1588 006ddcc0 00000000 006ddd68 00a85527 005a1588 004d80c4 Regards, Bernie From dcc@iti-oh.com Thu Feb 8 15:36:12 2001 From: dcc@iti-oh.com (Cheney, Doug) Date: Thu, 8 Feb 2001 10:36:12 -0500 Subject: [Idle-dev] IDLE Replace broken for Python 2.0 Message-ID: <3DCF393159D8D3119C1C00508B62B90621B3D0@ntmilford2.iti-oh.com> I have searched the idle-dev archives and did not find this problem identified. I apologize if I missed it. I have been using IDLE for production Python programming the past two years using CADScript--ITI's consistent Python API for all major CAD systems (www.iti-oh.com/pdi). The Replace capability is one I rely on regularly. It worked fine for IDLE 0.5 and Python 1.5.2. When I use Replace in IDLE 0.6 and Python 2.0 I get the following error (WIN32): >>> Exception in Tkinter callback Traceback (most recent call last): File "c:\python20\lib\lib-tk\Tkinter.py", line 1287, in __call__ return apply(self.func, args) File "C:\sandbox\idle-0.5\ReplaceDialog.py", line 62, in default_command self.do_replace() File "C:\sandbox\idle-0.5\ReplaceDialog.py", line 145, in do_replace new = re.pcre_expand(m, self.replvar.get()) AttributeError: pcre_expand Please help me resolve this regression. Thanks, -Doug Cheney Senior Software Engineer International TechneGroup Incorporated From mats@laplaza.org Thu Feb 8 15:51:52 2001 From: mats@laplaza.org (Mats Wichmann) Date: Thu, 08 Feb 2001 08:51:52 -0700 Subject: [Idle-dev] IDLE Replace broken for Python 2.0 In-Reply-To: <3DCF393159D8D3119C1C00508B62B90621B3D0@ntmilford2.iti-oh.c om> Message-ID: <5.0.2.1.1.20010208084836.02fe21a0@mail.laplaza.org> At 10:36 AM 02/08/2001 -0500, Cheney, Doug wrote: > >I have searched the idle-dev archives and did not find this problem >identified. I apologize if I missed it. > >I have been using IDLE for production Python programming the past two years >using CADScript--ITI's consistent Python API for all major CAD systems >(www.iti-oh.com/pdi). > >The Replace capability is one I rely on regularly. It worked fine for IDLE >0.5 and Python 1.5.2. > >When I use Replace in IDLE 0.6 and Python 2.0 I get the following error >(WIN32): > >>>> Exception in Tkinter callback >Traceback (most recent call last): > File "c:\python20\lib\lib-tk\Tkinter.py", line 1287, in __call__ > return apply(self.func, args) > File "C:\sandbox\idle-0.5\ReplaceDialog.py", line 62, in default_command > self.do_replace() > File "C:\sandbox\idle-0.5\ReplaceDialog.py", line 145, in do_replace > new = re.pcre_expand(m, self.replvar.get()) >AttributeError: pcre_expand > >Please help me resolve this regression. Doug, treat this as comments from someone who doesn't know much about IDLE. Python 2.0 uses a new regular expression engine, "re" is a wrapper to get to the right one, "sre" is the current engine, the older one was "pre". As far as I can tell, only "pre" imports from "pcre"... I think that's the source of the message, anyway. I don't even have a pcre any more. Looks from your traceback like you're actually using IDLE 0.5 instead of 0.6. Maybe you did try 0.6, but if not, you might want to switch over. From dcc@iti-oh.com Thu Feb 8 19:53:24 2001 From: dcc@iti-oh.com (Cheney, Doug) Date: Thu, 8 Feb 2001 14:53:24 -0500 Subject: [Idle-dev] IDLE Replace broken for Python 2.0 Message-ID: <3DCF393159D8D3119C1C00508B62B90621B3E1@ntmilford2.iti-oh.com> Sorry for the false alarm--I was using the customized version of IDLE 0.5 distributed by David Scherer at CMU in their VPython customization of Python 2.0. I downloaded the official version of Python 2.0 and the Replace function works fine. -Doug -----Original Message----- From: Mats Wichmann [mailto:mats@laplaza.org] Sent: Thursday, February 08, 2001 10:52 AM To: Cheney, Doug; 'idle-dev@python.org' Subject: Re: [Idle-dev] IDLE Replace broken for Python 2.0 At 10:36 AM 02/08/2001 -0500, Cheney, Doug wrote: > >I have searched the idle-dev archives and did not find this problem >identified. I apologize if I missed it. > >I have been using IDLE for production Python programming the past two years >using CADScript--ITI's consistent Python API for all major CAD systems >(www.iti-oh.com/pdi). > >The Replace capability is one I rely on regularly. It worked fine for IDLE >0.5 and Python 1.5.2. > >When I use Replace in IDLE 0.6 and Python 2.0 I get the following error >(WIN32): > >>>> Exception in Tkinter callback >Traceback (most recent call last): > File "c:\python20\lib\lib-tk\Tkinter.py", line 1287, in __call__ > return apply(self.func, args) > File "C:\sandbox\idle-0.5\ReplaceDialog.py", line 62, in default_command > self.do_replace() > File "C:\sandbox\idle-0.5\ReplaceDialog.py", line 145, in do_replace > new = re.pcre_expand(m, self.replvar.get()) >AttributeError: pcre_expand > >Please help me resolve this regression. Doug, treat this as comments from someone who doesn't know much about IDLE. Python 2.0 uses a new regular expression engine, "re" is a wrapper to get to the right one, "sre" is the current engine, the older one was "pre". As far as I can tell, only "pre" imports from "pcre"... I think that's the source of the message, anyway. I don't even have a pcre any more. Looks from your traceback like you're actually using IDLE 0.5 instead of 0.6. Maybe you did try 0.6, but if not, you might want to switch over. From dscherer@vysics.com Fri Feb 9 02:05:39 2001 From: dscherer@vysics.com (David Scherer) Date: Thu, 8 Feb 2001 21:05:39 -0500 Subject: [Idle-dev] IDLE Replace broken for Python 2.0 In-Reply-To: <3DCF393159D8D3119C1C00508B62B90621B3E1@ntmilford2.iti-oh.com> Message-ID: Thanks for the heads up. A fix for this was indeed put in IDLE 0.6, but we never got it. Guido's CVS log entry reads: | python/dist/src/Tools/idle/ReplaceDialog.py | Revision 1.4, Tue Sep 19 20:51:17 2000 UTC by gvanrossum | | Temporary fix for Bug #114821. | | The cause was that the replace code necessarily used a PCRE internal | function to to template expansion. | | The fix changes the code to use an SRE internal if SRE is used, and a | PCRE internal if SRE is used; in a way that should work with 1.5.2. | | The solution can be sped up tremendously under the assumption that the | choice between sre and pre is not changed during the execution of the | program; especially replace-all will be slow. | | But I'll leave that to someone else. Merging this change with the idlefork is trivial: since idlefork never changed this file, just copy the IDLE 0.6 ReplaceDialog.py over the idlefork one. Bruce, can you update the VPython download? Dave > -----Original Message----- > From: idle-dev-admin@python.org [mailto:idle-dev-admin@python.org]On > Behalf Of Cheney, Doug > Sent: Thursday, February 08, 2001 2:53 PM > To: 'idle-dev@python.org' > Cc: 'dscherer@cmu.edu' > Subject: RE: [Idle-dev] IDLE Replace broken for Python 2.0 > > > > Sorry for the false alarm--I was using the customized version of > IDLE 0.5 distributed by David Scherer at CMU in their VPython > customization of Python 2.0. > > I downloaded the official version of Python 2.0 and the Replace > function works fine. > > -Doug > > -----Original Message----- > From: Mats Wichmann [mailto:mats@laplaza.org] > Sent: Thursday, February 08, 2001 10:52 AM > To: Cheney, Doug; 'idle-dev@python.org' > Subject: Re: [Idle-dev] IDLE Replace broken for Python 2.0 > > > At 10:36 AM 02/08/2001 -0500, Cheney, Doug wrote: > > > >I have searched the idle-dev archives and did not find this problem > >identified. I apologize if I missed it. > > > >I have been using IDLE for production Python programming the > past two years > >using CADScript--ITI's consistent Python API for all major CAD systems > >(www.iti-oh.com/pdi). > > > >The Replace capability is one I rely on regularly. It worked > fine for IDLE > >0.5 and Python 1.5.2. > > > >When I use Replace in IDLE 0.6 and Python 2.0 I get the following error > >(WIN32): > > > >>>> Exception in Tkinter callback > >Traceback (most recent call last): > > File "c:\python20\lib\lib-tk\Tkinter.py", line 1287, in __call__ > > return apply(self.func, args) > > File "C:\sandbox\idle-0.5\ReplaceDialog.py", line 62, in > default_command > > self.do_replace() > > File "C:\sandbox\idle-0.5\ReplaceDialog.py", line 145, in do_replace > > new = re.pcre_expand(m, self.replvar.get()) > >AttributeError: pcre_expand > > > >Please help me resolve this regression. > > > Doug, treat this as comments from someone who doesn't know much > about IDLE. > > Python 2.0 uses a new regular expression engine, "re" is a wrapper > to get to the right one, "sre" is the current engine, the older > one was "pre". As far as I can tell, only "pre" imports from "pcre"... > I think that's the source of the message, anyway. I don't even > have a pcre any more. > > Looks from your traceback like you're actually using IDLE 0.5 > instead of 0.6. Maybe you did try 0.6, but if not, you might > want to switch over. > > _______________________________________________ > IDLE-dev mailing list > IDLE-dev@python.org > http://mail.python.org/mailman/listinfo/idle-dev > From guido@digicool.com Fri Feb 9 06:00:32 2001 From: guido@digicool.com (Guido van Rossum) Date: Fri, 09 Feb 2001 01:00:32 -0500 Subject: [Idle-dev] Possible bug in IDLE 0.6 In-Reply-To: Your message of "Fri, 02 Feb 2001 17:37:35 +0800." <3A7A7FDF.91C5994B@pacific.net.hk> References: <3A7A7FDF.91C5994B@pacific.net.hk> Message-ID: <200102090600.BAA16575@cj20424-a.reston1.va.home.com> > I am using Pyhton on MS Windows 98, Second Edition (Chinese), and have > encountered a crash when I do the following: > > Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32 > Type "copyright", "credits" or "license" for more information. > IDLE 0.6 -- press F1 for help > >>> from array import array > >>> x = array( 'c', 'Hello World') > >>> x <--- IDLE crash when I try to print x This is unfortunately a known bug in Python 2.0. It has been fixed in Python 2.1, which is in alpha (see python.org). --Guido van Rossum (home page: http://www.python.org/~guido/) From bernie@pacific.net.hk Fri Feb 9 17:44:11 2001 From: bernie@pacific.net.hk (Bernie) Date: Sat, 10 Feb 2001 01:44:11 +0800 Subject: [Idle-dev] Possible bug in IDLE 0.6 References: <3A7A7FDF.91C5994B@pacific.net.hk> <200102090600.BAA16575@cj20424-a.reston1.va.home.com> Message-ID: <3A842C6B.C221B7D1@pacific.net.hk> Hi Guido, Thanks for the information. Bernie P.S.: I love Python, it's a cool language Guido van Rossum wrote: > > I am using Pyhton on MS Windows 98, Second Edition (Chinese), and have > > encountered a crash when I do the following: > > > > Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32 > > Type "copyright", "credits" or "license" for more information. > > IDLE 0.6 -- press F1 for help > > >>> from array import array > > >>> x = array( 'c', 'Hello World') > > >>> x <--- IDLE crash when I try to print x > > This is unfortunately a known bug in Python 2.0. It has been fixed in > Python 2.1, which is in alpha (see python.org). > > --Guido van Rossum (home page: http://www.python.org/~guido/) From joonas@olen.to Wed Feb 14 18:11:23 2001 From: joonas@olen.to (Joonas Paalasmaa) Date: Wed, 14 Feb 2001 20:11:23 +0200 Subject: [Idle-dev] Suggestion to ScriptBinding.py Message-ID: <3A8ACA4B.7DD808B7@olen.to> I've used Idle for a while and noticed its power in Python development, but there is one thing that disturbs me when I'm using Idle. The problem is that when I'm running a script with CTRL+F5 Idle uses Python directory as default working directory, which causes problems with scripts that open or write files with relative pathnames. I am not an expert Python programmer, but I have used the following change in my ScriptBinding.py's getfilename-function and it seems to work fine. #################################################################### def getfilename(self): # Logic to make sure we have a saved filename # XXX Better logic would offer to save! if not self.editwin.get_saved(): self.errorbox("Not saved", "Please save first!") self.editwin.text.focus_set() return filename = self.editwin.io.filename if not filename: self.errorbox("No file name", "This window has no file name") return separatedpathlist = string.split(filename,os.sep)[:-1] #line added os.chdir( string.join(separatedpathlist, os.sep)+os.sep ) #line added return filename #################################################################### Any comments? Joonas Paalasmaa |joonas@olen.to| From lslbrd@highway1.com.au Wed Feb 28 02:39:50 2001 From: lslbrd@highway1.com.au (WA Construction Ind LSL Board) Date: Wed, 28 Feb 2001 10:39:50 +0800 Subject: [Idle-dev] Idle 1.6 Menu Help prob Message-ID: <001f01c0a12f$b92f6600$efc8a8c0@sec> Hi All Python newby trying Idle on win95. From the menu line . Help, Python Documentation gives following error. Is it something wrong with my setup? regards Wayne Python 1.6.1 (#0, Feb 24 2001, 11:30:18) [MSC 32 bit (Intel)] on win32 Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved. IDLE 0.6 -- press F1 for help >>> Exception in Tkinter callback Traceback (most recent call last): File "E:\PYTHON1.6\PYTHON161\lib\lib-tk\Tkinter.py", line 766, in __call__ return apply(self.func, args) File "E:\Python1.6\Python161\Tools\idle\EditorWindow.py", line 301, in python_docs BrowserControl.open(self.help_url) File "E:\Python1.6\Python161\Tools\idle\BrowserControl.py", line 55, in open _get_browser().open(url, new) File "E:\Python1.6\Python161\Tools\idle\BrowserControl.py", line 144, in open import win32api, win32con ImportError: No module named win32api From guido@digicool.com Wed Feb 28 03:04:13 2001 From: guido@digicool.com (Guido van Rossum) Date: Tue, 27 Feb 2001 22:04:13 -0500 Subject: [Idle-dev] Idle 1.6 Menu Help prob In-Reply-To: Your message of "Wed, 28 Feb 2001 10:39:50 +0800." <001f01c0a12f$b92f6600$efc8a8c0@sec> References: <001f01c0a12f$b92f6600$efc8a8c0@sec> Message-ID: <200102280304.WAA21277@cj20424-a.reston1.va.home.com> > Python newby trying Idle on win95. From the menu line . Help, Python > Documentation gives following error. > > Is it something wrong with my setup? No, this only works if you have the Pythonwin add-on. But the docs are also in the Programs -> Python menu, under Python Manuals. Or you can upgrade to Python 2.0, which fixes this problem. --Guido van Rossum (home page: http://www.python.org/~guido/)