在Windows上使用带有Python 3.4的ImageScanner模块
问题描述:
我在此窗口后面安装了imagescanner modulesteps。我已连接到无线上的扫描仪。当我尝试此代码:在Windows上使用带有Python 3.4的ImageScanner模块
from imagescanner import ImageScanner
iscanner = ImageScanner()
scanners = iscanner.list_scanners()
print(scanners[0])
的错误信息发生:
C:\Python3.4\python.exe C:/Users/PB/PycharmProjects/ImageScanner/deneme.py
Traceback (most recent call last):
File "C:/Users/PB/PycharmProjects/ImageScanner/deneme.py", line 4, in <module>
from imagescanner import ImageScanner
File "C:\Python3.4\lib\site-packages\imagescanner-0.9-py3.4.egg\imagescanner\__init__.py", line 2, in <module>
from imagescanner.core._imagescanner import ImageScanner
File "C:\Python3.4\lib\site-packages\imagescanner-0.9-py3.4.egg\imagescanner\core\_imagescanner.py", line 61
except Exception, exc:
^
SyntaxError: invalid syntax
Process finished with exit code 1
答
据我所知,图象扫描是不是与Python兼容3.
你可以尝试修复它。 SyntaxError引用旧语法的异常(“class,variable”在新版本中变为“class as variable”)。但我不确定你能找到什么其他问题。