[sugar] activity executing other aplications
"João Bosco A. Pereira Filho"
jpf
Fri Feb 23 07:38:42 EST 2007
Dan Williams escreveu:
> On Fri, 2007-02-23 at 10:08 -0200, "Jo?o Bosco A. Pereira Filho" wrote:
>
>> Hi!
>>
>> I want to port an existing aplication for Sugar. For that, I've
>> created an activity for it just like this:
>>
>> /import logging
>> from sugar.activity.Activity import Activity
>>
>> import sys, os
>> import gtk
>>
>> class FooActivity(Activity):
>>
>> def __init__(self):
>> Activity.__init__(self)
>>
>> self.set_title('Foo Activity')
>>
>> os.system('foo &')
>> /
>>
>>
>> When I click on the icon, the application opens fine and appears in
>> the central circle but not in the frame (where you close/share it).
>> When I close the aplication (using it's own menu), the icon of the
>> activity in the frame appears and I can close it.
>>
>> Does anybody knows what is wrong? Is there a better way to call
>> another aplication?
>>
>
> Ideally, sugarize the application. If not, you'll still need to modify
> the application to tell sugar about various events. See the etoys
> activity.
>
> Dan
>
>
>
What if the application is written in C++? Is etoys written in python?
Thanks!
--
Jo?o Bosco A. Pereira Filho
Desenvolvedor de Software
Funda??o CERTI
More information about the Sugar-devel
mailing list