EasyManua.ls Logo

Matrix Vision mvBlueFOX - 16 Python Developers; Introduction; Building; Windows

Matrix Vision mvBlueFOX
255 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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

Table of Contents

Related product manuals