[Tutor] Text and Tkinter

2005-03-29 Thread Igor Riabtchuk
Hi,   As I am sure you know, the text widget in Tkinter by default prints keyboard output left-to-right. Is there a way to make it print right-to-left?   Igor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Tkinter and keyboard output

2005-03-24 Thread Igor Riabtchuk
Hi,   I was playing around with Tkinter bindings and I got a question which is probably not particularly bright.   If I have the following code, it works because I specifically code a function for keypress:   from Tkinter import *class CRED(Frame):    def __init__(self):    Frame.__i

Re: [Tutor] Dictionary blues...

2005-03-23 Thread Igor Riabtchuk
I just solved it :) thank you all for chastising me :) particularly Alan Gauld - you save me again :) I reckon I will have to put a credit for you in the code :) Igor - Original Message - From: "Igor Riabtchuk" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 23, 2005

Re: [Tutor] Dictionary blues...

2005-03-23 Thread Igor Riabtchuk
;p': str='t' elif event.keysym=='t': str='z' put all the conversion values into a dictionary and make the function use the key:value pairs from dictionary. I hope I am making sense. Igor - Original Message - From: "Alan Gauld" <[EMAIL

[Tutor] Dictionary blues...

2005-03-23 Thread Igor Riabtchuk
I posted the wrong code before. The code is:   from Tkinter import *   D={a:"tom", b:"dick", c:"harry"}   text.bind('', self.Conv)   def Conv(self,event):    if D.has_key(event.keysym):  str=D[event.keysym]    self.text.insert(END,str)    return 'break'   The error message says wrong

[Tutor] problems with dictionary

2005-03-23 Thread Igor Riabtchuk
Hi, was wondering whether you can help?   Say I got a dictionary of keys:values :   And what I want to do is depending on what key (a,b,c) the person presses, I want to output the value (tom, dic, harry).   So I program like this:   import Tkinter   D={a:"tom", b:"dick", c:"harry"}   text.

[Tutor] Changing Keyboard output

2005-03-20 Thread Igor Riabtchuk
Hi,   I am totally new to Python and still learning.   I am looking for a way to change keyboard output within Tkinter widget - for example, say I press "p" and I want it to come out as "t".   Could anyone possibly point me in the right direction?   Igor