Simon Schampijer simon at schampijer.de
Fri Mar 14 08:15:58 EDT 2008

Hi Victor,

you can call get_activity_root in your activity class. For example like 

class WebActivity(activity.Activity):
     def __init__(self, handle):
         activity.Activity.__init__(self, handle)
         temp_path = os.path.join(self.get_activity_root(), 'instance')

More info here: http://wiki.laptop.org/go/Activity_DBus_API#Security

Better sugar API documentation is on our roadmap.


Victor Lazzarini wrote:
> I am trying to work out how to access the correct directories
> for writing and I see that SUGAR_ACTIVITY_ROOT is
> supposedly where to look. However is it up to the activity
> to set this variable? I see that the terminal has it set
> correctly and I would have thought that when sugar launches
> an activity it would this variable too.
> But  os.getenv(SUGAR_ACTIVITY_ROOT) fails. Could someone
> indicate how to retrieve the activity datastore?
> Victor
> Victor Lazzarini
> Music Technology Laboratory
> Music Department
> National University of Ireland, Maynooth
> _______________________________________________
> Devel mailing list
> Devel at lists.laptop.org
> http://lists.laptop.org/listinfo/devel

More information about the Devel mailing list