Reputation: 1
Im trying to make a txt file creator using appjar.saveBox, but if the user sets a custom filename it cannot be grabbed. I want to grab the filename, so there can be content inside of the file.
Here's the code i tried:
def pressing(button):
if button == "Create .txt file":
app2.saveBox(title="File creator", fileName="", dirName="", fileExt=".txt", fileTypes="", asFile=True, parent=None)
app2.addButtons(["Create .txt file"], pressing)
Tried also making the .saveBox a variable, but all the output that came out was only
<_io.TextIOWrapper name='/directory/file.txt' mode='w' encoding='UTF-8'>
But, i want only the directory and filename.
Upvotes: 0
Views: 71