Changeset 71438


Ignore:
Timestamp:
Aug 26, 2017, 5:39:44 AM (7 years ago)
Author:
zarch
Message:

python.builtins: remove wrong imports

Location:
grass/trunk/lib/python
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • grass/trunk/lib/python/ctypes/ctypesgencore/parser/cgrammar.py

    r68351 r71438  
    1111
    1212'''
    13 try:
    14     from builtins import long
    15 except ImportError:
    16     # python3
    17     long = int
    18 
    1913__docformat__ = 'restructuredtext'
    2014
     
    3024from . import preprocessor
    3125from . import yacc
     26
     27
     28if sys.version_info.major == 3:
     29    long = int
    3230
    3331
  • grass/trunk/lib/python/ctypes/ctypesgencore/parser/pplexer.py

    r71213 r71438  
    1010
    1111__docformat__ = 'restructuredtext'
    12 
    13 try:
    14     from builtins import long
    15     PY2 = True
    16 except ImportError:
    17     # python3
    18     PY2 = False
    19     long = int
    2012
    2113import os
     
    3022from . import yacc
    3123from .lex import TOKEN
     24
     25
     26PY2 = True
     27if sys.version_info.major == 3:
     28    PY2 = False
     29    long = int
     30
    3231
    3332tokens = (
  • grass/trunk/lib/python/ctypes/ctypesgencore/printer/preamble.py

    r68351 r71438  
    1 try:
    2     from builtins import long
    3 except ImportError:
    4     long = int
    5 
    61import os
    72import sys
     
    94import ctypes
    105from ctypes import *
     6
     7if sys.version_info.major == 3:
     8    long = int
     9
    1110
    1211_int_types = (c_int16, c_int32)
  • grass/trunk/lib/python/pygrass/vector/table.py

    r69811 r71438  
    1010
    1111import os
    12 
    13 try:
    14     from builtins import long, unicode
    15 except ImportError:
    16     # python3
     12import sys
     13
     14if sys.version_info.major == 3:
    1715    long = int
    1816    unicode = str
  • grass/trunk/lib/python/pygrass/vector/testsuite/test_table.py

    r69811 r71438  
    55@author: pietro
    66"""
    7 try:
    8     from builtins import long
    9 except ImportError:
    10     # python3
    11     long = int
    12 
    137import os
    148import sqlite3
     9import sys
    1510import tempfile as tmp
    1611from string import ascii_letters, digits
     
    2318from grass.pygrass.vector.table import Table, get_path
    2419
     20
     21if sys.version_info.major == 3:
     22    long = int
    2523
    2624# dictionary that generate random data
  • grass/trunk/lib/python/script/raster.py

    r69574 r71438  
    2121
    2222import os
     23import sys
    2324import string
    2425import time
     
    2930
    3031
    31 try:
    32     from builtins import unicode
    33     bytes = str
    34 except ImportError:
    35     # python3
     32if sys.version_info.major == 3:
    3633    unicode = str
    3734
  • grass/trunk/lib/python/script/task.py

    r71276 r71438  
    1919"""
    2020import re
    21 import types
     21import sys
    2222import string
    2323
    24 try:
    25     from builtins import unicode
    26     bytes = str
    27 except ImportError:
    28     # python3
     24if sys.version_info.major == 3:
    2925    unicode = str
    3026
  • grass/trunk/lib/python/temporal/core.py

    r71422 r71438  
    3131#import traceback
    3232import os
     33import sys
    3334import grass.script as gscript
    3435# i18N
     
    3637gettext.install('grasslibs', os.path.join(os.getenv("GISBASE"), 'locale'))
    3738
    38 try:
    39     from builtins import long
    40 except ImportError:
    41     # python3
     39if sys.version_info.major == 3:
    4240    long = int
    4341
Note: See TracChangeset for help on using the changeset viewer.