From taleinat at gmail.com Wed Nov 5 14:07:26 2008 From: taleinat at gmail.com (Tal Einat) Date: Wed, 5 Nov 2008 15:07:26 +0200 Subject: [Idle-dev] bug or annoyance in IDLE on win32 In-Reply-To: References: Message-ID: <7afdee2f0811050507s767cca5s1f00827e9f104f52@mail.gmail.com> wrote: > bug or annoyance in IDLE: > Acutually this has to do with the tk Text widget. > By default the Text widget binds mouse event "" to paste currently > highlighted text. Now i guess this would not be a problem EXCEPT for the > fact that > IDLE does not have a Left/Right scroll bar, So the only way to scroll left > and right is > to hold down and move, causing the binding to be called, and in > turn > pasting text were you did not want it pasted. : -( > [snip] > Maybe there is a use for this but for me it just serves to frustrate me. > Ok back to the solution: > I know how to override this binding, i do it in all my programs that > include a text editor. By inserting this line: text.bind_class('Text', > '', lambda e: None)...and > WHAMO no more annoying paste action...i love power :-D. I would love to code > a > solution and submit it to someone but only problem is i have looked through > every module in idlelib and i cant make heads or tails of it. So i will have > to leave this to someone more qualified than I. > > Couple of ways to solve this: > > 1. Allow users to rebind mouse events along with keyboard events...GOOD > (Power to the people!) > > 2. hack the code..BAD > > 3. write an extension that rebinds at runtime...UGLY > > 4. Add a left/write scrollbar to IDLE...BAD...i find draging with the mouse > to be quicker Thanks for bringing this up! I think the most user-friendly way would be to add a preferences option regarding this, e.g. a checkbox labelled "Mouse Button 2 (middle button) Pastes Current Text". However, cluttering up the config dialog is also something to be avoided, and now that I think of it, most users will probably not understand what that's for anyways. We could just add this as a config option which can be manually changed in the config files, without a way to change it in the config dialogs. This way power users who want to change the behavior have a relatively easy way, but others are not bothered with this option. It seems to me that scrolling with Mouse Button 2 would be the expected behavior for most users these days. Maybe this should be the default? (If we do this, we could still consider making the 'paste' functionality available via a config option.) - Tal From scratali at gmail.com Fri Nov 7 14:44:36 2008 From: scratali at gmail.com (Ali Sha'bani) Date: Fri, 7 Nov 2008 17:14:36 +0330 Subject: [Idle-dev] Improving Python's IDLE Message-ID: Hi! With thanks to your great efforts, it would be nice if you could add copy/paste to right click menu. -------------- next part -------------- An HTML attachment was scrubbed... URL: From taleinat at gmail.com Sun Nov 9 13:12:15 2008 From: taleinat at gmail.com (Tal Einat) Date: Sun, 9 Nov 2008 14:12:15 +0200 Subject: [Idle-dev] bug or annoyance in IDLE on win32 In-Reply-To: References: <7afdee2f0811050507s767cca5s1f00827e9f104f52@mail.gmail.com> Message-ID: <7afdee2f0811090412s32928e40p96aa0ba1f25b3a40@mail.gmail.com> Nick Buchholz wrote: > On Wed, 5 Nov 2008 15:07:26 +0200 > "Tal Einat" wrote: >>It seems to me that scrolling with Mouse Button 2 would be the >>expected behavior for most users these days. Maybe this should be the >>default? (If we do this, we could still consider making the 'paste' >>functionality available via a config option.) > except that linux xterm and X11 in general uses the button2 to paste selected > text. > Windows seems to paste selection on top of clipboard. > > A better solution might be for the right/left scroll to occur when the mouse is > > moved to the right/left edge of the text box. Or to define another ket to > activate > the scroll left/right how about scroll??? Still, the vast majority of the users are on windows, especially novice users who are IDLE's original target user base. Since Tkinter doesn't use native widgets we can't have them behave as expected in every platform. Also, pasting can be done easily enough in other ways, while scrolling left/right is somewhat problematic. - Tal From linuxyuking at gmail.com Thu Nov 13 12:30:31 2008 From: linuxyuking at gmail.com (kay2008) Date: Thu, 13 Nov 2008 03:30:31 -0800 (PST) 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: <20479033.post@talk.nabble.com> got any clue yet? I encountered the same problem under Ubuntu 8.10, I think the problem is with the call tip, that is the small box poped up giving you a tip with regarding to the arguments expected when you type a function. The problem occur not only when you type the closing parenthesis, in fact, whatever you type, once the call tip box disappear, the problem arise. Ubuntu: 8.10 Chinese Mainland Python: 2.6 IDLE: 2.6 TK:8.4 -- View this message in context: http://www.nabble.com/Help-needed-for-using-IDLE-under-Ubuntu-8.04-tp17903673p20479033.html Sent from the Python - idle-dev mailing list archive at Nabble.com. From linuxyuking at gmail.com Thu Nov 13 12:42:52 2008 From: linuxyuking at gmail.com (kay2008) Date: Thu, 13 Nov 2008 03:42:52 -0800 (PST) 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: <20479192.post@talk.nabble.com> OK, I just found that the problem is specific to Chinese session. Switch to English(US) to login, the problem disappear... -- View this message in context: http://www.nabble.com/Help-needed-for-using-IDLE-under-Ubuntu-8.04-tp17903673p20479192.html Sent from the Python - idle-dev mailing list archive at Nabble.com. From linuxyuking at gmail.com Thu Nov 13 15:33:14 2008 From: linuxyuking at gmail.com (kay2008) Date: Thu, 13 Nov 2008 06:33:14 -0800 (PST) Subject: [Idle-dev] Help needed for using IDLE under Ubuntu 8.04 Message-ID: <20479192.post@talk.nabble.com> finally track down the problem, IDLE and scim-pinyin(A Input Method) coexist problem, still don't know how to deal with it.. -- View this message in context: http://www.nabble.com/Help-needed-for-using-IDLE-under-Ubuntu-8.04-tp17903673p20479192.html Sent from the Python - idle-dev mailing list archive at Nabble.com. From Scott.Daniels at Acm.Org Sun Nov 16 20:46:30 2008 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sun, 16 Nov 2008 11:46:30 -0800 Subject: [Idle-dev] Cofiguration on OSX Message-ID: I'm not seeing the options menu on OSX (Leopard). Is there something I broke, or is this a known problem? --Scott David Daniels Scott.Daniels at Acm.Org From Bruce_Sherwood at ncsu.edu Mon Nov 17 17:15:47 2008 From: Bruce_Sherwood at ncsu.edu (Bruce Sherwood) Date: Mon, 17 Nov 2008 11:15:47 -0500 Subject: [Idle-dev] Cofiguration on OSX In-Reply-To: References: Message-ID: <492198B3.8050302@ncsu.edu> I'm puzzled by this, too. If you set up a shell script to drive python ......idlelib/idle.pyw then you get all of IDLE's capabilities, including the options menu. It looks like someone went to a lot of trouble on the Mac to make a special "IDLE" app that is crippled. However, there's more crippling, because with either kind of access to IDLE, there are serious mouse interaction problems, at least with Python 2.5. Click in some text, and the insertion point ends up somewhere else. Drag the scrollbar and it sticks and gets behind. There seem to be even bigger problems with Python 2.6. Bruce Sherwood Scott David Daniels wrote: > I'm not seeing the options menu on OSX (Leopard). > Is there something I broke, or is this a known problem? > > --Scott David Daniels > Scott.Daniels at Acm.Org > > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > http://mail.python.org/mailman/listinfo/idle-dev From Scott.Daniels at Acm.Org Mon Nov 17 19:46:44 2008 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Mon, 17 Nov 2008 10:46:44 -0800 Subject: [Idle-dev] Cofiguration on OSX In-Reply-To: <492198B3.8050302@ncsu.edu> References: <492198B3.8050302@ncsu.edu> Message-ID: <4921BC14.4030406@Acm.Org> Bruce Sherwood wrote: > I'm puzzled by this, too. If you set up a shell script to drive > > python ......idlelib/idle.pyw > > then you get all of IDLE's capabilities, including the options menu. It > looks like someone went to a lot of trouble on the Mac to make a special > "IDLE" app that is crippled. I'm having trouble getting a full Python build from sources to work on my OS/X Leopard box (Tkinter problems). However, I've just installed Python 2.6 using ActiveState's 2.6. Using that, and the command line "python -m idlelib.idle", I see both the "Options / Configure IDLE..." and I see the new "Preferences...." entry under the title. > However, there's more crippling, because with either kind of access to > IDLE, there are serious mouse interaction problems, at least with Python > 2.5. Click in some text, and the insertion point ends up somewhere else. > Drag the scrollbar and it sticks and gets behind. > There seem to be even bigger problems with Python 2.6. I note that that terminal window has a lot of outputs like: RCNE SendEventToEventTarget (suom Moved ) failed, -50 And a few: RCNE SendEventToEventTarget (suom 8 ) failed, -9870 RCNE SendEventToEventTarget (suom 9 ) failed, -9870 --Scott David Daniels Scott.Daniels at Acm.Org From sean at ticketweb.com Fri Nov 21 23:06:12 2008 From: sean at ticketweb.com (Sean Wolfe) Date: Fri, 21 Nov 2008 14:06:12 -0800 Subject: [Idle-dev] right click to edit in windowsXP Message-ID: <50CE562EE612A046BF831CD48CF112896AD315@ELSCA-EXB-AV1.ticketmaster.corp> hey everybody! first of all thanks for a fun, lightweight, friendly ide. I'm just poking around using Python as a way to learn basic coding, and idle is a fun place to do work. I'm seeing a problem when I right-click and then hit F5 to run the program, where the first time I run the program it works fine, but subsequent runs fail. I'm using the pygame module and windowsXP. For example, a font I'm trying to render with pygame, first time renders fine, subsequent runs error that the font has no width. Opening the file via the executeable works fine. Doing some research, I noticed this on the pygame.org page: "On Windows if you open a python file with a "right-click: Edit with Idle" the editor and interactive prompt both run from the same Python process." http://www.pygame.org/wiki/FrequentlyAskedQuestions Is there a way to use the right-click option and save the F5 runs spawn a new python process? anyhow. . . thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Scott.Daniels at Acm.Org Mon Nov 17 19:46:44 2008 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Mon, 17 Nov 2008 10:46:44 -0800 Subject: [Idle-dev] Cofiguration on OSX In-Reply-To: <492198B3.8050302@ncsu.edu> References: <492198B3.8050302@ncsu.edu> Message-ID: <4921BC14.4030406@Acm.Org> Bruce Sherwood wrote: > I'm puzzled by this, too. If you set up a shell script to drive > > python ......idlelib/idle.pyw > > then you get all of IDLE's capabilities, including the options menu. It > looks like someone went to a lot of trouble on the Mac to make a special > "IDLE" app that is crippled. I'm having trouble getting a full Python build from sources to work on my OS/X Leopard box (Tkinter problems). However, I've just installed Python 2.6 using ActiveState's 2.6. Using that, and the command line "python -m idlelib.idle", I see both the "Options / Configure IDLE..." and I see the new "Preferences...." entry under the title. > However, there's more crippling, because with either kind of access to > IDLE, there are serious mouse interaction problems, at least with Python > 2.5. Click in some text, and the insertion point ends up somewhere else. > Drag the scrollbar and it sticks and gets behind. > There seem to be even bigger problems with Python 2.6. I note that that terminal window has a lot of outputs like: RCNE SendEventToEventTarget (suom Moved ) failed, -50 And a few: RCNE SendEventToEventTarget (suom 8 ) failed, -9870 RCNE SendEventToEventTarget (suom 9 ) failed, -9870 --Scott David Daniels Scott.Daniels at Acm.Org From clockworksaint at gmail.com Fri Nov 28 15:17:10 2008 From: clockworksaint at gmail.com (Weeble) Date: Fri, 28 Nov 2008 14:17:10 +0000 Subject: [Idle-dev] multiprocessing module and IDLE without subprocess Message-ID: <13e3f9930811280617t6630e5beu2fcb4d4b08d7d5f8@mail.gmail.com> It appears that any attempt to spawn processes using the new multiprocessing module in Python 2.6 will instead open up a new empty file in an IDLE window, *if* running without a subprocess. I don't particularly *want* to run without a subprocess, but the alternative on Windows is pretty bad: you can only have one instance of IDLE and trying to open a new one will sit waiting for ages before complaining that it can't connect to the subprocess. Is it possible to get this to work without a subprocess, and if not, what will it take to get the subprocess working properly on Windows? I believe a patch was written some time ago to do this, but it never made it in. Was it too much of a hack? Is there a better way to do this? http://bugs.python.org/issue1529142 I'd like to help, but I'm not sure how to get started in IDLE development. Is there a guide somewhere? I looked at http://www.python.org/idle/ but it's completely empty. From taleinat at gmail.com Sat Nov 29 12:37:52 2008 From: taleinat at gmail.com (Tal Einat) Date: Sat, 29 Nov 2008 13:37:52 +0200 Subject: [Idle-dev] multiprocessing module and IDLE without subprocess In-Reply-To: <13e3f9930811280617t6630e5beu2fcb4d4b08d7d5f8@mail.gmail.com> References: <13e3f9930811280617t6630e5beu2fcb4d4b08d7d5f8@mail.gmail.com> Message-ID: <7afdee2f0811290337j1fa9195y8a65cfbd7845b8bc@mail.gmail.com> On Fri, Nov 28, 2008 at 4:17 PM, Weeble wrote: > It appears that any attempt to spawn processes using the new > multiprocessing module in Python 2.6 will instead open up a new empty > file in an IDLE window, *if* running without a subprocess. I don't > particularly *want* to run without a subprocess, but the alternative > on Windows is pretty bad: you can only have one instance of IDLE and > trying to open a new one will sit waiting for ages before complaining > that it can't connect to the subprocess. Is it possible to get this to > work without a subprocess, and if not, what will it take to get the > subprocess working properly on Windows? I believe a patch was written > some time ago to do this, but it never made it in. Was it too much of > a hack? Is there a better way to do this? > > http://bugs.python.org/issue1529142 > > I'd like to help, but I'm not sure how to get started in IDLE > development. Is there a guide somewhere? I looked at > > http://www.python.org/idle/ > > but it's completely empty. First of all, the multiprocessing module doesn't work fully in an interactive shell. >From the Python2.6 docs: "Note Functionality within this package requires that the __main__ method be importable by the children. This is covered in Programming guidelines however it is worth pointing out here. This means that some examples, such as the multiprocessing.Pool examples will not work in the interactive interpreter." And later on that same page (under Programming Guidelines -> Windows): "Make sure that the main module can be safely imported by a new Python interpreter without causing unintended side effects (such a starting a new process)." This is probably why IDLE is acting up for you. I would be surprised if using the multiprocessing module will work well in IDLE either with or without a sub-process. As per the patch, someone should just work up an updated one with all of the insight gained in the last several years (!) regarding this. It should just remove the use rof the SO_REUSEADDR flag in the sub-process spawning code and pass zero as the argument for the port number, which instructs the underlying socket library to select an available port. See http://bugs.python.org/issue1201569 and http://mail.python.org/pipermail/idle-dev/2008-June/002687.html for details. The other changes in my original patch, while they do work, are unnecessarily complex and make it much harder to get the patch accepted. They should also not be significant if the spawning delays are fixed. If you'd like to work up such a patch and get it reviewed and committed, please be my guest! I will help you in any way I can if you take this up. Otherwise I guess it will wait until I find the time and energy... - Tal From clockworksaint at gmail.com Sat Nov 29 15:37:54 2008 From: clockworksaint at gmail.com (Weeble) Date: Sat, 29 Nov 2008 14:37:54 +0000 Subject: [Idle-dev] multiprocessing module and IDLE without subprocess In-Reply-To: <7afdee2f0811290337j1fa9195y8a65cfbd7845b8bc@mail.gmail.com> References: <13e3f9930811280617t6630e5beu2fcb4d4b08d7d5f8@mail.gmail.com> <7afdee2f0811290337j1fa9195y8a65cfbd7845b8bc@mail.gmail.com> Message-ID: <13e3f9930811290637u662ab699i625b1a67b0753339@mail.gmail.com> On Sat, Nov 29, 2008 at 11:37 AM, Tal Einat wrote: > It should just remove the use rof the SO_REUSEADDR flag in the > sub-process spawning code and pass zero as the argument for the port > number, which instructs the underlying socket library to select an > available port. See http://bugs.python.org/issue1201569 and > http://mail.python.org/pipermail/idle-dev/2008-June/002687.html for > details. I note that the present code spawns the subprocess first, then opens a socket, commenting that this is to avoid passing the open socket on to the subprocess. Does this matter? In order to tell the subprocess which port to listen to, we'd need to open the socket first. I don't really know a whole lot about sockets, but from what I can tell, it sounds like preventing a subprocess from inheriting a socket is quite platform-dependent. > If you'd like to work up such a patch and get it reviewed and > committed, please be my guest! I will help you in any way I can if you > take this up. Otherwise I guess it will wait until I find the time and > energy... I'm certainly interested enough to give it a go, but I don't know a whole lot about Python development. I have managed (I think) to sync up and build a copy of trunk using Visual C++ Express 2008. I'm not really sure about how to make patches, but I'm not going to worry about that until I have actually made any useful changes.