aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-07-02 14:26:25 +0200
committerJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-07-02 14:26:25 +0200
commit7c3f2ef461e92ef610ea835997c21921a8b4d05f (patch)
treee06e3a823c6320f62fae9c326a538b2bf98bdd8f /g_sorcery/compatibility.py
parentg_elpa/elpa_db: add_category to higher level (diff)
downloadg-sorcery-7c3f2ef461e92ef610ea835997c21921a8b4d05f.tar.gz
g-sorcery-7c3f2ef461e92ef610ea835997c21921a8b4d05f.tar.bz2
g-sorcery-7c3f2ef461e92ef610ea835997c21921a8b4d05f.zip
base class for tests and initial commit for py2 compatibility module
Diffstat (limited to 'g_sorcery/compatibility.py')
-rw-r--r--g_sorcery/compatibility.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/g_sorcery/compatibility.py b/g_sorcery/compatibility.py
new file mode 100644
index 0000000..ea6f3bf
--- /dev/null
+++ b/g_sorcery/compatibility.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+ compatibility.py
+ ~~~~~~~~~~~~~~~~
+
+ utilities for py2 compatibility
+
+ :copyright: (c) 2013 by Jauhien Piatlicki
+ :license: GPL-2, see LICENSE for more details.
+"""
+
+import sys
+
+py2k = sys.version_info < (3, 0)
+
+if py2k:
+ pass
+else:
+ from tempfile import TemporaryDirectory