I'm learning PyS60, but I can't get rid of a problem. I have a piece of code I want to use to load an external image from inside the sis package. My default.py file is the following (it was created from an example I found in the web):
the .sis file was created with PyS60 application packager, putting default.py and the file bkg.jpg inside the same directory, and then setting that directory as Application source.
import graphics,sysinfo, sys,os,e32, appuifw
app_lock = e32.Ao_lock()
appuifw.app.exit_key_handler = quit
canvas = appuifw.Canvas()
appuifw.app.body = canvas
img = graphics.Image.open(u"bkg.jpg")
Anyway, when I run the file from my cell, I read SymbianError: [Errno -1] KErrNotFound
I think it's a problem in finding the right path to the file, but I don't know how to set it, since I want it to be in the same folder as the executing file. Are there any workarounds to open the file without having to set the absolute path of the file?
Thanks in advance, and sorry if it is a noobish question