joel.t.mathew
joel.t.mathew

Reputation: 124

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 *

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

i saw a similar issue here for the same version as mine - https://bugs.python.org/issue41329

where i tried to save it was c drive/documents

my python idle version is 3.8.4

Upvotes: 0

Views: 491

Answers (1)

Terry Jan Reedy
Terry Jan Reedy

Reputation: 19144

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.

Upvotes: 1

Related Questions