diff options
author | Mike C. Fletcher <mcfletch@raistlin.(none)> | 2007-04-10 02:47:37 (GMT) |
---|---|---|
committer | Mike C. Fletcher <mcfletch@raistlin.(none)> | 2007-04-10 02:47:37 (GMT) |
commit | 3f10890319aa00fcefa58380e9971a911c9ec5b0 (patch) | |
tree | 25e2889a740e36fe776b083a250d15585d32a463 /sugar/profile.py | |
parent | 508a59b99bf06bd6c3294a296ee014b5636bbd35 (diff) |
Docstrings for modules all over sugar and shell.
These are just the doc strings I created as I was spelunking
through to see how Sugar manages launching applications. The
resulting auto-documentation is neither polished or finished,
but it should help people reading the code somewhat.
There are a few minor code cleanups:
* activityhandle (replacing C idiom for initialisation with
a Python one)
* bundle registry (using a parameterised directory name so
that it shows up in the documentation)
* validate_activity_id function, use isinstance( item, (str,unicode))
for the query, rather than two separate checks with isinstance
Diffstat (limited to 'sugar/profile.py')
-rw-r--r-- | sugar/profile.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sugar/profile.py b/sugar/profile.py index 4df0f52..840e101 100644 --- a/sugar/profile.py +++ b/sugar/profile.py @@ -1,3 +1,4 @@ +"""User settings/configuration loading""" # Copyright (C) 2006, Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify @@ -23,6 +24,30 @@ from sugar import util from sugar.graphics.xocolor import XoColor class _Profile(object): + """Local user's current options/profile information + + User settings are stored in an INI-style configuration + file. This object uses the ConfigParser module to load + the settings. At the moment the only storage mechanism + is in the set_server_registered method, which loads the + file directly from disk, then dumps it back out again + immediately, rather than using the class. + + The profile is also responsible for loading the user's + public and private ssh keys from disk. + + Attributes: + + name -- child's name + color -- XoColor for the child's icon + server -- school server with which the child is + associated + server_registered -- whether the child has registered + with the school server or not + + pubkey -- public ssh key + privkey_hash -- SHA has of the child's public key + """ def __init__(self): self.name = None self.color = None |