Sugar.env

From OLPC
Revision as of 18:39, 26 June 2008 by Fanwar (talk | contribs) (New page: = 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 retu...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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