Need some help with this..

Dag Hansteen d-hanst at online.no
Sun Sep 5 11:40:36 EDT 2004


Hi! 
I have a problem, This part is from a program that tweeks text, like making "My text here and click enter" into "Mÿ të×t hërë äñÐ k|ïkk ëñtër". 

This is the part of code where the error is, any answer appreciated:

    def OnInput(self, event):
        curtext = event.GetString()
        table = maketrans('abceiousxynldhABCEIOUSXYNLDH', 'äßkëïóµz×ÿñ|Ðhäßkëïóµz×ÿñ|Ðh')
        outtext = curtext.translate(table)      
        t2.SetValue(outtext)


error I get is:

Traceback (most recent call last):
  File "C:\Mine dokumenter\Python\temporary\TextTweeker.py", line 91, in OnInput
    outtext = curtext.translate(table)      
TypeError: character mapping must return integer, None or unicode


anyone?

best regards 
Dag Hansteen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040905/cfdfaf66/attachment.html>


More information about the Python-list mailing list