1
0
mirror of https://github.com/aquatix/digimarks.git synced 2025-12-06 18:35:12 +01:00

Python 2+3

This commit is contained in:
2017-12-17 13:52:00 +01:00
parent 4170a7818b
commit 7f6dc3f3df

View File

@@ -1,9 +1,11 @@
# Activate virtualenv
import settings
#activate_this = getattr(settings, 'VENV', None)
activate_this = getattr(settings, 'VENV', None)
# FIXME: python 2 *and* python 3 compatibility
# Python 2
#if activate_this:
# execfile(activate_this, dict(__file__=activate_this))
activate_this = getattr(settings, 'VENV', None)
# Python 3
with open(activate_this) as file_:
exec(file_.read(), dict(__file__=activate_this))