Sugar.env: Difference between revisions
Jump to navigation
Jump to search
(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...) |
No edit summary |
||
Line 1: | Line 1: | ||
{{Sugar Almanac TOC}} |
|||
= Environment Helper Functions = |
= Environment Helper Functions = |
||
Revision as of 15:29, 2 July 2008
Sugar Almanac for Developers |
---|
Sugar Almanac Main Page Package: sugar |
Package: sugar.activity |
Package: sugar.graphics |
Package: sugar.datastore |
Logging |
Notes on using Python Standard Logging in Sugar |
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()