我正试图从镜下捕获输出。
我尝试使用:
output=subprocess.getoutput('[picoscope /a Measurements.CSV?]')
没有运气。
import subprocess
output = subprocess.check_output(['picoscope' , '/a' ,'Measurements.CSV?'])
print(output)
获取内存错误:
File "C:\Python\Python37-32\lib\subprocess.py", line 926, in communicate
stdout = self.stdout.read()
MemoryError
预期结果:
['RisingEdgeCount(A):0', 'RisingEdgeCount(B):0', 'Maximum(A):1.114mV', 'Maximum(B):677.5\\xb5V', 'PeakToPeak(A):2.673mV', 'PeakToPeak(B):1.794mV', 'MaskFailures(A):0', 'MaskFailures(B):0', 'Frequency(A):9.43kHz', 'Frequency(B):48.68Hz']
{RisingEdgeCount(A):0,RisingEdgeCount(B):0,Maximum(A):1.114mV,Maximum(B):677.5uV,PeakToPeak(A):2.673mV,PeakToPeak(B):1.794mV,MaskFailures(A):0,MaskFailures(B):0,Frequency(A):9.43kHz,Frequency(B):48.68Hz}
实际:内存不足问题