233
|
1 #!/usr/bin/env python
|
|
2 # -*- coding: utf-8 -*-
|
|
3 #
|
|
4 # Copyright (C) 2007 Edgewall Software
|
|
5 # All rights reserved.
|
|
6 #
|
|
7 # This software is licensed as described in the file COPYING, which
|
|
8 # you should have received as part of this distribution. The terms
|
|
9 # are also available at http://babel.edgewall.org/wiki/License.
|
|
10 #
|
|
11 # This software consists of voluntary contributions made by many
|
|
12 # individuals. For the exact contribution history, see the revision
|
|
13 # history and logs, available at http://babel.edgewall.org/log/.
|
|
14
|
|
15 import os
|
|
16 import pickle
|
|
17 from pprint import pprint
|
|
18 import sys
|
|
19
|
|
20 import babel
|
|
21
|
|
22 dirname = os.path.join(os.path.dirname(babel.__file__))
|
|
23 filename = os.path.join(dirname, 'global.dat')
|
|
24 fileobj = open(filename, 'rb')
|
|
25 try:
|
|
26 data = pickle.load(fileobj)
|
|
27 finally:
|
|
28 fileobj.close()
|
|
29
|
|
30 if len(sys.argv) > 1:
|
|
31 pprint(data.get(sys.argv[1]))
|
|
32 else:
|
|
33 pprint(data)
|