Converting Unicode to integer
Nikola Plejic
Nikola.Plejic at pu.CARNet.hr
Wed Aug 28 04:47:52 EDT 2002
I did it! I can't believe it, but I did it! :)
Here's the handler code:
def handler(**kw):
a = txt.text
b = txt2.text
c = str(int(a)+int(b))
lbl.text = c
So obvious ;).
Thanks for your help, I really appreciate it!
"Nikola Plejic" <zweistein at net.hr> wrote in message
news:f003aff3.0208270106.116fe6f9 at posting.google.com...
> Is it possible to convert an Unicode string to an integer? I'm working
> on a program in AnyGUI and it seems to make everything in TextLabels
> an Unicode string, and if I try to add i.e. 2 numbers (let's say 2 and
> 3) I get 23 instead of 5.
>
> I tried using int() but that doesn't seem to work.
>
> Thanks for your help!
More information about the Python-list
mailing list