Hello everyone! I'm looking at this
forum for some couple of days trying to understand things,
and I'm still left with some questions (some hard to find because I find alot of information about one thing, information which I don't need) to some basic things:
1. app_lock = e32.Ao_lock() what is this command really do?
and what the module e32 is?
2. canvas.blit(img) does this command means draw the img?
3. I built this little application:
I can see that the image's switch kind of slowely (even without putting any delay between them, I guess it's because python load each image from the memory which seems to be slow)Code:import appuifw import graphics import e32 img=graphics.Image.open('e:\\SCube\\start.jpg') def handle_redraw(rect): global img canvas.blit(img) def quit(): app_lock.signal() canvas=appuifw.Canvas(redraw_callback=handle_redraw) appuifw.app.body=canvas canvas.blit(img) appuifw.app.screen='full' appuifw.app.exit_key_handler = quit img=graphics.Image.open('e:\\img1.jpg') canvas.blit(img) img=graphics.Image.open('e:\\img2.jpg') canvas.blit(img) img=graphics.Image.open('e:\\img3.jpg') canvas.blit(img) app_lock = e32.Ao_lock() app_lock.wait()
can I do something like "preload" the images so I can show them right away just after calling them?
Another thing, when I use time.sleep(1) for example, can I tell the application to do something in that 1 second?
I'm really new in Python so this is why I ask all of these basic questions.