Sane API 的纯Python实现,Pyinsane 1.2.0

jopen 11年前

Pyinsane是 Sane API (使用ctypes) 的纯Python实现和抽象层。它支持Python 2.7 和 Python 3.x, 并且需要Pillow。

代码被分为3层:

  • rawapi : Ctypes binding to the raw Sane API
  • abstract : An Object-Oriented layer that simplifies the use of the Sane API and try to avoid possible misuse of the Sane API. When scanning, it also takes care of returning a PIL image.
  • abstract_th : The Sane API is not thread-safe and cannot be used in a multi-threaded environment easily. This layer solves this problem but using a fully dedicated thread.