使用Python捕获敏捷范围的屏幕截图
我正在尝试捕获Python敏捷范围的屏幕截图,但是使用Read_Raw给我一个问题“打印取消”,请帮助您
`import pyvisa as visa
import sys
#
# Example VISA address for a USB connection:
VISA_ADDRESS = 'USB0::0x2A8D::0x1797::CN57046145::0::INSTR'
# Define VISA Resource Manager
scope = visa.ResourceManager('C:\\Windows\\System32\\visa32.dll')
scope.read_termination = '\n'
scope.write_termination = '\n' #or = '\r'
print (scope.query('*IDN?\n'))
scope.write('SAVE:IMAG:FILEF PNG')
scope.write(':HARDcopy: STARt')
raw_data = scope.read_raw ()
f= open ('Shot.png' 'wb')
f.write (raw_data)
f.close `
I'm trying to to capture a screenshot of an Agilent scope in python but using read_raw give me an issue “print cancel” can you please help
`import pyvisa as visa
import sys
#
# Example VISA address for a USB connection:
VISA_ADDRESS = 'USB0::0x2A8D::0x1797::CN57046145::0::INSTR'
# Define VISA Resource Manager
scope = visa.ResourceManager('C:\\Windows\\System32\\visa32.dll')
scope.read_termination = '\n'
scope.write_termination = '\n' #or = '\r'
print (scope.query('*IDN?\n'))
scope.write('SAVE:IMAG:FILEF PNG')
scope.write(':HARDcopy: STARt')
raw_data = scope.read_raw ()
f= open ('Shot.png' 'wb')
f.write (raw_data)
f.close `
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)