Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

TWAIN API for accessing scanners, cameras, etc on Windows

Project description

The Python TWAIN module provides an interface to scanners, digital cameras and
other devices which implement TWAIN, for the Windows platform. It provides the
functionality to allow a Python application to connect to the scanner/camera and
to retrieve images from that device.

The Python TWAIN module supports 32bit Windows only. It does not run on Apple
Computer Platforms or on UNIX based Platforms.

Example: Retrieve an image from a scanner

import twain
sm = twain.SourceManager(0)
ss = sm.OpenSource()
rv = ss.XferImageNatively()
if rv:
(handle, count) = rv
twain.DIBToBMFile(handle, 'image.bmp')

Project details

Release history Release notifications

This version
History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
twain-1.0.5.win32-py2.6.exe (233.5 kB) Copy SHA256 hash SHA256 Windows Installer 2.6 Jun 10, 2010
twain-1.0.5.win32-py2.7.exe (233.5 kB) Copy SHA256 hash SHA256 Windows Installer 2.7 Jun 10, 2010

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page