From AndersonE at pbworld.com Tue Nov 1 22:53:40 2005 From: AndersonE at pbworld.com (Anderson, Errol) Date: Wed, 2 Nov 2005 08:53:40 +1100 Subject: [Idle-dev] IDLE File Editor - Windows shell Message-ID: <1DE2D453799CA3498040C25C391AC95D03A5C985@sydm.corp.pbwan.net> I do a lot of Python programming and to date have used EditPlus at my editor, through habit rather than anything else. I have had a quick look at the IDLE file editor in the Windows shell and I have the following comments: 1. Confusion between tabs and spaces I feel that IDLE should work only in tabs and not try converting from tabs to spaces and back again. If I edit a file that was edited in a different editor (e.g. EditPlus), the left and right arrows move one tab at a time. If I press enter to insert a new line that is not after an 'if' statement, this behaviour continues, as it should. However a new line after an 'if' statement appears to add an extra tab (- a nice feature) but as four spaces, not as a tab, even though the default tab setting is 8 spaces. This behaviour appears to be independent of the Toggle Tabs setting. This behaviour basically makes IDLE impossible to use as each line will have a different tab arrangement. I understand that using the Tabify / Untabify options will fix this up but this is hardly satisfactory. Please tell me if there is a way to make the file editor function in a more acceptable way. 2. Displaying non-printing (tabs, spaces and end-of-line) characters Is there some way to do this ? I have gone thorugh all the settings without success. 3. Wordwrap How do I turn this on, to wrap at the window edge? 4. Code Context A great feature, but can it be synchronised with the cursor position rather than the top of the page? Also could the window expand or scroll to show all levels of the current loops, not limited to 3 levels? 5. Class Browser Another great feature, but this would be more useful if it could be docked in the edit window rather than floating free. I look forward to any comments and/or assistance that can be offered. Best regards Errol Errol Anderson Chief Scientist, Geothermal Resources Group PB Power (NZ) Ltd PO Box 3935, 60 Cook St Auckland NEW ZEALAND Ph: + 64 9 377 9941 Fax: + 64 9 377 9946 Direct: + 64 9 918 5151 Email: andersone at pbworld.com Email Disclaimer: This document and any attachments ("this message") are confidential and may contain legally privileged information and/or copyright material. This message must not be distributed and the information contained in it must not be disseminated, without the authority of the Parsons Brinckerhoff Group ("PB"). This message must not be altered other than by PB. The information contained in this message is intended for the use of the authorised recipient only. If you are not the authorised recipient of this message you must not read, copy, store or distribute this message, or disseminate or act in reliance upon the information contained in it. If you have received this message in error, or you are not an authorised recipient, please either return e-mail to sender or telephone PB immediately on +61 2 9272 5100, and delete this message from your email system, and destroy any printed copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/idle-dev/attachments/20051102/34043644/attachment.htm From jason at jasondoucette.com Wed Nov 2 01:34:58 2005 From: jason at jasondoucette.com (Jason Doucette) Date: Tue, 1 Nov 2005 20:34:58 -0400 Subject: [Idle-dev] IDLE File Editor - Windows shell References: <1DE2D453799CA3498040C25C391AC95D03A5C985@sydm.corp.pbwan.net> Message-ID: <002701c5df45$44f43640$3500a8c0@OptimusPrime> Errol, > 1. Confusion between tabs and spaces > > I feel that IDLE should work only in tabs and not try converting from > tabs to spaces and back again. > ... > However a new line after an 'if' statement appears to add an extra > tab (- a nice feature) but as four spaces, not as a tab, even though > the default tab setting is 8 spaces. This behaviour appears to be > independent of the Toggle Tabs setting. > > This behaviour basically makes IDLE impossible to use as each line > will have a different tab arrangement. I have witnessed the same thing. I believe the solution is that IDLE should accept Tabs or spaces, but hide this from the user. In other words, it would be great if IDLE would pretend 4 spaces was a Tab (meaning when you backspace over it, you need only backspace once, not four times). This problem is complicated with the fact that Python does have a strict restriction on what is used for indents -- it can be tabs, or spaces (and any number of spaces, at that). Also, I believe a bug exists that the setting for tab indentation size (the number of spaces a Tab represents) only takes effect on re-start, IIRC. > 2. Displaying non-printing (tabs, spaces and end-of-line) characters > > Is there some way to do this ? I have gone through all the settings > without success. I believe this is not possible. However a more knowledgeable person should answer this for you. > 3. Wordwrap > > How do I turn this on, to wrap at the window edge? Again, I believe this is not possible, but a more knowledgeable person should answer this for you. Please note that the style guides recommend that Python code not be wider than 79 characters, although I know this is very annoying in practice. Please read this section of the Style Guide for the suggestions and ways to deal with long lines properly: http://www.python.org/peps/pep-0008.html Maximum Line Length > 4. Code Context > > A great feature, but can it be synchronized with the cursor position > rather than the top of the page? Also could the window expand or > scroll to show all levels of the current loops, not limited to 3 > levels? Wow, this is a great feature. I was unaware of it until now. Yes, I agree on both points: It is unintuitive to be synchronized with the top of the page, instead of the cursor position. And, it would be great if it showed more than 3 levels when necessary. > 5. Class Browser > > Another great feature, but this would be more useful if it could be > docked in the edit window rather than floating free. In general, the window positions are erratic. It would be nice if they remembered their previous positions. > I look forward to any comments and/or assistance that can be offered. > > Best regards > > Errol Thanks for your comments. I recommend reading previous posts by Kurt Kaiser (in response to my posts) regarding providing bug reports and possible improvements. He has posted a lot of good information. Take care, -- Jason Doucette / Xona.com www.jasondoucette.com / www.xona.com From dyoo at hkn.eecs.berkeley.edu Sat Nov 5 23:23:39 2005 From: dyoo at hkn.eecs.berkeley.edu (Danny Yoo) Date: Sat, 5 Nov 2005 14:23:39 -0800 (PST) Subject: [Idle-dev] Line numbers in Idle (fwd) Message-ID: ---------- Forwarded message ---------- Date: Sat, 5 Nov 2005 22:24:34 +0100 From: Wim Vanweersch To: dyoo at hkn.eecs.berkeley.edu Subject: Line numbers in Idle Hi Danny, Thank You for making the documentation about Idle on the site of Python.org. I have a question about Idle: is it possible to put on line numbers? I can't find anything where to put it on. Thanks in advance for the answer! Greets, Wim Vanweersch From noreply at sourceforge.net Tue Nov 15 08:21:00 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 14 Nov 2005 23:21:00 -0800 Subject: [Idle-dev] [ idlefork-Patches-681992 ] Better indentation after first line of string continuation Message-ID: Patches item #681992, was opened at 2003-02-06 18:23 Message generated for change (Comment added) made by kbk You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=681992&group_id=9579 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 5 Submitted By: Noam Raphael (noamr) >Assigned to: Kurt B. Kaiser (kbk) Summary: Better indentation after first line of string continuation Initial Comment: This is a fix for Jeffrey Stephens' bug report: -------------------- From: Jeffrey Stephens <jsteve17 at tampabay.rr.com> Organization: Home User To: idle-dev at python.org Date: Mon, 3 Feb 2003 23:12:49 -0500 Subject: [Idle-dev] Bug in Idlefork 0.9a2 Executing the following code in the Python Shell window - >>> print "Snake Ey es" produces output Snake Ey es Six spaces are inserted between the 'y' and 'e' in eyes. This works fine in a terminal window. Regards, Jeff Stephens=20 ----------------------- The problem is that when IDLE detects string continuation, it indents the new line in the same way as the previous one. This makes sense if you are in the middle of a string, so the indentation of the previous line is a part of the string, but if the string starts at the current line, the indentation of the line is meaningless. The patch fixes that; if the string was started at the current line, no indentation at all is applied. I hope this helps a little, Noam ---------------------------------------------------------------------- >Comment By: Kurt B. Kaiser (kbk) Date: 2005-11-15 02:21 Message: Logged In: YES user_id=149084 Rev 41451, trunk ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=309579&aid=681992&group_id=9579 From fuzzyman at voidspace.org.uk Fri Nov 18 10:32:02 2005 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Fri, 18 Nov 2005 09:32:02 +0000 Subject: [Idle-dev] Python Core Dump Message-ID: <437D9F92.2000309@voidspace.org.uk> Hello all, I report this, because I did hear that any situation where Pure python code returned a core dump was deemed a 'bug'. I'm running Python 2.4.2 under windoze. If you go to idle and select "open module" from the file menu - and choose "operator", then Python crashes. Obviously attempting to open a C module like this isn't sensible - assuming you *knew* it was a C module. Anyway - I hope this report is vaguely interesting or amusing to someone out there. Hmm... I suppose I should report a bug on sourceforge. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml From jerrykingking_wz at yahoo.com.cn Fri Nov 18 11:54:44 2005 From: jerrykingking_wz at yahoo.com.cn (=?gb2312?q?=D5=DC=20=CD=F5?=) Date: Fri, 18 Nov 2005 18:54:44 +0800 (CST) Subject: [Idle-dev] Auto complete module for idle Message-ID: <20051118105444.58423.qmail@web15703.mail.cnb.yahoo.com> Hello: I'm a fan of python. I use IDLE for my work, so i made this patch. Hope its useful. How to upload my file? Thanks! --------------------------------- ÑÅ»¢Ãâ·ÑGÓÊÏ䣭ÖйúµÚÒ»¾øÎÞÀ¬»øÓʼþɧÈų¬´óÓÊÏä ÑÅ»¢ÖúÊÖ¡§DËÑË÷¡¢É±¶¾¡¢·ÀɧÈÅ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/idle-dev/attachments/20051118/abbcd883/attachment.htm From nnorwitz at gmail.com Fri Nov 18 18:44:07 2005 From: nnorwitz at gmail.com (Neal Norwitz) Date: Fri, 18 Nov 2005 09:44:07 -0800 Subject: [Idle-dev] Auto complete module for idle In-Reply-To: <20051118105444.58423.qmail@web15703.mail.cnb.yahoo.com> References: <20051118105444.58423.qmail@web15703.mail.cnb.yahoo.com> Message-ID: On 11/18/05, ÕÜ Íõ wrote: > > > Hello: > I'm a fan of python. I use IDLE for my work, so i made this patch. Hope > its useful. How to upload my file? Thanks! http://sourceforge.net/projects/python http://sourceforge.net/tracker/?group_id=5470&atid=305470 n From nnorwitz at gmail.com Fri Nov 18 18:58:49 2005 From: nnorwitz at gmail.com (Neal Norwitz) Date: Fri, 18 Nov 2005 09:58:49 -0800 Subject: [Idle-dev] Python Core Dump In-Reply-To: <437D9F92.2000309@voidspace.org.uk> References: <437D9F92.2000309@voidspace.org.uk> Message-ID: On 11/18/05, Fuzzyman wrote: > > Hmm... I suppose I should report a bug on sourceforge. Please do. n From kbk at shore.net Fri Nov 18 23:41:45 2005 From: kbk at shore.net (Kurt B. Kaiser) Date: Fri, 18 Nov 2005 17:41:45 -0500 Subject: [Idle-dev] Tool Tips and Attribute Selector In-Reply-To: <39gnk11ogr1hoemb2iilugb8bjurvos25h@4ax.com> (Franz =?iso-8859-1?Q?Steinh=E4usler's?= message of "Tue, 11 Oct 2005 15:58:20 +0200") References: <87vf066mwb.fsf@hydra.bayview.thirdcreek.com> <8764s56t8w.fsf@hydra.bayview.thirdcreek.com> <39gnk11ogr1hoemb2iilugb8bjurvos25h@4ax.com> Message-ID: <87acg1shna.fsf@hydra.bayview.thirdcreek.com> Franz Steinh?usler writes: > I think, it is the firewall, who blocks this: > Maybe the module or the protocol isn't ok > > In C:\Python24\Lib\idlelib: "C:\Programme\TortoiseCVS\cvs.exe" "checkout" "-P" "idlelib" > CVSROOT=:pserver:anonymous at cvs.sourceforge.net:/cvsroot/python > > cvs.exe [checkout aborted]: connect to cvs.sourceforge.net:2401 failed: > Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht ordnungsgem?? reagiert hat, > oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat. > > Error, CVS operation failed You may wish to try this with TortiseSVN on the new Python repository. http://www.python.org/dev/devfaq.html -- KBK From kbk at shore.net Sat Nov 19 02:10:58 2005 From: kbk at shore.net (Kurt B. Kaiser) Date: Fri, 18 Nov 2005 20:10:58 -0500 Subject: [Idle-dev] "Syntax" Branch Message-ID: <871x1dsaql.fsf@hydra.bayview.thirdcreek.com> I merged IDLE-syntax-branch into the svn trunk. -- KBK From kbk at shore.net Sat Nov 19 02:18:35 2005 From: kbk at shore.net (Kurt B. Kaiser) Date: Fri, 18 Nov 2005 20:18:35 -0500 Subject: [Idle-dev] Python Core Dump In-Reply-To: <437D9F92.2000309@voidspace.org.uk> (fuzzyman@voidspace.org.uk's message of "Fri, 18 Nov 2005 09:32:02 +0000") References: <437D9F92.2000309@voidspace.org.uk> Message-ID: <87wtj5qvtg.fsf@hydra.bayview.thirdcreek.com> Fuzzyman writes: > I report this, because I did hear that any situation where Pure python > code returned a core dump was deemed a 'bug'. > > I'm running Python 2.4.2 under windoze. > > If you go to idle and select "open module" from the file menu - and > choose "operator", then Python crashes. Obviously attempting to open > a C module like this isn't sensible - assuming you *knew* it was a C > module. > > Anyway - I hope this report is vaguely interesting or amusing to > someone out there. > > Hmm... I suppose I should report a bug on sourceforge. If I try this with 2.4.2 on W2K, I get an error dialog which says, "No source for module operator". There is no operator.py on my path. What happens when you try using the Python interactive interpreter? -- KBK From kbk at shore.net Sat Nov 19 02:22:26 2005 From: kbk at shore.net (Kurt B. Kaiser) Date: Fri, 18 Nov 2005 20:22:26 -0500 Subject: [Idle-dev] Line numbers in Idle (fwd) In-Reply-To: (Danny Yoo's message of "Sat, 5 Nov 2005 14:23:39 -0800 (PST)") References: Message-ID: <87slttqvn1.fsf@hydra.bayview.thirdcreek.com> Danny Yoo writes: > I have a question about Idle: is it possible to put on line numbers? > I can't find anything where to put it on. There is no feature to display line numbers. You can go to a line with Edit / Go to Line. There is a line/column indicator in the lower right corner of eadh IDLE window. -- KBK From fuzzyman at voidspace.org.uk Mon Nov 21 12:46:34 2005 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Mon, 21 Nov 2005 11:46:34 +0000 Subject: [Idle-dev] Python Core Dump In-Reply-To: <87wtj5qvtg.fsf@hydra.bayview.thirdcreek.com> References: <437D9F92.2000309@voidspace.org.uk> <87wtj5qvtg.fsf@hydra.bayview.thirdcreek.com> Message-ID: <4381B39A.80306@voidspace.org.uk> Kurt B. Kaiser wrote: >Fuzzyman writes: > > > >>I report this, because I did hear that any situation where Pure python >>code returned a core dump was deemed a 'bug'. >> >>I'm running Python 2.4.2 under windoze. >> >>If you go to idle and select "open module" from the file menu - and >>choose "operator", then Python crashes. Obviously attempting to open >>a C module like this isn't sensible - assuming you *knew* it was a C >>module. >> >>Anyway - I hope this report is vaguely interesting or amusing to >>someone out there. >> >>Hmm... I suppose I should report a bug on sourceforge. >> >> > >If I try this with 2.4.2 on W2K, I get an error dialog which says, "No >source for module operator". There is no operator.py on my path. > > > Mine neither - ``operator.pyd`` This could be an oddity of my windoze setup I suppose, but it's a fairly normal - XP SP2 running Activepython 2.4.2 It happens consistently, including on another machine running a Movable Python distribution frozen from the original machine. (It's also XP SP2). (The Movable Python machine is the one I'm using now.) >What happens when you try using the Python >interactive interpreter? > > > >From the Movable Python machine I'm on now : >>> import operator >>> operator >>> Is it still worth me filing this as a bug report ? All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/idle-dev/attachments/20051121/7f1da5f7/attachment.html From kbk at shore.net Mon Nov 21 18:38:48 2005 From: kbk at shore.net (Kurt B. Kaiser) Date: Mon, 21 Nov 2005 12:38:48 -0500 Subject: [Idle-dev] Line numbers in Idle (fwd) In-Reply-To: <7afdee2f0511191051h49197750v50f8c3a6c3cc0665@mail.gmail.com> (Tal Einat's message of "Sat, 19 Nov 2005 20:51:14 +0200") References: <87slttqvn1.fsf@hydra.bayview.thirdcreek.com> <7afdee2f0511191051h49197750v50f8c3a6c3cc0665@mail.gmail.com> Message-ID: <87hda5lx3r.fsf@hydra.bayview.thirdcreek.com> Tal Einat writes: > I thik this would be a god entry in the IDLE FAQ ;) The GoTo line number feature is explained in Help / IDLE Help The line/column indicator is pretty obvious, IMHO. It would be nice if dyoo updated "One Day of IDLE Toying". What is the IDLE FAQ? What would the value be in adding the clutter of line numbers and thereby reducing screen area? (Hint: after an exception, you can use the right click menu on the traceback to go to the offending source line.) > > On 11/19/05, Kurt B. Kaiser wrote: >> >> Danny Yoo writes: >> >> > I have a question about Idle: is it possible to put on line numbers? >> > I can't find anything where to put it on. >> >> There is no feature to display line numbers. You can go to a line >> with Edit / Go to Line. >> >> There is a line/column indicator in the lower right corner of eadh >> IDLE window. -- KBK From kbk at shore.net Mon Nov 21 21:14:01 2005 From: kbk at shore.net (Kurt B. Kaiser) Date: Mon, 21 Nov 2005 15:14:01 -0500 Subject: [Idle-dev] Python Core Dump In-Reply-To: <4381B39A.80306@voidspace.org.uk> (fuzzyman@voidspace.org.uk's message of "Mon, 21 Nov 2005 11:46:34 +0000") References: <437D9F92.2000309@voidspace.org.uk> <87wtj5qvtg.fsf@hydra.bayview.thirdcreek.com> <4381B39A.80306@voidspace.org.uk> Message-ID: <87d5ktlpx2.fsf@hydra.bayview.thirdcreek.com> Fuzzyman writes: >>If I try this with 2.4.2 on W2K, I get an error dialog which says, "No >>source for module operator". There is no operator.py on my path. >> >> >> > > Mine neither - ``operator.pyd`` There's a builtin module 'operator' in standard CPython, but no operator.pyd. It must have come with one of your non-standard implementations. Try this: Linux, Python 2.5a0: >>> import imp >>> imp.find_module('operator') (, '/home/kbk/PYDOTORG/projects/python/trunk/build/lib.linux-i686-2.5/operator.so', ('.so', 'rb', 3)) [Module is '3': C_EXTENSION] Windows 2K, Python 2.4.1: >>> imp.find_module('operator') (None, 'operator', ('', '', 6)) [Module is '6': C_BUILTIN] What do you get? > This could be an oddity of my windoze setup I suppose, but it's a fairly > normal - XP SP2 running Activepython 2.4.2 > > It happens consistently, including on another machine running a Movable > Python distribution frozen from the original machine. (It's also XP > SP2). (The Movable Python machine is the one I'm using now.) > >>What happens when you try using the Python >>interactive interpreter? >> >> >> >>From the Movable Python machine I'm on now : > >>>> import operator >>>> operator > >>>> > > Is it still worth me filing this as a bug report ? So far, I suspect the problem is in your setup, i.e. the non-standard Python module operator.pyd, rather than IDLE. The operator module should not be type '1'. But if you do get '3' or '6' for the module type, as I did, then try instrumenting EditorWindow._find_module() and EditorWindow.open_module() with print statements to locate your 'crash'. It may be that imp.load_module() is failing, try running it manually. I think it's fair to say that while it's ok to have several versions of python on your machine, they should be in separate directory trees. So if you are running CPython from python.org, there shouldn't be any operator.pyd from ActiveState or wherever in your CPython tree. If you are running ActiveState Python, I'm not going to be much help, I'm afraid. But if you can narrow it down to something in IDLE, I'll try to fix it. -- KBK From fuzzyman at voidspace.org.uk Tue Nov 22 10:11:00 2005 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Tue, 22 Nov 2005 09:11:00 +0000 Subject: [Idle-dev] Python Core Dump In-Reply-To: <87d5ktlpx2.fsf@hydra.bayview.thirdcreek.com> References: <437D9F92.2000309@voidspace.org.uk> <87wtj5qvtg.fsf@hydra.bayview.thirdcreek.com> <4381B39A.80306@voidspace.org.uk> <87d5ktlpx2.fsf@hydra.bayview.thirdcreek.com> Message-ID: <4382E0A4.90908@voidspace.org.uk> Kurt B. Kaiser wrote: > [snip...] > >>> >>> >>Mine neither - ``operator.pyd`` >> >> > >There's a builtin module 'operator' in standard CPython, but no operator.pyd. >It must have come with one of your non-standard implementations. > > > My mistake - I don't know where I got that idea from. I have no ``operator.pyd``. >Try this: >Windows 2K, Python 2.4.1: > > > >>>>imp.find_module('operator') >>>> >>>> >(None, 'operator', ('', '', 6)) > >[Module is '6': C_BUILTIN] > >What do you get? > > Windows XP SP2 - Activestate 2.4.2 IDLE 1.1.2 >>> import imp >>> imp.find_module('operator') (None, 'operator', ('', '', 6)) >>> import operator >>> operator.__file__ Traceback (most recent call last): File "", line 1, in -toplevel- operator.__file__ AttributeError: 'module' object has no attribute '__file__' >>> [snip..] >So far, I suspect the problem is in your setup, i.e. the non-standard >Python module operator.pyd, rather than IDLE. > >The operator module should not be type '1'. > >But if you do get '3' or '6' for the module type, as I did, then try >instrumenting EditorWindow._find_module() and >EditorWindow.open_module() with print statements to locate your >'crash'. It may be that imp.load_module() is failing, try running it >manually. > >I think it's fair to say that while it's ok to have several versions >of python on your machine, they should be in separate directory trees. >So if you are running CPython from python.org, there shouldn't be any >operator.pyd from ActiveState or wherever in your CPython tree. > > > The machine I tested it on *only* has Activestate Python 2.4.2 installed. The machine with Movable Python is different. I tried the test you suggest above, with interesting results. I edited ``EditorWindow._find_module`` with 7 print statements. Edited code shown below : def _find_module(fullname, path=None): """Version of imp.find_module() that handles hierarchical module names""" print 'fullname', fullname file = None for tgt in fullname.split('.'): if file is not None: file.close() # close intermediate files print 'tgt', tgt (file, filename, descr) = imp.find_module(tgt, path) print 'filename', filename print 'descr', descr if descr[2] == imp.PY_SOURCE: break # find but not load the source file module = imp.load_module(tgt, file, filename, descr) print 'Got here', module try: path = module.__path__ except AttributeError: print 'Got here too.' raise ImportError, 'No source for module ' + module.__name__ print 'Got here three ??' return file, filename, descr I then ran IDLE from the command line, and did "open module -> operator". You can see the results of the print statements below. The crash happens after the ImportError is raised... hmm.. maybe I should have tried patching ``EditorWindow.open_module`` as well, I didn't see that suggestion until now. Anyway - *after* the crash a traceback from Tkinter is printed to the console. This is part of an rpc call. Whether it will make any sense to you is another matter. :-) C:\Program Files\Windows Resource Kits\Tools>python C:\Python24\Lib\idlelib\idle.pyw fullname operator tgt operator filename operator descr ('', '', 6) Got here Got here too. Exception in Tkinter callback Traceback (most recent call last): File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ return self.func(*args) File "C:\Python24\lib\lib-tk\Tkinter.py", line 456, in callit func(*args) File "C:\Python24\lib\idlelib\PyShell.py", line 493, in poll_subprocess response = clt.pollresponse(self.active_seq, wait=0.05) File "C:\Python24\lib\idlelib\rpc.py", line 421, in pollresponse message = self.pollmessage(wait) File "C:\Python24\lib\idlelib\rpc.py", line 373, in pollmessage packet = self.pollpacket(wait) File "C:\Python24\lib\idlelib\rpc.py", line 344, in pollpacket r, w, x = select.select([self.sock.fileno()], [], [], wait) error: (10093, 'Either the application has not called WSAStartup, or WSAStartup failed') C:\Program Files\Windows Resource Kits\Tools> Let me know if you want me to file a bug report - or whatever. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml >If you are running ActiveState Python, I'm not going to be much help, >I'm afraid. But if you can narrow it down to something in IDLE, I'll >try to fix it. > > > From kbk at shore.net Tue Nov 22 22:26:52 2005 From: kbk at shore.net (Kurt B. Kaiser) Date: Tue, 22 Nov 2005 16:26:52 -0500 Subject: [Idle-dev] Python Core Dump In-Reply-To: <4382E0A4.90908@voidspace.org.uk> (fuzzyman@voidspace.org.uk's message of "Tue, 22 Nov 2005 09:11:00 +0000") References: <437D9F92.2000309@voidspace.org.uk> <87wtj5qvtg.fsf@hydra.bayview.thirdcreek.com> <4381B39A.80306@voidspace.org.uk> <87d5ktlpx2.fsf@hydra.bayview.thirdcreek.com> <4382E0A4.90908@voidspace.org.uk> Message-ID: <87mzjwjrvn.fsf@hydra.bayview.thirdcreek.com> Fuzzyman writes: > I tried the test you suggest above, with interesting results. > > I edited ``EditorWindow._find_module`` with 7 print statements. Edited > code shown below : > > def _find_module(fullname, path=None): > """Version of imp.find_module() that handles hierarchical module > names""" > print 'fullname', fullname > file = None > for tgt in fullname.split('.'): > if file is not None: > file.close() # close intermediate files > print 'tgt', tgt > (file, filename, descr) = imp.find_module(tgt, path) > print 'filename', filename > print 'descr', descr > if descr[2] == imp.PY_SOURCE: > break # find but not load the source file > module = imp.load_module(tgt, file, filename, descr) > print 'Got here', module > try: > path = module.__path__ > except AttributeError: > print 'Got here too.' > raise ImportError, 'No source for module ' + module.__name__ > print 'Got here three ??' > return file, filename, descr > > I then ran IDLE from the command line, and did "open module -> > operator". You can see the results of the print statements below. The > crash happens after the ImportError is raised... hmm.. maybe I should > have tried patching ``EditorWindow.open_module`` as well, I didn't see > that suggestion until now. > > Anyway - *after* the crash a traceback from Tkinter is printed to the > console. This is part of an rpc call. Whether it will make any sense to > you is another matter. :-) > > C:\Program Files\Windows Resource Kits\Tools>python > C:\Python24\Lib\idlelib\idle.pyw > fullname operator > tgt operator > filename operator > descr ('', '', 6) > Got here > Got here too. > Exception in Tkinter callback > Traceback (most recent call last): > File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ > return self.func(*args) > File "C:\Python24\lib\lib-tk\Tkinter.py", line 456, in callit > func(*args) > File "C:\Python24\lib\idlelib\PyShell.py", line 493, in poll_subprocess > response = clt.pollresponse(self.active_seq, wait=0.05) > File "C:\Python24\lib\idlelib\rpc.py", line 421, in pollresponse > message = self.pollmessage(wait) > File "C:\Python24\lib\idlelib\rpc.py", line 373, in pollmessage > packet = self.pollpacket(wait) > File "C:\Python24\lib\idlelib\rpc.py", line 344, in pollpacket > r, w, x = select.select([self.sock.fileno()], [], [], wait) > error: (10093, 'Either the application has not called WSAStartup, or > WSAStartup > failed') The rpc.py module is part of IDLE, but that's an error I haven't seen before. No new sockets are created while the subprocess is running. Is there any indication that the subprocess died? (Check your process manager, does the number of Python processes change after the crash?) Is this Exception reproducible? How long after the crash does it appear? Are there any other symptoms to the crash? I gather you never see 'WSAStartup failed' except in this case. Is "Got here too." always printed? Does the ImportError always appear? Does the crash occur before or after clicking "OK" on the exception dialog? If after, then instrument EditorWindow.open_module() to see how far it gets after _find_module() returns, and whether that's reproducible. -- KBK From fuzzyman at voidspace.org.uk Wed Nov 23 13:49:09 2005 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Wed, 23 Nov 2005 12:49:09 +0000 Subject: [Idle-dev] Python Core Dump In-Reply-To: <87mzjwjrvn.fsf@hydra.bayview.thirdcreek.com> References: <437D9F92.2000309@voidspace.org.uk> <87wtj5qvtg.fsf@hydra.bayview.thirdcreek.com> <4381B39A.80306@voidspace.org.uk> <87d5ktlpx2.fsf@hydra.bayview.thirdcreek.com> <4382E0A4.90908@voidspace.org.uk> <87mzjwjrvn.fsf@hydra.bayview.thirdcreek.com> Message-ID: <43846545.1080700@voidspace.org.uk> Kurt B. Kaiser wrote: >Fuzzyman writes: > > > >>[snip..] >>C:\Program Files\Windows Resource Kits\Tools>python >>C:\Python24\Lib\idlelib\idle.pyw >>fullname operator >>tgt operator >>filename operator >>descr ('', '', 6) >>Got here >>Got here too. >>Exception in Tkinter callback >>Traceback (most recent call last): >> File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ >> return self.func(*args) >> File "C:\Python24\lib\lib-tk\Tkinter.py", line 456, in callit >> func(*args) >> File "C:\Python24\lib\idlelib\PyShell.py", line 493, in poll_subprocess >> response = clt.pollresponse(self.active_seq, wait=0.05) >> File "C:\Python24\lib\idlelib\rpc.py", line 421, in pollresponse >> message = self.pollmessage(wait) >> File "C:\Python24\lib\idlelib\rpc.py", line 373, in pollmessage >> packet = self.pollpacket(wait) >> File "C:\Python24\lib\idlelib\rpc.py", line 344, in pollpacket >> r, w, x = select.select([self.sock.fileno()], [], [], wait) >>error: (10093, 'Either the application has not called WSAStartup, or >>WSAStartup >>failed') >> >> > >The rpc.py module is part of IDLE, but that's an error I haven't seen >before. No new sockets are created while the subprocess is running. >Is there any indication that the subprocess died? (Check your process >manager, does the number of Python processes change after the crash?) > > > I'll have to check all this tonight. I did wonder if the traceback is because the crash happens in the subprocess - meaning that the communication channel breaks - causing the traceback. That is pure conjecture though. :-) >Is this Exception reproducible? How long after the crash does it >appear? Are there any other symptoms to the crash? > > > Happens every time. The traceback occurs almost instantaneously on the crash (a memory location could not be read error). >I gather you never see 'WSAStartup failed' except in this case. > > > Never seen it before. >Is "Got here too." always printed? > Yup >Does the ImportError always appear? > > I never actually see the ``ImportError``, it's obviously being trapped and the exception occurs somewhere else. So I need to track down where the crash happens - presumably in ``EditorWindow.open_module``. I'll report back. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml >Does the crash occur before or after clicking "OK" on the exception >dialog? > > > > * If after, then instrument EditorWindow.open_module() to see how > far it > >gets after _find_module() returns, and whether that's reproducible. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/idle-dev/attachments/20051123/af7f6ea8/attachment.html From kbk at shore.net Wed Nov 23 23:11:13 2005 From: kbk at shore.net (Kurt B. Kaiser) Date: Wed, 23 Nov 2005 17:11:13 -0500 Subject: [Idle-dev] Python Core Dump In-Reply-To: <43846545.1080700@voidspace.org.uk> (fuzzyman@voidspace.org.uk's message of "Wed, 23 Nov 2005 12:49:09 +0000") References: <437D9F92.2000309@voidspace.org.uk> <87wtj5qvtg.fsf@hydra.bayview.thirdcreek.com> <4381B39A.80306@voidspace.org.uk> <87d5ktlpx2.fsf@hydra.bayview.thirdcreek.com> <4382E0A4.90908@voidspace.org.uk> <87mzjwjrvn.fsf@hydra.bayview.thirdcreek.com> <43846545.1080700@voidspace.org.uk> Message-ID: <8764qjj9q6.fsf@hydra.bayview.thirdcreek.com> Fuzzyman writes: > I did wonder if the traceback is because the crash happens in the > subprocess - meaning that the communication channel breaks - causing the > traceback. That is pure conjecture though. :-) The code in question is executing in the GUI. But see below. The exception may be coming from the subprocess because it's having problems communicating with an unresponsive GUI. > >>Is this Exception reproducible? How long after the crash does it >>appear? Are there any other symptoms to the crash? >> >> >> > Happens every time. > > The traceback occurs almost instantaneously on the crash (a memory > location could not be read error). So there is other information available related to the crash? Please post it. Is it reproducible? > >>I gather you never see 'WSAStartup failed' except in this case. >> >> >> > Never seen it before. > >>Is "Got here too." always printed? >> > > Yup > >>Does the ImportError always appear? >> >> > I never actually see the ``ImportError``, it's obviously being trapped > and the exception occurs somewhere else. So I need to track down where > the crash happens - presumably in ``EditorWindow.open_module``. Ah, the crash occurs while producing the ImportError dialog (which is raised by the very next line of code after your print statement)? Can you restart the subprocess by using Ctrl-F6 after the crash, or is the GUI completely dead/frozen? What happens when you run IDLE w/o the subprocess by using the -n switch? -- KBK From fuzzyman at voidspace.org.uk Thu Nov 24 13:56:22 2005 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Thu, 24 Nov 2005 12:56:22 +0000 Subject: [Idle-dev] Python Core Dump In-Reply-To: <8764qjj9q6.fsf@hydra.bayview.thirdcreek.com> References: <437D9F92.2000309@voidspace.org.uk> <87wtj5qvtg.fsf@hydra.bayview.thirdcreek.com> <4381B39A.80306@voidspace.org.uk> <87d5ktlpx2.fsf@hydra.bayview.thirdcreek.com> <4382E0A4.90908@voidspace.org.uk> <87mzjwjrvn.fsf@hydra.bayview.thirdcreek.com> <43846545.1080700@voidspace.org.uk> <8764qjj9q6.fsf@hydra.bayview.thirdcreek.com> Message-ID: <4385B876.1050206@voidspace.org.uk> Hello Kurt, I've done some more tracking of this crash (as below). It's quite likely to just be some obscure windows oddity (unless anyone else can reproduce this ?). If *possible* I'll try a clean install on another machine with XP SP2 and see what happens. (I have to cajole my IT admin here to let me). I'm quite happy to do this tracking around - but it's up to you how much effort you want to put in in following up what is just one bug report. Kurt B. Kaiser wrote: >Fuzzyman writes: > > > >>I did wonder if the traceback is because the crash happens in the >>subprocess - meaning that the communication channel breaks - causing the >>traceback. That is pure conjecture though. :-) >> >> > >The code in question is executing in the GUI. But see below. > >The exception may be coming from the subprocess because it's having >problems communicating with an unresponsive GUI. > > > >>>Is this Exception reproducible? How long after the crash does it >>>appear? Are there any other symptoms to the crash? >>> >>> >>> >>> >>> >>Happens every time. >> >>The traceback occurs almost instantaneously on the crash (a memory >>location could not be read error). >> >> > >So there is other information available related to the crash? Please >post it. Is it reproducible? > > > The windows crash method is always along the lines of : The instruction "0x10238786" referenced memory at "0x000000c4". The memory could not be "read". The location of the instruction always varies - but the "0x000000c4" is always the same. Other information ( I've copied and pasted your previous questions) : > Is there any indication that the subprocess died? (Check your process > manager, does the number of Python processes change after the crash?) No - two running up until the crash. I hit ok on the crash dialog and then both disappear together. > Is this Exception reproducible? How long after the crash does it > appear? Are there any other symptoms to the crash? Happens the same every time. The exception traceback appears immediately I hit Ok on the crash dialog. > I gather you never see 'WSAStartup failed' except in this case. Never. I normally don't run IDLE from the console though (so wouldn't *see* error messages anyway). > Is "Got here too." always printed? Yes > Does the ImportError always appear? I don't see it. The crash happens *before* the open module dialog goes. > Does the crash occur before or after clicking "OK" on the exception > dialog? Exception traceback occurs immediately *after* hitting ok. >>>I gather you never see 'WSAStartup failed' except in this case. >>> >>> >>> >>> >>> >>Never seen it before. >> >> >> >>>Is "Got here too." always printed? >>> >>> >>> >>Yup >> >> >> >>>Does the ImportError always appear? >>> >>> >>> >>> >>I never actually see the ``ImportError``, it's obviously being trapped >>and the exception occurs somewhere else. So I need to track down where >>the crash happens - presumably in ``EditorWindow.open_module``. >> >> > > >Ah, the crash occurs while producing the ImportError dialog (which is >raised by the very next line of code after your print statement)? > > > That's what fiddling with ``open_module`` confirms. Code (line 407 in EditorWindow.open_module) : try: print 'Got here' (f, file, (suffix, mode, type)) = _find_module(name) print 'Got here too.' except (NameError, ImportError), msg: print 'Got here three.' tkMessageBox.showerror("Import error", str(msg), parent=self.text) print 'Got here four.' return print 'Got here five ?' Output : C:\Documents and Settings\Voidspace>python C:\Python24\Lib\idlelib\idle.pyw Got here Got here three. Exception in Tkinter callback Traceback (most recent call last): File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ return self.func(*args) File "C:\Python24\lib\lib-tk\Tkinter.py", line 456, in callit func(*args) File "C:\Python24\lib\idlelib\PyShell.py", line 493, in poll_subprocess response = clt.pollresponse(self.active_seq, wait=0.05) File "C:\Python24\lib\idlelib\rpc.py", line 421, in pollresponse message = self.pollmessage(wait) File "C:\Python24\lib\idlelib\rpc.py", line 373, in pollmessage packet = self.pollpacket(wait) File "C:\Python24\lib\idlelib\rpc.py", line 344, in pollpacket r, w, x = select.select([self.sock.fileno()], [], [], wait) error: (10093, 'Either the application has not called WSAStartup, or WSAStartup failed') *However* - If I call tkMessageBox.showerror myself - it works fine (so that's not broken on my box). EditorWindow.test() seems to fail by the way ? :-) >Can you restart the subprocess by using Ctrl-F6 after the crash, or is >the GUI completely dead/frozen? > > The GUI is frozen until you hit Ok on the crash dialog - then the GUI vanishes. >What happens when you run IDLE w/o the subprocess by using the -n switch? > > Ah... crash but no traceback. :-) Fuzzyman http://www.voidspace.org.uk/python/index.shtml -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/idle-dev/attachments/20051124/5b18a437/attachment.htm From kbk at shore.net Fri Nov 25 18:16:49 2005 From: kbk at shore.net (Kurt B. Kaiser) Date: Fri, 25 Nov 2005 12:16:49 -0500 Subject: [Idle-dev] Python Core Dump In-Reply-To: <4385B876.1050206@voidspace.org.uk> (fuzzyman@voidspace.org.uk's message of "Thu, 24 Nov 2005 12:56:22 +0000") References: <437D9F92.2000309@voidspace.org.uk> <87wtj5qvtg.fsf@hydra.bayview.thirdcreek.com> <4381B39A.80306@voidspace.org.uk> <87d5ktlpx2.fsf@hydra.bayview.thirdcreek.com> <4382E0A4.90908@voidspace.org.uk> <87mzjwjrvn.fsf@hydra.bayview.thirdcreek.com> <43846545.1080700@voidspace.org.uk> <8764qjj9q6.fsf@hydra.bayview.thirdcreek.com> <4385B876.1050206@voidspace.org.uk> Message-ID: <87lkzcwsu6.fsf@hydra.bayview.thirdcreek.com> Fuzzyman writes: > It's quite likely to just be some obscure windows oddity (unless anyone > else can reproduce this ?). If *possible* I'll try a clean install on > another machine with XP SP2 and see what happens. (I have to cajole my > IT admin here to let me). > > I'm quite happy to do this tracking around - but it's up to you how much > effort you want to put in in following up what is just one bug report. Thanks, I can't duplicate it. I'm trying to determine if the symptoms point to anything that should be fixed. [...] > The windows crash method is always along the lines of : > > The instruction "0x10238786" referenced memory at "0x000000c4". The > memory > could not be "read". > > The location of the instruction always varies - but the "0x000000c4" is > always the same. That implies a bad memory location, or possibly a bad pointer somewhere which points to that location. Also, try loading Word or something before you load IDLE. > Other information ( I've copied and pasted your previous questions) : > >> Is there any indication that the subprocess died? (Check your process >> manager, does the number of Python processes change after the crash?) > > No - two running up until the crash. > I hit ok on the crash dialog and then both disappear together. > >> Is this Exception reproducible? How long after the crash does it >> appear? Are there any other symptoms to the crash? > > Happens the same every time. The exception traceback appears > immediately I hit Ok on the crash dialog. > >> I gather you never see 'WSAStartup failed' except in this case. > > Never. I normally don't run IDLE from the console though (so wouldn't *see* > error messages anyway). > >> Is "Got here too." always printed? > > Yes > >> Does the ImportError always appear? > > I don't see it. The crash happens *before* the open module dialog goes. > >> Does the crash occur before or after clicking "OK" on the exception >> dialog? > > Exception traceback occurs immediately *after* hitting ok. > [...] >>Ah, the crash occurs while producing the ImportError dialog (which is >>raised by the very next line of code after your print statement)? >> >> >> > > That's what fiddling with ``open_module`` confirms. > > Code (line 407 in EditorWindow.open_module) : > > try: > print 'Got here' > (f, file, (suffix, mode, type)) = _find_module(name) > print 'Got here too.' > except (NameError, ImportError), msg: > print 'Got here three.' > tkMessageBox.showerror("Import error", str(msg), > parent=self.text) > print 'Got here four.' > return > print 'Got here five ?' > > > Output : > > C:\Documents and Settings\Voidspace>python C:\Python24\Lib\idlelib\idle.pyw > Got here > Got here three. > Exception in Tkinter callback > Traceback (most recent call last): > File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ > return self.func(*args) > File "C:\Python24\lib\lib-tk\Tkinter.py", line 456, in callit > func(*args) > File "C:\Python24\lib\idlelib\PyShell.py", line 493, in poll_subprocess > response = clt.pollresponse(self.active_seq, wait=0.05) > File "C:\Python24\lib\idlelib\rpc.py", line 421, in pollresponse > message = self.pollmessage(wait) > File "C:\Python24\lib\idlelib\rpc.py", line 373, in pollmessage > packet = self.pollpacket(wait) > File "C:\Python24\lib\idlelib\rpc.py", line 344, in pollpacket > r, w, x = select.select([self.sock.fileno()], [], [], wait) > error: (10093, 'Either the application has not called WSAStartup, or > WSAStartup > failed') > > *However* - If I call tkMessageBox.showerror myself - it works fine (so > that's not broken on my box). > > EditorWindow.test() seems to fail by the way ? :-) > > >>Can you restart the subprocess by using Ctrl-F6 after the crash, or is >>the GUI completely dead/frozen? >> >> > The GUI is frozen until you hit Ok on the crash dialog - then the GUI > vanishes. > >>What happens when you run IDLE w/o the subprocess by using the -n switch? >> >> > Ah... crash but no traceback. :-) OK, so it's likely the traceback is caused by the subprocess complaining that the socket is no longer being serviced correctly by the dead GUI. rpc.py is run by both the GUI and the subprocess. No subprocess, no complaint :-) If you want to continue playing with this (it can be instructive), I'd always run IDLE with the -n switch. Then run IDLE under pdb, with the -n switch, and set a break in open_module just before the failure. Step into the crash and see if anything interesting shows up. It may be a Tcl/Tk bug of some kind. A clean install of Python, IDLE, and Tcl/Tk might solve the problem and might get you there faster than futzing around with the above suggestion. -- KBK