Reformat; fix for the wizard.
[bertos.git] / wizard / BProject.py
1 #!/usr/bin/env python
2 # encoding: utf-8
3 #
4 # Copyright 2008 Develer S.r.l. (http://www.develer.com/)
5 # All rights reserved.
6 #
7 # $Id:$
8 #
9 # Author: Lorenzo Berni <duplo@develer.com>
10 #
11
12 class BProject(object):
13     """
14     Simple class for store and retrieve project informations.
15     """
16     
17     def __init__(self):
18         self.infos = {}
19     
20     def setInfo(self, key, value):
21         """
22         Store the given value with the name key.
23         """
24         self.infos[key] = value
25     
26     def info(self, key):
27         """
28         Retrieve the value associated with the name key.
29         """
30         if key in self.infos.keys():
31             return self.infos[key]
32         return None
33     
34     def __repr__(self):
35         return repr(self.infos)