79826816

Date: 2025-11-21 17:42:56
Score: 0.5
Natty:
Report link

define a File class and make getFile a method.

class File:
    def __init__(self):
        self.filename=None
    def getFile(self):
        self.filename=filedialog.askopenfilename()

file = File()

then command=file.getFile

Now file.filename should contain the return value of askopenfilename

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Kshitijthegreat