Development Team/Almanac/sugar.env

From Sugar Labs
< Development Team‎ | Almanac
Revision as of 21:32, 23 February 2010 by Patrol (talk | contribs) (moved Walter is a wanker 12/Almanac/sugar.env to Development Team/Almanac/sugar.env over redirect: revert)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
  Development Team/Almanac

Sugar Almanac for Developers

Development Team/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

Internationalization

Internationalization

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()