用于Twisted的Exiftool协议和流端点插件
项目描述
Exiftool 协议和与 twisted 一起使用的流端点插件。
用法
from twisted.internet import defer, endpoints, protocol, reactor from txexiftool import ExiftoolProtocol @defer.inlineCallbacks def test(): # Construct an exiftool endpoint. If the tool is installed in a custom # location, specify the path to the binary as the first argument. E.g. # 'exiftool:/path/to/exiftool' ep = endpoints.clientFromString(reactor, 'exiftool') # Instantiate the protocol by connecting to the endpoint f = protocol.Factory.forProtocol(ExiftoolProtocol) p = yield ep.connect(f) # Run commands and retrieve results. metadata = yield p.execute('-j', '/usr/share/pixmaps/gtkvim.png') print metadata # Disconnect yield p.loseConnection() reactor.stop() reactor.callWhenRunning(test) reactor.run()
许可证
软件受MIT许可证约束。
项目详情
关闭
txExiftool-0.1.3.tar.gz的散列值
算法 | 散列摘要 | |
---|---|---|
SHA256 | 9d07bab5eb0cbfd559ef5035d61127fbff60110846f27ddd381abd81a6f9c42e |
|
MD5 | 451d49b3a8a9ca6cd9d891f196ac3b4d |
|
BLAKE2b-256 | 675a2ba52db90233fbb23983c6b0f2656f22aed773184140d98cbb7a170e2aab |