Please I am not looking for this. How do I copy a file in Python? I got this file to save but I don't know how to go about it. With the code below I am able to save the text in the data variable. How can I code it so that the data variable points to a document in my directory which I'd like to re-save in another selected location?
a = QFileDialog.getSaveFileName(MainWindow, "Save results", os.getenv("HOME"), "Save pdf(*.pdf);;Save csv(*.csv);;Save excel(*.xlsx);;Save text(*.txt)")
name = open(a[0],'w')
data = "This is my text"
name.write(data)
name.close()