[英]python IDLE 3.8.4 not saving files
today when i tried to do a problem where there was 2 userdefined functions in the script mode and when i tried to save it, the dialoque box for saving comes up and i fill in the name then press save but then the dialoque box just closes and the file still remains as * untitled *今天,当我尝试解决脚本模式下有 2 个用户定义函数的问题时,当我尝试保存它时,出现用于保存的对话框框,我填写名称然后按保存,但随后对话框框刚刚关闭并且该文件仍然保持为 * untitled *
this was the code这是代码
import csv
def addCsvFile(username,password):
f=open("user.csv","w")
newfilewriter=csv.writer(f)
newfilewriter.writerow([username,password])
f.close()
def readcsvfile():
with open("user.csv","r") as newfile:
newfilereader=csv.reader(newfile)
for row in newfilereader:
print(row[0],row[1])
newfile.close()
addCsvFile(“Arjun”,”123@456”)
addCsvFile(“Arunima”,”aru@nima”)
addCsvFile(“Frieda”,”myname@FRD”)
readcsvfile()
when i removed any one of the code for addCsvFile() or readcsvfile() and tried to save it..it got saved当我删除 addCsvFile() 或 readcsvfile() 的任何代码并尝试保存它时..它被保存了
i saw a similar issue here for the same version as mine - https://bugs.python.org/issue41329我在这里看到与我相同版本的类似问题 - https://bugs.python.org/issue41329
where i tried to save it was c drive/documents我试图保存它的地方是 c 驱动器/文件
my python idle version is 3.8.4我的 python 空闲版本是 3.8.4
As I said in my previous answer , either add import io
at the top of <pythondir>/idlelib/iomenu.py
or, if you can, upgrade to 3.8.6, which has other bugfixes both in IDLE and the rest of Python. As I said in my previous answer , either add import io
at the top of <pythondir>/idlelib/iomenu.py
or, if you can, upgrade to 3.8.6, which has other bugfixes both in IDLE and the rest of Python.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.