From dscherertemp at gmail.com Thu Jun 5 20:10:49 2008 From: dscherertemp at gmail.com (David Scherer) Date: Thu, 5 Jun 2008 14:10:49 -0400 Subject: [Idle-dev] Fix for long delays In-Reply-To: <52632.71.59.123.159.1211856219.squirrel@webmail.brynmawr.edu> References: <483AE025.9070004@ncsu.edu> <49812.71.59.123.159.1211836576.squirrel@webmail.brynmawr.edu> <41288ed40805261901s15520d19n1fb861a13b0af6ca@mail.gmail.com> <41288ed40805261903r21b75d3bw9f24678e030a480e@mail.gmail.com> <52632.71.59.123.159.1211856219.squirrel@webmail.brynmawr.edu> Message-ID: <41288ed40806051110p53559a6eg5fb267f91ba34ca@mail.gmail.com> Hi all, I'm back from my trip. [Douglas] > Exception exceptions.AttributeError: "'NoneType' object has no attribute > 'maxint'" in 0x9007e0c>> ignored Believe it or not, this appears to be a bug in the subprocess module that was fixed in Python 2.5.1. The relevant checkin is this one . [Douglas] > I had to adjust the patch a bit as it got mangled through the mailer (and > I've attached the version to this email) so please check that I got it all. What you sent looks right to me, though the bug Tal pointed out is still there (SIGTERM = 9 instead of SIGKILL = 9). [Douglas] > I agree that for the us the "no subprocess mode" causes confusion. I'd vote > to make get rid of it, or at least to not make it the default. [Tal] > I certainly agree that using a subprocess should always be the default. > However, no-subprocess mode is very useful in certain cases, such as > debugging IDLE itself, so we'd need a good reason to get rid of it. > Agreed. This isn't as high priority for us as the termination issue, but it would be best to default to using a subprocess regardless of how IDLE is started, and to support multiple instances of IDLE with subprocesses. There's no problem with having a command line option or setting for no-subprocess mode, it just shouldn't happen to the naive user. [Tal] > The reason no-subprocess mode is the default on Windows is to avoid > trying to open more than subprocess, since opening a second one > usually fails because of port clashes. About a year ago I worked up a > patch: http://bugs.python.org/issue1529142, "Allowing multiple > instances of IDLE with sub-processes". The problem with it is that I > haven't been able to get it accepted, because of lack of interest and > its relative complexity. Why not just bind to port 0 ("any") and then do self.port = self.rpcclt.listening_sock.getsockname()[1] to find what port the OS has assigned? I tried that and IWFM. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From taleinat at gmail.com Fri Jun 6 12:03:23 2008 From: taleinat at gmail.com (Tal Einat) Date: Fri, 6 Jun 2008 13:03:23 +0300 Subject: [Idle-dev] Fix for long delays In-Reply-To: <41288ed40806051110p53559a6eg5fb267f91ba34ca@mail.gmail.com> References: <483AE025.9070004@ncsu.edu> <49812.71.59.123.159.1211836576.squirrel@webmail.brynmawr.edu> <41288ed40805261901s15520d19n1fb861a13b0af6ca@mail.gmail.com> <41288ed40805261903r21b75d3bw9f24678e030a480e@mail.gmail.com> <52632.71.59.123.159.1211856219.squirrel@webmail.brynmawr.edu> <41288ed40806051110p53559a6eg5fb267f91ba34ca@mail.gmail.com> Message-ID: <7afdee2f0806060303l39740947m775da2bfaa091f02@mail.gmail.com> David Scherer wrote: > > The reason no-subprocess mode is the default on Windows is to avoid >> trying to open more than subprocess, since opening a second one >> usually fails because of port clashes. About a year ago I worked up a >> patch: http://bugs.python.org/issue1529142, "Allowing multiple >> instances of IDLE with sub-processes". The problem with it is that I >> haven't been able to get it accepted, because of lack of interest and >> its relative complexity. > > > Why not just bind to port 0 ("any") and then do self.port = > self.rpcclt.listening_sock.getsockname()[1] to find what port the OS has > assigned? I tried that and IWFM. > I've never heard of that option - it sounds great! Is it supported on all platforms? Can't that cause problems by binding to ports commonly used by other programs? - Tal -------------- next part -------------- An HTML attachment was scrubbed... URL: From dscherertemp at gmail.com Sat Jun 7 01:25:36 2008 From: dscherertemp at gmail.com (David Scherer) Date: Fri, 6 Jun 2008 19:25:36 -0400 Subject: [Idle-dev] Fix for long delays In-Reply-To: <7afdee2f0806060303l39740947m775da2bfaa091f02@mail.gmail.com> References: <483AE025.9070004@ncsu.edu> <49812.71.59.123.159.1211836576.squirrel@webmail.brynmawr.edu> <41288ed40805261901s15520d19n1fb861a13b0af6ca@mail.gmail.com> <41288ed40805261903r21b75d3bw9f24678e030a480e@mail.gmail.com> <52632.71.59.123.159.1211856219.squirrel@webmail.brynmawr.edu> <41288ed40806051110p53559a6eg5fb267f91ba34ca@mail.gmail.com> <7afdee2f0806060303l39740947m775da2bfaa091f02@mail.gmail.com> Message-ID: <41288ed40806061625n61477fa4tdf594a84597b0eb1@mail.gmail.com> [Me] > Why not just bind to port 0 ("any") and then do self.port = >> self.rpcclt.listening_sock.getsockname()[1] to find what port the OS has >> assigned? I tried that and IWFM. >> > [Tal] > I've never heard of that option - it sounds great! Is it supported on all > platforms? Can't that cause problems by binding to ports commonly used by > other programs? > I can't guarantee that it works on all platforms, but my belief is that it's standard BSD sockets behavior. It almost certainly works on Windows and Linux. As for binding to commonly used ports, nearly all *client* programs are also asking the OS to allocate ports for them, so I don't IDLE asking for two ports instead of one is a big problem :-). I expect each OS does something very similar to what you did internally, allocating ports from a range that doesn't have a lot of well-known ports. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From Scott.Daniels at Acm.Org Mon Jun 9 01:42:22 2008 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sun, 08 Jun 2008 16:42:22 -0700 Subject: [Idle-dev] idle on 2.6+ and warnings Message-ID: idle's warnings formatters need to grow another arg (line = None), just as the formatwarnings function in the warnings module grew one. This is needed for: In idlelib.PyShell.py: idle_showwarning idle_formatwarning and in idlelib.run.py: idle_formatwarning_subproc I noticed this when I tried code that did "import md5". -Scott David Daniels Scott.Daniels at Acm.Org From crowyeh at vip.sina.com Mon Jun 9 18:08:29 2008 From: crowyeh at vip.sina.com (=?GB2312?B?ItK2ILflfENyb3cgWWVoKFllIEZlbmcpIg==?=) Date: Tue, 10 Jun 2008 00:08:29 +0800 Subject: [Idle-dev] Help needed for using IDLE under Ubuntu 8.04 Message-ID: <484D557D.6000109@vip.sina.com> Hi, I'm totally a beginner of python. I met some strange problem on using IDLE. Python version is 2.5.2 IDLE version is 1.2.2 Ubuntu version: 8.04 All works fine except function invoking. Say, the basic help() function, if I type in help(dir) and hit RETURN, nothing happens, and the keyboard seems to be locked inside IDLE. I mean no matter what I type afterwards, it looks like I typed nothing. The pointer keeps flickering and IDLE just refuses to accept any further keyboard input. The keyboard still functions well outside IDLE. To see the feedback of help(dir), I have to invoke File->Print Window (Yes the mouse still works fine inside IDLE), then I see the pointer moves to the beginning of the next line, and now if I hit RETURN again, it prints out the help info for "dir", and then my keyboard seems alive inside IDLE again! Python interactive session works OK as expected. It seems that only IDLE doesn't like RETURN to be hit after the tailing "()" of functions. I've tried several different function calls, same issue happens every time I hit RETURN after typing in the function call (like "somefunction(whatever)"). I've tried IDLE under Windows too, works fine. Ubuntu is main OS for me to work on, and I don't want to switch to Windows for such a reason. I've tried reinstalling IDLE with no luck. I also tried asking for help in Ubuntu community like ubuntuforums.org, but all I get is suggestions of trying out other python compatible IDEs insted of how to solve the problem. And I get no confirm about the issue. So I don't even know if it is some problem happens to me only. Really strange, isn't it? Or am I missing something? Please help. I'd really like to use IDLE as python IDE as I thought it should be more native to python! -- Sincerely, ? ?|Crow Yeh(Ye Feng) From Bruce_Sherwood at ncsu.edu Sat Jun 21 06:10:01 2008 From: Bruce_Sherwood at ncsu.edu (Bruce Sherwood) Date: Fri, 20 Jun 2008 22:10:01 -0600 Subject: [Idle-dev] Help needed for using IDLE under Ubuntu 8.04 In-Reply-To: <484D557D.6000109@vip.sina.com> References: <484D557D.6000109@vip.sina.com> Message-ID: <485C7F19.4070300@ncsu.edu> I'm also running Ubuntu 8 with Python 2.5, and I don't see any of the misbehavior that you see. However, it's possible that I don't understand your comment, "Python interactive session works OK as expected. It seems that only IDLE doesn't like RETURN to be hit after the tailing "()" of functions." First you say it works OK, then you say it doesn't work OK. I have no idea what's wrong on your machine, but in the IDLE shell window I can definitely execute the function calls that you are unable to execute. Bruce Sherwood ? ?|Crow Yeh(Ye Feng) wrote: > Hi, > > I'm totally a beginner of python. I met some strange problem on using IDLE. > > Python version is 2.5.2 > IDLE version is 1.2.2 > Ubuntu version: 8.04 > > All works fine except function invoking. > Say, the basic help() function, if I type in help(dir) and hit RETURN, > nothing happens, and the keyboard seems to be locked inside IDLE. I mean > no matter what I type afterwards, it looks like I typed nothing. The > pointer keeps flickering and IDLE just refuses to accept any further > keyboard input. The keyboard still functions well outside IDLE. > To see the feedback of help(dir), I have to invoke File->Print Window > (Yes the mouse still works fine inside IDLE), then I see the pointer > moves to the beginning of the next line, and now if I hit RETURN again, > it prints out the help info for "dir", and then my keyboard seems alive > inside IDLE again! > > Python interactive session works OK as expected. It seems that only IDLE > doesn't like RETURN to be hit after the tailing "()" of functions. I've > tried several different function calls, same issue happens every time I > hit RETURN after typing in the function call (like > "somefunction(whatever)"). > > I've tried IDLE under Windows too, works fine. Ubuntu is main OS for me > to work on, and I don't want to switch to Windows for such a reason. > I've tried reinstalling IDLE with no luck. I also tried asking for help > in Ubuntu community like ubuntuforums.org, but all I get is suggestions > of trying out other python compatible IDEs insted of how to solve the > problem. And I get no confirm about the issue. So I don't even know if > it is some problem happens to me only. > > Really strange, isn't it? Or am I missing something? > > Please help. I'd really like to use IDLE as python IDE as I thought it > should be more native to python! > > From crowyeh at vip.sina.com Sat Jun 21 19:22:24 2008 From: crowyeh at vip.sina.com (=?GB2312?B?ItK2ILflfENyb3cgWWVoKFllIEZlbmcpIg==?=) Date: Sun, 22 Jun 2008 01:22:24 +0800 Subject: [Idle-dev] Help needed for using IDLE under Ubuntu 8.04 In-Reply-To: <485C7F19.4070300@ncsu.edu> References: <484D557D.6000109@vip.sina.com> <485C7F19.4070300@ncsu.edu> Message-ID: <485D38D0.7070903@vip.sina.com> An HTML attachment was scrubbed... URL: