The purpose of the code is to put the output into a text file the problem i have is it says i have a syntax error and would like to know what i am missing
def save():
with open(os.path.join('C:\Users\test\Documents\test', 'directory.txt','w+'))#syntax error in this line
directoryScan.write(outPut) #file
directoryScan.close()
the w+ is used for - if the file does not exist create a .txt file and insert the output there