用Python控制徕卡显微镜
项目描述
leicacam
概述
用Python控制徕卡显微镜
安装
- leicacam的最新版本需要Python 3.5+
- 如果您需要继续使用Python 2.7,请将leicacam的版本锁定在0.3.0。
使用pip
安装
pip3 install leicacam
示例
与显微镜通信
from leicacam import CAM
cam = CAM() # initiate and connect, default localhost:8895
# some commands are created as short hands
# start matrix scan
response = cam.start_scan()
print(response)
# but you could also create your own command with a list of tuples
command = [('cmd', 'enableall'),
('value', 'true')]
response = cam.send(command)
print(response)
# or even send it as a bytes string (note the b)
command = b'/cmd:enableall /value:true'
response = cam.send(command)
print(response)
文档
请参阅API参考中可用的命令: http://leicacam.rtfd.org。
开发
安装依赖项并将leicacam的开发版本链接到pip
pip install -r requirements_dev.txt
代码格式化
我们使用black代码格式化器来自动格式化代码。这需要Python 3.6进行开发。
black ./
测试
tox
本地构建文档
要构建文档
pip install -r docs/requirements.txt
make docs
项目详情
下载文件
下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。
源代码分发
leicacam-0.4.2.tar.gz (11.1 kB 查看哈希值)
构建分发
leicacam-0.4.2-py3-none-any.whl (8.2 kB 查看哈希值)
关闭
leicacam-0.4.2.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e3cc2757b74f55e51b8667af352580c4efb655be212fa3f9f98abd4ccb287d94 |
|
MD5 | 537314ce6c3c4466a68cd0a27060823e |
|
BLAKE2b-256 | 22809738892c7fe191ca360a536cbd4f9f8ec4e8594264a3ee5eec7f1f1848f8 |
关闭
leicacam-0.4.2-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 1fc056a7d874a7b1ac44fcb848ff497f854e4238d59cb228a7f96c15ea98431f |
|
MD5 | 6ec08b1dfd2cea08e69cc8fd981e73d7 |
|
BLAKE2b-256 | f09ce1eb5f12dcfaf82f64a01691f6238c1b53d3e27ffa733dcece8349930c10 |