From a.d.schapira at worldnet.att.net Thu Apr 1 14:23:47 2004 From: a.d.schapira at worldnet.att.net (Al Schapira) Date: Thu Apr 1 14:23:16 2004 Subject: [Idle-dev] Feature request, evaluate an expression when stopped at a breakpoint Message-ID: <406C6C43.3070303@worldnet.att.net> I've been using IDLE both for debugging my own code and for learning about how other folks code works. There is a feature that I'm looking for that is so basic I believe it must be possible, but I haven't seen it described anywhere: the ability to enter and evaluate an expression when stopped at a breakpoint. The expression would be evaluated in the context of the current breakpoint. Building on this would be the *automatic* evaluation of one or more previously entered expressions every time a breakpoint was hit. I envision an additional subwindow of the idle window in which each user's expression and its value would be automatically displayed when stopped at a breakpoint. The expressions to be evaluated could be entered or changed whenever idle is stopped at any breakpoint. Other debuggers I used (for C debugging) have a similar capability. Thanks. From tpc at csua.berkeley.edu Thu Apr 8 17:20:26 2004 From: tpc at csua.berkeley.edu (tpc@csua.berkeley.edu) Date: Thu Apr 8 17:20:31 2004 Subject: [Idle-dev] printing in IDLE Message-ID: <20040408141008.T45071-100000@localhost.name> I was curious if any of you knew how to disable "Ctrl-P" being mapped to 'print automatically' in IDLE. In the past few weeks I have inadvertently printed over one hundred pages from IDLE on a laser printer because in the middle of coding when switching between windows I get easily confused between the keystrokes to paste in gnome terminal, Xemacs, and IDLE (, , or respectively) and the keystrokes to call up previous or next commands in IDLE history ( and ) and I think subconsciously my brain is accustomed to having a finger on and then I press 'P' when I want to call up the previous command in IDLE. I usually am unaware of what I have done until my boss comes to me with a sheaf of papers in his hand and complains about the large print job. I told him I could disable printing in IDLE but I tried "Options/Configure IDLE/Keys/print-window - /'Get New Keys for Selection' & 'Select As New Custom Key Set'" to no avail. From neal at metaslash.com Thu Apr 8 22:55:55 2004 From: neal at metaslash.com (Neal Norwitz) Date: Thu Apr 8 22:56:01 2004 Subject: [Idle-dev] printing in IDLE In-Reply-To: <20040408141008.T45071-100000@localhost.name> References: <20040408141008.T45071-100000@localhost.name> Message-ID: <20040409025555.GI15458@epoch.metaslash.com> On Thu, Apr 08, 2004 at 02:20:26PM -0700, tpc@csua.berkeley.edu wrote: > I was curious if any of you knew how to disable "Ctrl-P" being mapped to > 'print automatically' in IDLE. Try taking a look at idlelib/config-keys.def. There is print-window option which is defined as Ctrl-P . You should be able to change that to something else so you don't have any more problems. Good luck! Neal From kbk at shore.net Fri Apr 9 12:07:59 2004 From: kbk at shore.net (Kurt B. Kaiser) Date: Fri Apr 9 12:08:09 2004 Subject: [Idle-dev] printing in IDLE In-Reply-To: <20040408141008.T45071-100000@localhost.name> (tpc@csua.berkeley.edu's message of "Thu, 8 Apr 2004 14:20:26 -0700 (PDT)") References: <20040408141008.T45071-100000@localhost.name> Message-ID: <877jwpgmn4.fsf@hydra.localdomain> writes: > I tried "Options/Configure IDLE/Keys/print-window - > /'Get New Keys for Selection' & 'Select As New Custom > Key Set'" to no avail. This should have worked for you. I just tried it with IDLE 1.0.2 on Windows2000 and it worked as expected. What new key combo did you select for print-window? You might try Control-Alt-p: 1. Select "Get New Keys for Selection" 2. Click on Ctrl, click on Alt, click on p in the scroll widget. 3. You should now see in "new keys for 'print-window". 4. Click OK to return to the Keys Dialog. 5. Enter a name for your custom key set. Click OK. 6. Your custom key set should now be selected in the right hand panel. 7. Click Ok Be sure your custom keyset is selected in the "Select a Key Set" panel of the Keys dialog, and that the new binding appears in the "Set Custom Key Bindings" scroll widget. Test to see if this works. At this point, there sould be a config-keys.cfg file in your ~/.idlerc/ directory which contains your custom key set. BTW, I'm not aware of a button "Select As New Custom Key Set". You probably meant "Save as...". It's not necessary to hit that button unless you want to define more than one custom key set. Once you select a new key, there is a dialog to name and save the new key set (#5 above). If it already exists, any changes are applied automagically and #5 is skipped. Eliminating the keybinding from config-keys.def probably won't work because there is a backup binding in configHandler.py which is designed to be a fall-back if the binding in config-keys.def is missing. Stephen's belt and suspenders :-) You could change the keybinding in config-keys.def, but that should not be necessary. The idea is to change the user's custom configuration in .idlerc using the Options/Configure IDLE dialog rather than alter IDLE's internal configuration files. If the Configure dialog isn't working for you, I'd like to make an effort to find out why it isn't. -- KBK From tpc at csua.berkeley.edu Fri Apr 9 13:17:11 2004 From: tpc at csua.berkeley.edu (tpc@csua.berkeley.edu) Date: Fri Apr 9 13:17:23 2004 Subject: [Idle-dev] printing in IDLE In-Reply-To: <877jwpgmn4.fsf@hydra.localdomain> Message-ID: <20040409101437.I53445-100000@localhost.name> Hello Kurt, yes I did mean 'Save As New Custom Key Set.' My apologies for any confusion. I went to "Options/Configure IDLE/Keys". The right hand panel had "a Built-in Key Set' selected and showed "IDLE Classic Windows," though I'm on Debian Linux. I selected 'print-window - '/'Get New Keys for Selection' then clicked , , 'p', 'Ok', named my new Custom Key Set 'print-window' and pressed Ok. I noticed now my right hand panel had "a Custom Key Set" selected, "IDLE Classic Windows" was no longer bold but was still indicated and below in bold was 'print-window'. I pressed 'Apply', 'Ok', closed my old IDLE window, fired up a new IDLE window, and voila, Ctrl-p no longer prints but Ctrl-Alt-p does. Thank you. I think what I was trying before was clearing the keys and leaving it blank, which is not allowed. BTW, I think I understand the belt and suspenders analogy, but who is Stephen ? On Fri, 9 Apr 2004, Kurt B. Kaiser wrote: > This should have worked for you. I just tried it with IDLE 1.0.2 on > Windows2000 and it worked as expected. > > What new key combo did you select for print-window? You might try > Control-Alt-p: > > 1. Select "Get New Keys for Selection" > 2. Click on Ctrl, click on Alt, click on p in the scroll widget. > 3. You should now see in "new keys for 'print-window". > 4. Click OK to return to the Keys Dialog. > 5. Enter a name for your custom key set. Click OK. > 6. Your custom key set should now be selected in the right hand panel. > 7. Click Ok > > Be sure your custom keyset is selected in the "Select a Key Set" panel > of the Keys dialog, and that the new binding appears in the "Set > Custom Key Bindings" scroll widget. > > Test to see if this works. At this point, there sould be a > config-keys.cfg file in your ~/.idlerc/ directory which contains > your custom key set. > > BTW, I'm not aware of a button "Select As New Custom Key Set". You > probably meant "Save as...". It's not necessary to hit that button > unless you want to define more than one custom key set. Once you > select a new key, there is a dialog to name and save the new key set > (#5 above). If it already exists, any changes are applied > automagically and #5 is skipped. > > Eliminating the keybinding from config-keys.def probably won't work > because there is a backup binding in configHandler.py which is > designed to be a fall-back if the binding in config-keys.def is > missing. Stephen's belt and suspenders :-) > > You could change the keybinding in config-keys.def, but that should > not be necessary. The idea is to change the user's custom > configuration in .idlerc using the Options/Configure IDLE dialog > rather than alter IDLE's internal configuration files. > > If the Configure dialog isn't working for you, I'd like to make an > effort to find out why it isn't. > > -- > KBK > From kbk at shore.net Fri Apr 9 14:19:45 2004 From: kbk at shore.net (Kurt B. Kaiser) Date: Fri Apr 9 14:19:50 2004 Subject: [Idle-dev] printing in IDLE In-Reply-To: <20040409101437.I53445-100000@localhost.name> (tpc@csua.berkeley.edu's message of "Fri, 9 Apr 2004 10:17:11 -0700 (PDT)") References: <20040409101437.I53445-100000@localhost.name> Message-ID: <87y8p5f1z2.fsf@hydra.localdomain> writes: > I think what I was trying before was clearing the keys and leaving > it blank, which is not allowed. True, the dialog will not allow you to create a key binding without any keys (I thought you might be trying that and verified that you couldn't do it). I will improve the message from "No keys specified" to something like "Please select a keybinding". Do you have a suggestion? > BTW, I think I understand the belt and suspenders analogy, but who > is Stephen ? Ah, lest we forget: Stephen M. Gava is the previous maintainer of IDLE. He designed and implemented the Configuration GUI and the new configuration system. -- KBK From tpc at csua.berkeley.edu Fri Apr 9 14:49:19 2004 From: tpc at csua.berkeley.edu (tpc@csua.berkeley.edu) Date: Fri Apr 9 14:49:25 2004 Subject: [Idle-dev] printing in IDLE In-Reply-To: <87y8p5f1z2.fsf@hydra.localdomain> Message-ID: <20040409114334.X54173-100000@localhost.name> Hello Kurt, first I would request at least a more tortured way of automatic print and not something so simple as Ctrl-P. Maybe this is out of ignorance, but I don't really see a need to have automatic print mapped to such a simple keystroke combination. The default behavior should be triggered by GUI selects and clicks only, and the user can map automatic print to a keystroke combo. This is just my opinion. I should also add that the print-outs IDLE gives me seem to be truncated on the left side, and I am not sure whether this is due to my machine settings or IDLE, but print-outs from other applications such as OpenOffice Writer and Mozilla Firebird have no problems. On Fri, 9 Apr 2004, Kurt B. Kaiser wrote: > True, the dialog will not allow you to create a key binding without > any keys (I thought you might be trying that and verified that you > couldn't do it). I will improve the message from "No keys specified" > to something like "Please select a keybinding". Do you have a > suggestion? > > -- > KBK > From kbk at shore.net Fri Apr 9 16:01:23 2004 From: kbk at shore.net (Kurt B. Kaiser) Date: Fri Apr 9 16:01:29 2004 Subject: [Idle-dev] printing in IDLE In-Reply-To: <20040409114334.X54173-100000@localhost.name> (tpc@csua.berkeley.edu's message of "Fri, 9 Apr 2004 11:49:19 -0700 (PDT)") References: <20040409114334.X54173-100000@localhost.name> Message-ID: <87r7uwgbu4.fsf@hydra.localdomain> writes: > Hello Kurt, first I would request at least a more tortured way of > automatic print and not something so simple as Ctrl-P. Maybe this > is out of ignorance, but I don't really see a need to have automatic > print mapped to such a simple keystroke combination. Ctrl-P is standard in the Windows environment, e.g. Notepad and Word. > The default behavior should be triggered by GUI selects and clicks > only, and the user can map automatic print to a keystroke combo. > This is just my opinion. I don't think that it can be left unbound if it is to be later settable by the user using the configuration GUI. > I should also add that the print-outs IDLE gives me seem to be > truncated on the left side, and I am not sure whether this is due to > my machine settings or IDLE, but print-outs from other applications > such as OpenOffice Writer and Mozilla Firebird have no problems. In Windows, the current print implementation is a quick fix using Notepad, to be superceeded by something with features like a color print option, headers, page numbers, avoiding breaking defs across pages when possible, etc. Take a look at your Notepad configuration: File/Page Setup On my W2K box, the left margin is set to 0.75 and I'm getting decent results. -- KBK From tpc at csua.berkeley.edu Fri Apr 9 16:48:37 2004 From: tpc at csua.berkeley.edu (tpc@csua.berkeley.edu) Date: Fri Apr 9 16:48:51 2004 Subject: [Idle-dev] printing in IDLE In-Reply-To: <87r7uwgbu4.fsf@hydra.localdomain> Message-ID: <20040409134341.S54836-100000@localhost.name> hi Kurt, granted Ctrl-p is mapped to print in Windows Notepad and Word, but at least in Windows you get a Print dialog box that pops up and, depending on a click or keystroke, sends a job to the print spool or not. On Debian as soon as I hit Ctrl-p a job is sent to the print spool. For me this is undesirable. Additionally printing IDLE on Debian seems to truncate output on the left hand side, which is why I wanted to disable print-window. On Fri, 9 Apr 2004, Kurt B. Kaiser wrote: > Ctrl-P is standard in the Windows environment, e.g. Notepad and Word. > > I don't think that it can be left unbound if it is to be later settable > by the user using the configuration GUI. > > In Windows, the current print implementation is a quick fix using > Notepad, to be superceeded by something with features like a color > print option, headers, page numbers, avoiding breaking defs across > pages when possible, etc. > > Take a look at your Notepad configuration: File/Page Setup > > On my W2K box, the left margin is set to 0.75 and I'm getting decent > results. > > -- > KBK > From kbk at shore.net Fri Apr 9 18:05:57 2004 From: kbk at shore.net (Kurt B. Kaiser) Date: Fri Apr 9 18:06:03 2004 Subject: [Idle-dev] printing in IDLE In-Reply-To: <20040409134341.S54836-100000@localhost.name> (tpc@csua.berkeley.edu's message of "Fri, 9 Apr 2004 13:48:37 -0700 (PDT)") References: <20040409134341.S54836-100000@localhost.name> Message-ID: <878yh4g62i.fsf@hydra.localdomain> writes: > hi Kurt, granted Ctrl-p is mapped to print in Windows Notepad and Word, > but at least in Windows you get a Print dialog box that pops up and, > depending on a click or keystroke, sends a job to the print spool or not. That's a good point. > On Debian as soon as I hit Ctrl-p a job is sent to the print spool. For > me this is undesirable. Additionally printing IDLE on Debian seems to > truncate output on the left hand side, which is why I wanted to disable > print-window. Ah, right, I keep forgetting you're using Debian with Windows keybindings. Well, use the Unix keybindings :-) Seriously, maybe you can find an option to lpr, which is what IDLE is using on Unix. Simply change the following line in config-main.def: print-command-posix=lpr %s Try: print-command-posix=lpr -i 20 %s -- KBK From sunet2000 at yahoo.com Fri Apr 23 11:25:57 2004 From: sunet2000 at yahoo.com (Martin Cameron) Date: Fri Apr 23 11:26:05 2004 Subject: [Idle-dev] Python 2.3 IDLE is randomly freezing. Message-ID: <20040423152557.53069.qmail@web41215.mail.yahoo.com> This might be a dupe (sorry) Hi, is this the correct place to post things like this? I'm having a problem with the stock python2.3 install in debian sid. I've submitted a bug report there, but I'm having trouble reliably reproducing it. What happens is that after 10 minutes or so of typing in the idle editor window the application freezes and stops repainting. There is no traceback output on the terminal. How do I go about debugging this? I tried to instantiate an EditorWindow in the debugger but it appears to require quite a bit of environment. Any help would be greatly appreciated. Regards, Martin __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash From sunet2000 at yahoo.com Fri Apr 23 11:12:01 2004 From: sunet2000 at yahoo.com (Martin D Cameron) Date: Sat Apr 24 10:50:53 2004 Subject: [Idle-dev] Python 2.3 IDLE is randomly freezing. Message-ID: <40893241.1030004@yahoo.com> Hi, is this the correct place to post things like this? I'm having a problem with the stock python2.3 install in debian sid. I've submitted a bug report there, but I'm having trouble reliably reproducing it. What happens is that after 10 minutes or so of typing in the idle editor window the application freezes and stops repainting. There is no traceback output on the terminal. How do I go about debugging this? I tried to instantiate an EditorWindow in the debugger but it appears to require quite a bit of environment. Any help would be greatly appreciated. Regards, Martin From kbk at shore.net Sat Apr 24 11:40:34 2004 From: kbk at shore.net (Kurt B. Kaiser) Date: Sat Apr 24 11:40:45 2004 Subject: [Idle-dev] Python 2.3 IDLE is randomly freezing. In-Reply-To: <20040423152557.53069.qmail@web41215.mail.yahoo.com> (Martin Cameron's message of "Fri, 23 Apr 2004 08:25:57 -0700 (PDT)") References: <20040423152557.53069.qmail@web41215.mail.yahoo.com> Message-ID: <87hdv95qq5.fsf@hydra.localdomain> Martin Cameron writes: > This might be a dupe (sorry) Not a problem, I was slow in reviewing your original post. I see you're a member now. The traffic is low on this list, so I moderate non-member posts. Otherwise we would have one ham for every ten or twenty spam, the list would be aggravating and the archives unusable. > Hi, is this the correct place to post things like this? Sure. [...] > What happens is that after 10 minutes or so of typing in the idle > editor window the application freezaes and stops repainting. There is > no traceback output on the terminal. > > How do I go about debugging this? I tried to instantiate an > EditorWindow in the debugger but it appears to require quite a bit > of environment. Any help would be greatly appreciated. Could be difficult. From what you say, it's happening while you are entering code, not executing it. That's a critical difference. Is there any pattern to the failures? Are you entering a lot of text? I haven't heard of anything like that before. If it were common, I'd expect quite a bit of noise :-) I run IDLE for days at a time on OpenBSD without any hiccups. Keep running apt-get upgrade. Try Sarge, if possible. Try running IDLE with the -n switch so it starts without the subprocess. If you still see the problem, it's likely Sid has lost his mind again. Otherwise, if the problem disappears there may be an issue with subprocess communications. In rpc.py, near the end, you will find two debugging switches: debugging = False Set these to True and restart IDLE. This will generate a lot of trace information relative to communications between the GUI and the subprocess. Note that because of threading and multiprocess issues, the traces are not strictly in time sequence order. But they have sequence numbers to help with the analysis. Try to correlate your hangs with the traces. What's the Debian Bug # ? -- KBK