[Sugar-devel] [PATCH sugar-toolkit] Insert activity root path in front of the reset of sys.path

Martin Langhoff martin.langhoff at gmail.com
Sat Feb 12 14:47:32 EST 2011


On Sat, Feb 12, 2011 at 1:57 PM, Sascha Silbe <silbe at activitycentral.com> wrote:
>> The behaviour sought by Aleksey's patch makes sense. I am surprised
>> that CWD isn't set to SUGAR_BUNDLE_PATH, maybe that needs to get fixed
>> instead.
>
> Thanks for disproving my assumption that it's something Python 2.x does
> differently and pointing at the actual issue.
>
> I agree that we should either change the working directory or tweak
> sys.path, but I'm still a bit worried about compatibility.

Hm. AFAICS, when an activity starts under S-0.84 the cwd is set
correctly. I've been debugging an activity that starts from a shell
script (as activities using libsugarize are prone to do) and the
script assumes (correctly) that CWD is the activity directory.

So I am intrigued about Aleksey's patch. Aleksey -- did you prep your
patch in response to an observed behaviour? What was it? Maybe the
problem was misdiagnosed?

cheers,


m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


More information about the Sugar-devel mailing list