Changes

Line 9: Line 9:  
     version = "unknown"
 
     version = "unknown"
    +
=== get_activity_root() ===
 +
Some earlier OLPC builds (e.g., 656) do not have activity.get_activity_root(), so you need to catch an exception if you want to access the version.
 +
 +
try:
 +
    path = os.path.join(activity.get_activity_root(), "instance")
 +
except:
 +
    # early versions of Sugar (656) didn't support get_activity_root()
 +
    path = "/home/olpc/.sugar/default/org.sugarlabs.[your activity name]"
    
=== Screen size ===
 
=== Screen size ===