[sugar] Injecting Code into main Sugar GUI routine

Tomeu Vizoso tomeu at tomeuvizoso.net
Mon Jul 7 04:04:25 EDT 2008


Hi Zach,

On Mon, Jul 7, 2008 at 12:20 AM, Zach Riggle <zachriggle at gmail.com> wrote:
> I am a student working on a Google Summer of Code project, sugarbot
> (more information here: http://code.google.com/p/sugarbot/).  I am
> currently at a stage where I need to be able to hook into the Sugar
> GUI, to automate the process of launching Activities (e.g. simulate a
> mouse-click on the activity list, scroll down, click on the Activity
> name).  The process of automating the GUI is straightforward and
> should not be a problem, however I do not know where the best location
> would be to inject my code, or if there would be a way to create a
> launcher that, in turn, launched the Sugar interface inside of its own
> process.

Depends a bit on what that injected code would do. Supposing you want
to run it after everything has already been set up, try putting your
code in src/main.py, probably just before the main loop is started
(but outside the try..except block).

http://dev.laptop.org/git?p=sugar;a=blob;f=src/main.py

> Additionally, if anyone can point me in the direction of any materials
> related to the Sugar startup procedures/process, it would be greatly
> appreciated.

Sorry, we have very little docs right now, but any help is appreciated.

Good luck,

Tomeu


More information about the Sugar mailing list