#!/usr/bin/env python # This is a python wrapper written in C, it interfaces Python methods to # some gpib library routine(s), and pass results back to Python. This # was orignaly form linux-gpib, with specific mods. The simple # Python code that runs with this ersion is however compatible with # the linux-gpib version (I hope). # I used ActivePython from ActiveState Corp. http://activestate.com/ # NI's driver and lib's must be installed (i.e. install ni488226.exe) # form "C:\Program Files\National Instruments\Shared\" # copy ni4882.h, gpib-32.obj to this location # rename gpib-32.obj to gpib-32.lib # rename ni4882.h to ni488.h # needs Microsoft Visual Studio (VS) C/C++ installed # ActivePython 2.3.x is Compiled with VS6 and # ActivePython 2.4.x is compiled with VS.Net 2003. # ActivePython 2.6.x is compiled with VS.Net 2008. # Note: I compiled with Microsoft Visual C++ 2008, # available for free download from # http://www.microsoft.com/express/vc/ # In order to compile this wrapper you need to use the same # compiler that your version of python was compile with. # At command prompt set working directory to this files location # and run "python setup.py install", # or to get an installer run "python setup.py bdist_wininst" from distutils.core import setup,Extension setup(name="gpib", version="2.60", description="Windows GPIB Python Bindings for ni488226.exe and ActivePython-2.6.1.1-win32", py_modules = ['Gpib'], ext_modules=[ Extension("gpib", ["gpibinter.c"], libraries=["gpib-32"] )] )