0

Tkinter entry as float?

Hi, im making basic GUI with Python on my Rpi, but i have problem. I need my tkinter entry field to output as float, its allways string. Thanks in advance :)

5th Jun 2019, 8:53 PM
GramatickĂ˝ Komunista
GramatickĂ˝ Komunista - avatar
4 Answers
+ 5
The float() function converts strings and integers into floats. Here are a couple examples: https://code.sololearn.com/cDXTO50z1jU4/?ref=app It should do what you need
6th Jun 2019, 1:41 AM
Jax
Jax - avatar
+ 5
Can you provide the string you’re using? As long as it’s a number, and not text, it shouldn’t be an issue
6th Jun 2019, 2:16 PM
Jax
Jax - avatar
+ 2
Thanks, for sure i tried this, but output allways throw error "Cant convert string to float"...
6th Jun 2019, 5:00 AM
GramatickĂ˝ Komunista
GramatickĂ˝ Komunista - avatar
0
I got it now, thanks much for your help :)
7th Jun 2019, 11:13 AM
GramatickĂ˝ Komunista
GramatickĂ˝ Komunista - avatar