最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Python: Get the Source State in Twain - Stack Overflow

programmeradmin5浏览0评论

I have a python script where I am using Twain to interact with my scanner. First I initialize my source:

scanner = sm.OpenSource()

set a few capabilities then request to acquire an image:

scanner.RequestAcquire(0, 1)

I then try to transfer an image:

scanner.XferImageNatively()

I get a Twain Sequence error, the docs tell me this happens when it is in the incorrect state. I can not for the life of me find in the docs how to check said state though. Can anyone offer some assistance??

I would like to check the state and wait until my scanner is in a valid state.

发布评论

评论列表(0)

  1. 暂无评论