Programs you need
- ... to use PyRWI? (installed in roughly this order)
- ... to develop for PyRWI?
NI DAQmx
Actually you only need a small part of NI DAQmx (The ANSI C NI-DAQmx library Description). It is good to get this downloading first, because even though you only need a few parts you have to download everything and that makes for a pretty large download.
How to install:
- Get NI DAQmx downloading, it is huge: http://joule.ni.com/nidu/cds/view/p/id/1216/lang/en
- Once the download is complete, run the installer.
- When asked what components you want to install ...
- make sure "ANSI C Support" is selected
- also the Measurement and Automation Explorer is very useful.
Python
How to install:
- Download the latest Python installer:
http://www.python.org/download/
- NOTE: As of 7/11/09 Python 2.6 is the latest version supported by all the math libraries used here. So don't download a newer version, unless you know all the libraries will support it.
- Install Python
- We would recommend installing Python to its default path rather than forcing it some place else.
- Add Python to your search path
- Right click on My Computer and choose Properties
- Choose the Advanced tab and click Environment Variables
- Under System Variables, find "Path"
- Click edit
- Add ";C:\Python26" to the end of the Value list (You will need to adjust this for wherever you installed Python)
- Click all the "Okay" buttons to close everything
Geany - Recommended
Description: My current editor of choice. It is super lightweight (launches fast, doesn't take a lot of memory), but seems to have the key features we want (Code navigator, Program execution, Regular Expression based search and replace, etc.).
How to install:
- Get the latest windows installer (geany-X.XX_setup.exe) from: http://download.geany.org/
- Run the installer
- Tips
- If you added Python to the path earlier, you can run your programs using Build -> Execute from the menus (or by pressing F5)
- If you want to run the program with the debugger, go to Build->Set Includes and
Arguments. Change the Execute line from
python "%f"
topython -m pdb "%f"
Numpy, SciPy, & PyLab
Descriptions: Numpy, SciPy, PyLab
How to install:
- NOTE: Make sure the installer you download matches the version of Python that you selected above.
- Download the installers
- Get numpy-X.X.X-win32-superpack-pythonY.Y from http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103
- Get scipy-X.X.X-win32-superpack-pythonY.Y from http://sourceforge.net/project/showfiles.php?group_id=27747&package_id=19531
- Get matplotlib-X.XX.0.win32-pyY.Y.exe from http://sourceforge.net/projects/matplotlib/files/
- Run the NumPy installer first
- Then run the SciPy installer
- Test the install
- Run IDLE
- Enter some of the examples from http://www.scipy.org/scipy_Example_List
- Run some example code: http://matplotlib.sourceforge.net/examples/pylab_examples/
pyFLTK
How to install:
- Download Windows installer from here:
http://sourceforge.net/project/showfiles.php?group_id=14072&package_id=11676
- The installer is named something like pyFltk-X.X.X.win32-pyY.Y.exe
- Run installer
- Run some demos: C:\Python26\Lib\site-packages\fltk\test
- The path may be different if you installed Python somewhere else or a different version of Python.
IPython - Recommended
Description: IPython is a terminal that makes writing and testing Python code interactively very easy. IPython also integrates well with PyLab. IPython offers many features and extensions over the IDLE terminal.
How to install:
- Download latest installer from: http://ipython.scipy.org/moin/Download
- Run installer
- On windows, IPython needs PyReadline
- Get it from here: http://ipython.scipy.org/moin/PyReadline/Intro
- Without PyReadline, IPython will not have any colors and the command history will not work as well.
- Run IPython with PyLab support and test with these commands:
In [1]: x = arange(0,2*pi,pi/100)
In [2]: y = sin(x)
In [3]: plot(x,y)
In [4]: exit()
PyRWI
Description: PyRWI is made of two Python packages: PyRWI proper (GUI widgets and DAQ helpers) and nidaqmx (Python wrapper to the ANSI C DAQmx library)
How to install:
- Download the latest code using SVN from our repository.
- The PyRWI project is in its early stages, so there isn't an installer.
- The code has an
install.txt
in the root folder. Follow the instructions in this file to compile and install PyRWI. - If you are willing to help setup a distutils installer, please contact us ().
- The code has an
- You can test the installation by starting IPython or IDLE and typing:
import nidaqmx as DAQmx
import pyrwi
- If they import without error, you are all set.
MingW
Description: MingW provides the GCC compiler and necessary support tools to allow compiling of C or C++ programs on Windows. All Windows C libraries used by PyRWI are build with MingW.
How to install:
- The official installation instructions are
here
- Use the Automated Installer
- When the installer asks, select the minimal install
- Don't forget to do the environment setup.
MSYS
Description: MSYS provides a BASH shell and related *nix based command line development tools. MSYS is designed to integrate with support MingW. We use MSYS for two reasons, first it enables many programming solutions & tools common on *nix environments to be used directly in Windows, second it provides a familiar interface to those who are accustom to *nix development.
How to install:
- The official install instructions are: http://www.mingw.org/wiki/MSYS
- Get MSYS-1.X.X.exe from
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=24963
- We chose the minimal install
- You should follow the official instructions down through installing msysDTK-X.X.X.exe
- The MSYS Core 1.0.11 does not seem to be necessary. I think MSYS-1.X.X.exe includes it.
- Optionally you can also install vim from:
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=67879
- vim-7.1-MSYS-1.0.11-1-bin.tar.gz
- To install vim: untar the file in C:\msys\1.0
- Tips
- MSYS always starts in your "home" directory, which is usually something like C:\msys\1.0\home\USERNAME
- MSYS uses unix style paths and maps your C drive to
/c
so your My Documents folder is at/c/Documents\ and\ Settings/USERNAME/My\ Documents/
in MSYS - There are more tips here
- To test the install:
- Make a file named hello.c that contains:
#include <stdio.h>
int main() {
printf("Hello World");
return 0;
}
- Compile the program in MSYS by typing:
gcc -Wall hello.c -o hello.exe
- Run the program in MSYS by typing:
./hello.exe
- Make a file named hello.c that contains:
SWIG
Description: SWIG is a tool for making C/C++ libraries accessible in scripting languages. We use SWIG to make the nidaqmx Python module.
How to install:
- Download the Windows version (swigwin) from http://www.swig.org/survey.html
- The zip contains a pre-compiled version of swig.
- The trick is to find somewhere to install it.
- You could use the
./config; make; make install
method, but that requires g++ (from the full install of MingW) and maybe other stuff. - We will give our solution here
- Extract the zip file and rename the resulting director to "swigwin"
- Copy that directory to "C:\msys\1.0\home\USERNAME"
- Now you can access swig from MSYS using something like this
~/swigwin/swig.exe -python example.i