Re: odd error

2010-03-10 Thread Tim Golden
On 10/03/2010 12:09, Alex Hall wrote: I am honestly a bit lost as to why keys.append() is not a good choice here, but I have it working. That's ok; it's just not clear from the context why you have a list of dicts but your comment about different modes explains that. I apparently have to use

Re: odd error

2010-03-10 Thread Alex Hall
I am honestly a bit lost as to why keys.append() is not a good choice here, but I have it working. I apparently have to use the ascii for capital letters if I am capturing the shift modifier, not the lowercase ascii. Using 67 instead of 99 works as expected. I use append because the program has th

Re: odd error

2010-03-10 Thread Tim Golden
On 10/03/2010 09:16, Steven D'Aprano wrote: Perhaps all you need is a single dict, mapping characters to functions: funcs = { # Just a dict # keycode: function 'q': exitProgram, 'a': arm.sayLoad1 # etc. } Then whenever you get a keyboard event, convert it to the chara

Re: odd error

2010-03-10 Thread Steven D'Aprano
On Tue, 09 Mar 2010 11:48:10 -0500, Alex Hall wrote: > Okay, I changed the keycode from 99 (c) to 107 (k), and the errors have > disappeared. However, now the function that should be called is not. As > I said in a previous message, I have always had trouble with this sort > of keystroke dictionar

Re: odd error

2010-03-09 Thread alex23
Alex Hall wrote: > Why would the sequence > matter, or does it not and I am doing something else wrong? Here is a > sample of my dictionary: Showing us the code that handles the dictionary lookup + function calling would probably help us a lot more here. -- http://mail.python.org/mailman/listinf

Re: odd error

2010-03-09 Thread Alex Hall
Okay, I changed the keycode from 99 (c) to 107 (k), and the errors have disappeared. However, now the function that should be called is not. As I said in a previous message, I have always had trouble with this sort of keystroke dictionary. It seems like, if a keycode is out of order or not one more

Re: odd error

2010-03-09 Thread Tim Golden
On 09/03/2010 16:34, Tim Golden wrote: On 09/03/2010 13:55, Alex Hall wrote: Hi all, In the same program I wrote about yesterday, I have a dictionary of keystrokes which are captured. I just tried adding a new one, bringing the total to 11. Here are entries 10 and 11; 10 has been working fine fo

Re: odd error

2010-03-09 Thread Tim Golden
On 09/03/2010 13:55, Alex Hall wrote: Hi all, In the same program I wrote about yesterday, I have a dictionary of keystrokes which are captured. I just tried adding a new one, bringing the total to 11. Here are entries 10 and 11; 10 has been working fine for months. 10 : (57, win32con.MOD_CON

Re: odd error

2010-03-09 Thread Alex Hall
I know ctrl-c kills a process in the shell, but these are global hotkeys and all others work fine. You made me discover something, though: the error only happens if ctrl-shift-c is pressed when in the shell from where the program was run; when pressed anywhere else, the keystroke does nothing at al

Re: odd error

2010-03-09 Thread Ulrich Eckhardt
Alex Hall wrote: > Now, though, when I press ctrl-shift-c (keystroke 11), nothing > happens. Control-C sends a special signal to the console, like Control-Break. > Pressing any other keystroke after that will crash the program > with some sort of Python internal com server exception that I > have

odd error

2010-03-09 Thread Alex Hall
Hi all, In the same program I wrote about yesterday, I have a dictionary of keystrokes which are captured. I just tried adding a new one, bringing the total to 11. Here are entries 10 and 11; 10 has been working fine for months. 10 : (57, win32con.MOD_CONTROL), 11 : (99, win32con.MOD_CONTROL |

Re: Odd error

2007-03-17 Thread Terry Reedy
script from IDLE, it saves it to disk, and in the process of saving, IDLE looks at the path. I don't think your script ever ran. At least that is what I gathered from the traceback. I agree with JM: the traceback and error message do not match, so this is indeed an 'odd' erro

Re: Odd error

2007-03-17 Thread [EMAIL PROTECTED]
I installed it using the regular download form python.org. I went back and did a lot of testing with the file, commenting out most of it, seeing what would actually run, and it seems I had a normal semantic error: self.data(one).append(item) and data is in fact a dictionary, not a callable objec

Re: Odd error

2007-03-17 Thread John Machin
On Mar 17, 4:34 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm trying to use a script that I originally wrote on a Mac Classic > machine and have moved to a Windows XP machine. > > I can open the script and edit the thing, but when I try to run it in > I get: > Exception in Tkinter callba

Odd error

2007-03-16 Thread [EMAIL PROTECTED]
I'm trying to use a script that I originally wrote on a Mac Classic machine and have moved to a Windows XP machine. I can open the script and edit the thing, but when I try to run it in I get: Exception in Tkinter callback Traceback (most recent call last): File "C:\Python25\lib\lib-tk\Tkinter.p

Odd error by mod_python

2004-12-30 Thread charliek
I have mod_python 2.7.10 running with python 2.3.4 and am getting an odd error. The error is happening on the production machine, and not on my development machine. I am using the publisher handler and am calling the index function with this code: -- from