c=open('2.txt','+')
i=0
while(True):
if i==0:
c=open('2.txt','+')
a=c.read()
print(a)
c.write('123')
c.close()
print('程序运行了')
i=1
要重新插拔OpenMV,或者是重启OpenMV。
电脑上,U盘里的文件才会显示出来。
@kidswong999 谢谢上面的回答,现在能写进去了,但是我调用一下函数,写进去的东西并不能换行,请问是什么原因呢
新的问题,单独发帖
@kidswong999
def write():
w=open('data_base.txt','a')
te=str(temp_L_0[0])+' '+str(temp_L_0[1])+' '+str(temp_L_0[2])+'\n'
w.write(te)
w.write('\n')
print(te)
print('\n')
w.close()
@kidswong999 怎么写进去的