~ubuntu-branches/ubuntu/utopic/python-apptools/utopic

« back to all changes in this revision

Viewing changes to enthought/preferences/package_globals.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-07-08 23:55:50 UTC
  • mfrom: (2.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110708235550-yz5u79ubeo4dhyfx
Tags: 4.0.0-1
* New upstream release
* Update debian/watch file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
""" Package-scope globals.
2
 
 
3
 
The default preferences node is currently used by 'PreferencesHelper' and
4
 
'PreferencesBinding' instances if no specific preferences node is set. This
5
 
makes it easy for them to access the root node of an application-wide
6
 
preferences hierarchy.
7
 
 
8
 
"""
9
 
 
10
 
 
11
 
# The default preferences node.
12
 
_default_preferences = None
13
 
 
14
 
def get_default_preferences():
15
 
    """ Get the default preferences node. """
16
 
 
17
 
    return _default_preferences
18
 
 
19
 
def set_default_preferences(default_preferences):
20
 
    """ Set the default preferences node. """
21
 
 
22
 
    global _default_preferences
23
 
 
24
 
    _default_preferences = default_preferences
25
 
 
26
 
    # For convenience.
27
 
    return _default_preferences
28
 
 
29
 
#### EOF ######################################################################