[sugar] path + emulator

jjungcla at gsd.harvard.edu jjungcla at gsd.harvard.edu
Sat Apr 14 17:17:25 EDT 2007


hi guys,
two really basic questions we couldn't resolve in class this week:
1. Using Qemu as emulator on a PC, how do you move a file from Windows to
the emulated file structure?
2. There is a problem with simply loading an image and displaying it on
the screen using this code below (the image.png file sits right next to
the application file). The application starts up but shows the
file-not-found icon in the middle of the screen. How does sugar actually
handle imgages?
Thanks guys!
Jan


class TouchTyperActivity(activity.Activity):

    def hello(self, widget, data=None):
        logging.info('Image Load Activity')
    def __init__(self, handle):
        activity.Activity.__init__(self, handle)
        ROOT = os.path.dirname(os.path.abspath(__file__))
        self.image = gtk.Image()
        pixbuf = gtk.gdk.pixbuf_new_from_file(ROOT + "image.png")
        self.image.set_from_pixbuf(pixbuf)
        self.add(self.image)
        self.image.show()
        self.set_title('Image Load')




More information about the Sugar mailing list