[Sugar-devel] Fwd: Problem developing app
Rodrigo
rodripf at gmail.com
Wed Dec 8 13:35:08 EST 2010
The relative paths work fine now with the sugar-launch command, I just
wasn't changing the current directory to the activity directory ¬¬.
I am not receiving any error from the sugar-launch in command line now, but
the main problem persists.
I've uploaded a few changes to the git.
--
Rodrigo Pérez Fulloni - http://www.intermeddia.com
On Wed, Dec 8, 2010 at 12:30 PM, Rodrigo <rodripf at gmail.com> wrote:
> 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/a5b9a8cd/attachment.html>
More information about the Sugar-devel
mailing list