Difference between revisions of "Development Team/Almanac/sugar.env"
< Development Team | Almanac
Jump to navigation
Jump to search
Dfarning-bot (talk | contribs) m (Sugar.env moved to DevelopmentTeam/Almanac/sugar.env: Robot: moved page) |
Dfarning-bot (talk | contribs) m (Robot: Automated text replacement (-{{Sugar Almanac}} +{{Almanac}})) |
||
Line 1: | Line 1: | ||
− | {{ | + | {{Almanac}} |
{{Sugar Almanac TOC}} | {{Sugar Almanac TOC}} | ||
= Environment Helper Functions = | = Environment Helper Functions = |
Revision as of 13:57, 6 February 2009
For Developers: almanac · api · bugs · gitorious · cgit · download · people · OLPC: wiki · activities · trac · cgit · build index · repository · firmware · Fedora: packages
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()