
16 Python developers
129
16
Python developers
Note
There is no separate manual available for the Python API right now. For documentation please refer to the
C++ manual instead. Almost everything stated there will be valid for Python as well!
16.1
Introduction
As supporting all the various distributions and versions of Python out there with a binary interface is almost impos-
sible the mvIMPACT acquire Python API needs to be compiled for a specific version of Python it shall be used with.
Because of that what is shipped at the moment is source code that has been generated using
SWIG
which before
using it requires a compilation operation.
This requires a compiler matching the version of Python that shall be used. E.g. to use mvIMPACT Acquire with
Python 2.7 on Windows systems requires Visual Studio 2008. Additional information about the compiler that works
for a particular Python version on a particular platform can be found online. See e.g.
•
https://docs.python.org/2/extending/building.html
•
https://wiki.python.org/moin/WindowsCompilers
Note
Microsoft provides free-of-charge a 'Microsoft Visual C++ Compiler for Python 2.7' which can be used to
compile 'mvIMPACT Acquire for python'
for Python versions 2.7 to 3.2
:
https://www.microsoft.com/en-us/download/details.aspx?id=44266
The use of this compiler packet has been tested by MATRIX VISION and it is is highly recommended.
When installing the mvIMPACT Acquire Python API on a target system all files needed for building the actual
extension module can be found in
/mvIMPACT_Python
.
16.2
Building
During the compilation process Pythons
distutils
package will be used
16.2.1
Windows
On Windows systems running
/mvIMPACT_Python/compileWrapperCode.bat
will build and install the Python
API in the
site-packages
sub-folder of your Python installation provided a matching compiler could be found.
Note
The script will assume the Python interpreter can be found in the systems
Path
variable. If this is not the case
you need to append the path to the directory containing
Python.exe
to this variable either permanently
using the Systems environment variable dialog or temporary within the command shell you are calling the
script from like this:
set
Path=%Path%;C:
\
Python27
compileWrapperCode.bat
The command shell your are calling the compilation script from depending on the version of Windows you
are working with and the folder you have installed the mvIMPACT Acquire package to might require elevated
rights thus you might need to start the command shell with the
Run as administrator
option.
MATRIX VISION GmbH
Содержание mvBlueFOX
Страница 1: ...mvBlueFOX Technical Manual...
Страница 22: ...5 2 European Union Declaration of Conformity statement 15 MATRIX VISION GmbH...
Страница 23: ...16 CONTENTS MATRIX VISION GmbH...
Страница 24: ...5 3 Legal notice 17 5 3 Legal notice 5 3 1 For customers in the U S A MATRIX VISION GmbH...
Страница 53: ...46 CONTENTS Figure 3 D Sub 9 pin male digital I O MATRIX VISION GmbH...
Страница 117: ...110 CONTENTS MATRIX VISION GmbH...
Страница 201: ...194 CONTENTS 20 1 5 2 Color version MATRIX VISION GmbH...
Страница 202: ...20 1 mvBlueFOX Model 220 0 3 Mpix 640 x 480 195 20 1 5 3 Gray scale version MATRIX VISION GmbH...
Страница 203: ...196 CONTENTS MATRIX VISION GmbH...
Страница 210: ...20 2 mvBlueFOX Model 220a 0 3 Mpix 640 x 480 203 20 2 5 3 Gray scale version MATRIX VISION GmbH...
Страница 211: ...204 CONTENTS MATRIX VISION GmbH...
Страница 217: ...210 CONTENTS 20 3 5 2 Color version MATRIX VISION GmbH...
Страница 218: ...20 3 mvBlueFOX Model 221 0 8 Mpix 1024 x 768 211 20 3 5 3 Gray scale version MATRIX VISION GmbH...
Страница 219: ...212 CONTENTS MATRIX VISION GmbH...
Страница 220: ...20 3 mvBlueFOX Model 221 0 8 Mpix 1024 x 768 213 MATRIX VISION GmbH...
Страница 225: ...218 CONTENTS 20 4 5 2 Color version MATRIX VISION GmbH...
Страница 226: ...20 4 mvBlueFOX Model 223 1 4 Mpix 1360 x 1024 219 20 4 5 3 Gray scale version MATRIX VISION GmbH...
Страница 227: ...220 CONTENTS MATRIX VISION GmbH...
Страница 234: ...20 5 mvBlueFOX Model 224 1 9 Mpix 1600 x 1200 227 20 5 5 3 Gray scale version MATRIX VISION GmbH...
Страница 235: ...228 CONTENTS MATRIX VISION GmbH...