Package easygconf
[hide private]
[frames] | no frames]

Source Code for Package easygconf

 1  #-*- coding: utf-8-*- 
 2   
 3  """ 
 4   
 5  easygconf provids an easy, pythonic way to access `GConf <http://projects.gnome.org/gconf/>`__ through a dict-like interface. 
 6   
 7  Example 
 8  ------- 
 9  :: 
10   
11      from easygconf import GConfDict 
12      import gtk 
13   
14   
15      key = 'test' 
16      gc=GConfDict('/apps/easygconftest') 
17   
18      print "%s is %s"%(key, gc[key]) 
19      gc[key] = 'foo' 
20      print "Now %s is %s"%(key, gc[key]) 
21   
22   
23      def callback (key, value, gconfdict, id, args): 
24          print "%s changed to %s"%(key, value) 
25   
26      gc.add_listener('test', callback) 
27      try: 
28          gtk.main() 
29      except KeyboardInterrupt: 
30          pass 
31      gc.unset('test') 
32   
33  """ 
34   
35  ##  easygconf - a dict-like API for GConf 
36  ##               <http://www.florian-diesch.de/software/easygconf/> 
37  ##  Copyright (C) 2008, 2009 Florian Diesch <devel@florian-diesch.de> 
38  ##   
39  ##  This program is free software; you can redistribute it and/or modify 
40  ##  it under the terms of the GNU General Public License as published by 
41  ##  the Free Software Foundation; either version 2 of the License, or 
42  ##  (at your option) any later version. 
43  ##   
44  ##  This program is distributed in the hope that it will be useful, 
45  ##  but WITHOUT ANY WARRANTY; without even the implied warranty of 
46  ##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
47  ##  GNU General Public License for more details. 
48  ##   
49  ##  You should have received a copy of the GNU General Public License along 
50  ##  with this program; if not, write to the Free Software Foundation, Inc., 
51  ##  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 
52  ## 
53   
54  from gconfdict import GConfDict 
55   
56   
57  VERSION = "0.03" 
58