[GRASS-SVN] r65788 - grass/trunk/lib/python/script
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jul 29 07:06:41 PDT 2015
Author: zarch
Date: 2015-07-29 07:06:41 -0700 (Wed, 29 Jul 2015)
New Revision: 65788
Modified:
grass/trunk/lib/python/script/vector.py
Log:
scipt:vector add python3 support
Modified: grass/trunk/lib/python/script/vector.py
===================================================================
--- grass/trunk/lib/python/script/vector.py 2015-07-29 14:05:37 UTC (rev 65787)
+++ grass/trunk/lib/python/script/vector.py 2015-07-29 14:06:41 UTC (rev 65788)
@@ -16,14 +16,17 @@
.. sectionauthor:: Glynn Clements
.. sectionauthor:: Martin Landa <landa.martin gmail.com>
"""
-
+from __future__ import absolute_import
import os
import types
-import copy
-import __builtin__
-from utils import parse_key_val
-from core import *
+try:
+ import __builtin__
+except ImportError:
+ import builtins as __builtin__
+
+from .utils import parse_key_val
+from .core import *
from grass.exceptions import CalledModuleError
@@ -352,7 +355,7 @@
try:
ret = read_command('v.what',
**cmdParams).strip()
- except CalledModuleError, e:
+ except CalledModuleError as e:
raise ScriptError(e.msg)
if "LC_ALL" in os.environ:
More information about the grass-commit
mailing list