Previous Up Next Introduction

Installation

The 'twain' module is comprised of a single dll file, called twain.pyd. Download this file and place it in your python 'site-packages' directory. The file may be named with a version number extension on the web-server. Rename the file to 'twain.pyd'.

Installing a Binary Distribution

The binary distribution is available in a Zip file in the format twain_1.0b1-py_2.2.zip. twain_1.0b1 indicates that this is beta 1 of release 1 of the twain module. py_2.2 indicates that this binary is built to run with python version 2.2.

Extract the zip file to a directory. This will create the following files:

		 twain.pyd  - the twain module executable
		 demo       - demonstration programs directory
		 twexplore  - the twexplore program directory
		 docs       - the module documentation

For Python 2.2 or later

Copy the file 'twain.pyd' to your site-packages directory, i.e.

		 copy twain.pyd c:\python22\lib\site-packages

For Python 2.1.x

Copy the file 'twain.pyd' to your DLLs directory, i.e.

		 copy twain.pyd c:\python21\DLLs

You need to have wxPython installed to run the twexplore python scripts. If you do not have wxPython installed, you can download a binary version of this program, see below.

Building from source

You need to have Microsoft Visual C++ to build the twain module.

The source can be downloaded from CVS on SourceForge, or can be extracted from the 'tarball' file, twainsrc_1.0b1.zip, where 1.0b1 refers to beta 1 of release 1 of the module. Extract the source from the server, either a zipped file, or via CVS. Place the directory 'twainmodule' parallel to the 'Libs' directory in your python installation.

Download and install the TWAIN Toolkit from the TWAIN website. The header file twain.h is in the twain toolkit. If you do not install the TWAIN toolkit in the default location, you will have to change the twain module project definition to set the include path to this file.

Change directory to the twainmodule/src directory. Load the project workspace into Microsoft Visual C++. Build the DLL and place it in your python path, e.g. in the site-packages directory.

Twexplore Executable Installation

The twexplore program is available in executable form. This version does not require Python to be installed on your PC. Download the file twexplore_1.0b1.zip. 1.0b1 indicates that this is beta 1 release 1 of the executable and matches the source in twainsrc_1.0b1.zip.

Extract the file to a directory. You can run the program (twexplore.exe) from this directory.


Previous Up Next Introduction