154a3d2f60d85fd77e08cbb0c5ca80174b116946
[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 import copy
13
14 class BProject(object):
15     """
16     Simple class for store and retrieve project informations.
17     """
18     
19     def __init__(self):
20         self.infos = {}
21     
22     def setInfo(self, key, value):
23         """
24         Store the given value with the name key.
25         """
26         self.infos[key] = value
27     
28     def info(self, key):
29         """
30         Retrieve the value associated with the name key.
31         """
32         if key in self.infos:
33             return copy.deepcopy(self.infos[key])
34         return None
35     
36     def __repr__(self):
37         return repr(self.infos)