Commit 919705b5 authored by Daniel Scheffler's avatar Daniel Scheffler Committed by Daniel Scheffler
Browse files

Added os compatibility module. Added future imports to ensure Python 2.7 compatibility.

parent 2a0cdcdc
from __future__ import (division, print_function, absolute_import, unicode_literals)
from . import compatibility
from . import convenience
from . import dtypes
......
# -*- coding: utf-8 -*-
__author__ = "Daniel Scheffler"
from __future__ import absolute_import
import os
try:
......@@ -15,6 +15,8 @@ except ImportError:
from ..processing.shell import subcall_with_output
from ..io.pathgen import get_tempfile
__author__ = "Daniel Scheffler"
def Warp(destNameOrDestDS, srcDSOrSrcDSTab, options = '', format = 'GTiff',
outputBounds = None,
......@@ -396,4 +398,4 @@ def get_gdal_func(funcName):
if funcName in globals():
return globals()[funcName]
else:
raise AttributeError("'gdal' has no attribute '%s'." % funcName)
\ No newline at end of file
raise AttributeError("'gdal' has no attribute '%s'." % funcName)
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
import errno
from six import PY3
__author__ = "Daniel Scheffler"
def makedirs(name, exist_ok=False, **kwargs):
if PY3:
os.makedirs(name, exist_ok=exist_ok, **kwargs)
else:
try:
os.makedirs(name)
except OSError as e:
if e.errno != errno.EEXIST:
raise
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment