comparison configmix/variables.py @ 100:e3289a56ba80

Enhance docu
author Franz Glasner <f.glasner@feldmann-mg.com>
date Thu, 22 Mar 2018 16:22:22 +0100
parents cd6c5c1494f5
children f6f2dc7cf053
comparison
equal deleted inserted replaced
99:cd6c5c1494f5 100:e3289a56ba80
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 #- 2 #-
3 # :Copyright: (c) 2015-2018, Franz Glasner. All rights reserved. 3 # :Copyright: (c) 2015-2018, Franz Glasner. All rights reserved.
4 # :License: 3-clause BSD. See LICENSE.txt for details. 4 # :License: 3-clause BSD. See LICENSE.txt for details.
5 #- 5 #-
6 """Variable expansion: namespaces and filters 6 """Variable expansion: implementation of namespaces and filters
7 7
8 """ 8 """
9 9
10 from __future__ import division, absolute_import, print_function 10 from __future__ import division, absolute_import, print_function
11 11
38 return native_os_str_to_text(os.getcwd()) 38 return native_os_str_to_text(os.getcwd())
39 raise KeyError("key %r not found in the namespace" % name) 39 raise KeyError("key %r not found in the namespace" % name)
40 40
41 41
42 def _pylookup(name, default=_MARKER): 42 def _pylookup(name, default=_MARKER):
43 """Lookup a Python specific variable""" 43 """Lookup Python specific information"""
44 import platform 44 import platform
45 if name == "version": 45 if name == "version":
46 return u(platform.python_version()) 46 return u(platform.python_version())
47 elif name == "implementation": 47 elif name == "implementation":
48 return u(platform.python_implementation()) 48 return u(platform.python_implementation())