Forum Archive

touch image and conect with ssh, help

rustywild245

i'm new in python.

i would like to make that:
http://omz-software.com/pythonista/forums/discussion/188/simple-alarm-device-home-automation-using-a-raspberry-pi-and-pythonista-on-the-ipad/p1

i have the code to connect with paramiko to my linux server, but i don't know how to put the picture in background and start the commands when a touch it in a place of the screen.

Someone can help me?

rustywild245

nobody?

ccc

Hi Rusty,

http://omz-software.com/pythonista/forums/discussion/244/question-about-photos-get_image should get you an image to be your background image.

Now look at the "Piano" sample app to understand how to know if a user touch falls inside the frame of a graphical object.

rustywild245

i don't understand. I have the image save in phytonista.

only write that:

from scene import *
import Image
img = Image.open('nameofimagesaved').convert('RGBA')

And don't do nothing
What is my error?

Dalorbi39

After your code type img.show()

rustywild245

thanx!!! Dalorbi .
now need scale to all screen too

rustywild245

no work fine. I start again.
i create a new script based on "basic Scene"

when i put img = ... inside setup(), the screen stay black, if put in draw() is the same

if put the img... inside the class but out of any functions, start with the image but turn black again