<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Instead of class = you might try this:<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
exec = sugar-activity hMouse.hMouse<br></blockquote><div>I changed it. I don't know if works yet. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
These should not be necessary. Everything in your Activity should be<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">either part of the normal Python path or contained in the XO bundle.<br>
</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">You're also hard coding paths that may not always exist. If I test<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
your Activity using sugar-emulator, for instance, I won't have those<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">directories.<br></blockquote>
<div><br></div><div>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.</div>
<div>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).</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">It looks like your Activity interacts with the hardware in unusual<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
ways. This may not be allowed by Rainbow, which is a kind of sandbox<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">used by Sugar.<br></blockquote>
<div>
<br></div><div>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?</div><div><br></div><div>Thanks!</div>
--<br>Rodrigo Pérez Fulloni<br>
<br>