subprocess.check_output在执行picoscope命令时给出内存错误

时间:2019-05-13 13:42:11

标签: python-3.x

我正试图从镜下捕获输出。

我尝试使用:

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}

实际:内存不足问题

0 个答案:

没有答案