[Sugar-devel] How is the 'default' string in '.sugar/default' determined?

2009-08-11 Thread Martin Langhoff
In the Sugar internals, how do you obtain the Sugar config storage directory? Moreover, what is the /correct/, recommended way to do it, one that will work on .82, .84 & .86 from activities, Sugar Shell code... and cronjobs (that run under the same user, but different ENV, and not spawned by sugar

Re: [Sugar-devel] How is the 'default' string in '.sugar/default' determined?

2009-08-18 Thread Tomeu Vizoso
On Tue, Aug 11, 2009 at 17:24, Martin Langhoff wrote: > In the Sugar internals, how do you obtain the Sugar config storage > directory? Moreover, what is the /correct/, recommended way to do it, > one that will work on .82, .84 & .86 from activities, Sugar Shell > code... and cronjobs (that run und

Re: [Sugar-devel] How is the 'default' string in '.sugar/default' determined?

2009-08-18 Thread Martin Langhoff
On Tue, Aug 18, 2009 at 10:43 AM, Tomeu Vizoso wrote: > On Tue, Aug 11, 2009 at 17:24, Martin Langhoff > wrote: >> In the Sugar internals, how do you obtain the Sugar config storage >> directory? Moreover, what is the /correct/, recommended way to do it, >> one that will work on .82, .84 & .86 fro

Re: [Sugar-devel] How is the 'default' string in '.sugar/default' determined?

2009-08-18 Thread Tomeu Vizoso
On Tue, Aug 18, 2009 at 10:52, Martin Langhoff wrote: > On Tue, Aug 18, 2009 at 10:43 AM, Tomeu Vizoso wrote: >> On Tue, Aug 11, 2009 at 17:24, Martin Langhoff >> wrote: >>> In the Sugar internals, how do you obtain the Sugar config storage >>> directory? Moreover, what is the /correct/, recommend

Re: [Sugar-devel] How is the 'default' string in '.sugar/default' determined?

2009-08-18 Thread Martin Langhoff
On Tue, Aug 18, 2009 at 10:55 AM, Tomeu Vizoso wrote: > I don't think I can answer that for you, but the implementation is > really simple: > > http://git.sugarlabs.org/projects/sugar-toolkit/repos/mainline/blobs/master/src/sugar/env.py#line31 That's super clear - thanks! m -- martin.langh...@

Re: [Sugar-devel] How is the 'default' string in '.sugar/default' determined?

2009-08-18 Thread Sascha Silbe
On Tue, Aug 18, 2009 at 10:52:16AM +0200, Martin Langhoff wrote: You can use sugar.env.get_profile_path() in all those Sugar versions. How can I get that safely from a cronjob? You could try the following: PROFILE_PATH="$(python -c 'import sugar.env ; print sugar.env.get_profile_path()')"

Re: [Sugar-devel] How is the 'default' string in '.sugar/default' determined?

2009-08-18 Thread Bert Freudenberg
On 18.08.2009, at 10:52, Martin Langhoff wrote: > On Tue, Aug 18, 2009 at 10:43 AM, Tomeu Vizoso > wrote: >> On Tue, Aug 11, 2009 at 17:24, Martin Langhoff> > wrote: >>> In the Sugar internals, how do you obtain the Sugar config storage >>> directory? Moreover, what is the /correct/, recommende