Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Development Team/Almanac/sugar.profile
(view source)
Revision as of 10:23, 12 April 2011
No change in size
,
10:23, 12 April 2011
m
→How do I get the user's nick name?
Line 16:
Line 16:
client = gconf.client_get_default()
client = gconf.client_get_default()
−
username = client.get_string("/desktop/
suagr
/user/nick")
+
username = client.get_string("/desktop/
sugar
/user/nick")
</pre>
</pre>
Line 27:
Line 27:
prof = profile.get_profile()
prof = profile.get_profile()
−
# Two ways to print nickname: either through profile object, or through a helper
funciton
in sugar.profile
+
# Two ways to print nickname: either through profile object, or through a helper
function
in sugar.profile
print prof.nick_name
print prof.nick_name
print profile.get_nick_name()
print profile.get_nick_name()
Walter
Bureaucrats
,
Administrators
10,579
edits