我有这样的下面的代码它的工作原理64位的另一台计算机,但它不与我的工作,给休耕error.I使用Python 3.3和该电源线库。 我能不能解决问题,请帮助。
import matplotlib.pyplot as plt
import binascii
import numpy
import struct
array = []
out = open('output.txt','wb')
a=int(input("Enter the first value:"))
b=int(input("Enter the second value:"))
with open("thefile.bin", "rb") as f:
i=0
for i in range(0, a):
byte = f.read(1)
i=0
for i in range(a,b):
byte = f.read(1)
value = struct.unpack('B', byte)[0]
array.append(value)
plt.plot(array)
plt.ylabel('Value')
plt.show()