The user snippet should work, but without the error, it's hard to tell
why it's crashing.
About twisted, when you said "I believe the key is to make sure your
network communications are all scheduled into the event loop. I believe
this is what twisted gives you for free." -> it's not for free, we have
a support for twisted framework, and then, schedule automatically the
network event in the main loop.
https://github.com/kivy/kivy/blob/master/kivy/support.py#L133
Otherwise, the event is within the reactor thread. And then, it's up to
you to call you UI task/change in the main loop :)
Mathieu
Le 03/09/2012 06:49, deakblue a �crit :
> <
http://www.asdfgh.com/server.txt>").read()
> printsunucu
> soket.connect((sunucu,4444))
> buton.text ="Baglandi."
> soket.send("1")
> soket.close()
> buton.text ="Yakildi."
>
> defbas2(ornek):
> buton.text ="Baglaniyor..."
> soket =socket.socket()
> sunucu =urllib.urlopen("
http://asdfgh.com/server.txt
> <
http://asdfgh.com/server.txt>").read()
> printsunucu
> soket.connect((sunucu,4444))
> buton.text ="Baglandi."
> soket.send("2")
> printsoket.recv(1024)
> soket.close()
> buton.text ="Sonduruldu."
> defdeneme(gelen):
> Clock.schedule_once(bas1,1)
> buton =Button(text ="Lambayi Yak")
> buton.bind(on_press =deneme)
> buton2 =Button(text ="Lambayi Sondur")
> buton2.x =150;buton2.width =300
> buton2.bind(on_press =bas2)
> cocuk1 =MyPaintWidget()
> baba.add_widget(cocuk1)
> baba.add_widget(buton)
> baba.add_widget(buton2)
> returnbaba
>
> if__name__ in("__main__"):
> MyPaintApp().run()
> |
>
>
asdfgh.com <
http://asdfgh.com> represents my website which I will
> update it with my pc's current ip in order to the device can connect
> the true pc. Should I use "twisted" module or can I make this code
> work without crashing?
>
> Thank you for your time.
>
>
> --
>
>
>