Sugar.env

From OLPC

Revision as of 02:54, 2 October 2008 by 146.115.56.126 (Talk)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  Sugar Almanac

Sugar Almanac for Developers

Sugar Almanac Main Page

Package: sugar

sugar.env

sugar.profile

sugar.mime

Package: sugar.activity

sugar.activity.activity

sugar.activity.registry

Package: sugar.graphics

sugar.graphics.alert

sugar.graphics.toolbutton

sugar.graphics.toolbox

Package: sugar.datastore

sugar.datastore.datastore

Logging

sugar.logger

Notes on using Python Standard Logging in Sugar

Internationalization

Internationalization in Sugar

Environment Helper Functions

How do I get the profile path, where datastore, logging and other files are all located?

You can use the env.get_profile_path() method, which returns the base directory from which you can find other directories related to the datastore, logging, and activity-specific files.

from sugar import env
...
        print env.get_profile_path()


= How do I get the log path?

Use env.get_logs_path to get the specific path for logging.

from sugar import env
...
        print env.get_logs_path()
Personal tools
  • Log in
  • Login with OpenID
About OLPC
About the laptop
About the tablet
Projects
OLPC wiki
Toolbox