Using the AccountsService API with Python
Posted
by
pabluk
on Ask Ubuntu
See other posts from Ask Ubuntu
or by pabluk
Published on 2012-06-20T21:10:42Z
Indexed on
2012/06/20
21:23 UTC
Read the original article
Hit count: 488
python
|application-development
I'm writing an application for the Ubuntu app showdown and I try to read/write the user's profile picture using this
>>> from gi.repository import AccountsService, GLib
>>> current_user = GLib.get_user_name()
>>> user = AccountsService.UserManager.get_default().get_user(current_user)
>>> print user.get_icon_file()
None
>>> print user.get_user_name()
None
But apparently does not work. Is there another way to use AccountsService with Python? I could not find more documentation about AccountsService and Python.
© Ask Ubuntu or respective owner