Skip to content

Commit 177aa55

Browse files
authored
Removes build_py_2to3 and adds import of print_function (#261)
* removes import of build_py_2to3 build_py_2to3 is no longer needed because the syntax being used in comtypes is Python 2.7 compliant * adds print_function import `__future__.print_function` is needed in order to have comtypes work properly on Python 2.7
1 parent 6c1788a commit 177aa55

File tree

12 files changed

+12
-5
lines changed

12 files changed

+12
-5
lines changed

comtypes/client/_events.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
import ctypes
23
import traceback
34
import comtypes

comtypes/shelllink.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
from ctypes import *
23
from ctypes.wintypes import DWORD, WIN32_FIND_DATAA, WIN32_FIND_DATAW, MAX_PATH
34
from comtypes import IUnknown, GUID, COMMETHOD, HRESULT, CoClass

comtypes/test/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# comtypes.test package.
22

3+
from __future__ import print_function
34
import ctypes
45
import getopt
56
import os

comtypes/test/find_memleak.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
import unittest, gc
23
from ctypes import *
34
from ctypes.wintypes import *

comtypes/test/test_agilent.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# This test requires that the Agilent IVI-COM Driver for Agilent546XX
22
# is installed. It is not requires to have a physical instrument
33
# connected, the driver is used in simulation mode.
4+
5+
from __future__ import print_function
46
import unittest
57
from comtypes.test import ResourceDenied
68
from comtypes.client import CreateObject

comtypes/test/test_createwrappers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
import glob
23
import os
34
import unittest

comtypes/test/test_excel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: latin-1 -*-
2+
from __future__ import print_function
23
import unittest
34

45
import comtypes.test

comtypes/test/test_outparam.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys
21
from ctypes import *
32
import unittest
43

comtypes/test/test_variant.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
from ctypes import (
23
POINTER, byref, c_byte, c_char, c_double, c_float, c_int, c_int64, c_short,
34
c_ubyte, c_ushort, c_uint, c_uint64, pointer,

comtypes/tools/codegenerator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Code generator to generate code for everything contained in COM type
22
# libraries.
3+
from __future__ import print_function
34
import os
45
import sys
56
if sys.version_info >= (3, 0):

0 commit comments

Comments
 (0)