"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/compat.py" between
cheetah3-3.2.3.tar.gz and cheetah3-3.2.4.tar.gz

About: Cheetah3 is a template engine and code generation tool for e.g. for Web development or Java, SQL, LaTeX, form email ... (written in Python).

compat.py  (cheetah3-3.2.3):compat.py  (cheetah3-3.2.4)
skipping to change at line 15 skipping to change at line 15
# Compatability definitions (inspired by six) # Compatability definitions (inspired by six)
PY2 = sys.version_info[0] < 3 PY2 = sys.version_info[0] < 3
if PY2: if PY2:
# disable flake8 checks on python 3 # disable flake8 checks on python 3
string_type = basestring # noqa string_type = basestring # noqa
unicode = unicode # noqa unicode = unicode # noqa
else: else:
string_type = str string_type = str
unicode = str unicode = str
try:
RecursionError = RecursionError
except NameError: # Python 2.7, 3.4
RecursionError = RuntimeError
if PY2: if PY2:
import imp import imp
def load_module_from_file(base_name, module_name, filename): def load_module_from_file(base_name, module_name, filename):
fp, pathname, description = imp.find_module( fp, pathname, description = imp.find_module(
base_name, [os.path.dirname(filename)]) base_name, [os.path.dirname(filename)])
try: try:
module = imp.load_module(module_name, fp, pathname, description) module = imp.load_module(module_name, fp, pathname, description)
finally: finally:
fp.close() fp.close()
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)