Changes
Jump to navigation
Jump to search
Development Team/Almanac/sugar.env (view source)
Revision as of 22:54, 1 October 2008
, 22:54, 1 October 2008no edit summary
{{Sugar Almanac}}
{{Sugar Almanac TOC}}
= 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.
<pre>
from sugar import env
...
print env.get_profile_path()
</pre>
==== How do I get the log path? ===
Use env.get_logs_path to get the specific path for logging.
<pre>
from sugar import env
...
print env.get_logs_path()
</pre>
{{Sugar Almanac TOC}}
= 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.
<pre>
from sugar import env
...
print env.get_profile_path()
</pre>
==== How do I get the log path? ===
Use env.get_logs_path to get the specific path for logging.
<pre>
from sugar import env
...
print env.get_logs_path()
</pre>