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

Source Code for Package AEConstants

 1  ''' 
 2  Wraps all global constants in a convenient package. 
 3   
 4  @author: Pete Brunet 
 5  @author: Peter Parente 
 6  @author: Brett Clippingdale 
 7  @organization: IBM Corporation 
 8  @copyright: Copyright (c) 2005, 2007 IBM Corporation 
 9  @license: The BSD License 
10   
11  All rights reserved. This program and the accompanying materials are made  
12  available under the terms of the BSD license which accompanies 
13  this distribution, and is available at 
14  U{http://www.opensource.org/licenses/bsd-license.php} 
15  ''' 
16  from Color import * 
17  from Event import * 
18  from Help import * 
19  from Input import * 
20  from Output import * 
21  from Parsing import * 
22  from Platform import * 
23  from Profile import * 
24  from Semantic import * 
25  from Spelling import * 
26  from Tools import * 
27   
28 -def register(kwargs):
29 ''' 30 Registers new constant names and values. As soon as a repeat constants 31 between those that are already registered and those that are going to be 32 registered is found, registration ceases. This is an optimization for 33 L{Perk}s that appear in all L{Tier}s but don't want to wait to have all 34 their constants registered numerous times. 35 36 @param kwargs: Constant name/value pairs 37 @type kwargs: dictionary 38 ''' 39 g = globals() 40 for name, val in kwargs.items(): 41 if name in g: 42 continue 43 g[name] = val
44