我正在为 Internet 模块编写程序,该程序读取本地存储的文件,并将其写入我计算机上的 .txt 文件。
def write2file():
print "Listing local files ready for copying:"
listFiles()
print 'Enter name of file to copy:'
name = raw_input()
pastedFile = readAll('AT+URDFILE="' + name + '"') #Reads a local file using AT commands (not important to discuss)
print 'Enter path to file directory'
path = raw_input()
myFile = open(join(path, name),"w")
myFile.write(pastedFile)
myFile.close()
我一口气写完了整件事。问题是当产品被实现时,一次只能写入 128 个字节。
HUWWW
相关分类