[Sugar-devel] Fwd: Problem developing app

Rodrigo rodripf at gmail.com
Wed Dec 8 09:30:04 EST 2010


>
> Instead of class = you might try this:
>
exec = sugar-activity hMouse.hMouse
>
I changed it. I don't know if works yet.

These should not be necessary. Everything in your Activity should be
>
either part of the normal Python path or contained in the XO bundle.
>
You're also hard coding paths that may not always exist. If I test
>
your Activity using sugar-emulator, for instance, I won't have those
>
directories.
>

I've tried with relative paths, but this way I can't import the
pygame.camera module... "ImportError: No module named camera". I don't know
why... but it doesn't work. As you may see, I'm using my own version of
pygame, because the XO has only the 1.8 version, but I need the camera
module in the 1.9 version.
Apparently there is a problem with the imports, because sugargame package
import is working fine. I guess that when I do the "import pygame" it search
for the pygame in the XO instead the pygame in my activity, so when it look
for pygame.camea it doesn't exists. Even if I do sys.paht.insert(0, "lib")
the problem persist (lib is the folder where is my pygame 1.9).

It looks like your Activity interacts with the hardware in unusual
>
ways. This may not be allowed by Rainbow, which is a kind of sandbox
>
used by Sugar.
>

In effect, I control the camera with PyGame 1.9 and control the mouse cursor
via XLib... but I think this is the usual (and unique) way... do you have
another idea to do this?

Thanks!
--
Rodrigo Pérez Fulloni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101208/9a26fb87/attachment.html>


More information about the Sugar-devel mailing list