MCPcopy Index your code
hub / github.com/python/cpython / _fixresult

Method _fixresult

Lib/tkinter/filedialog.py:313–326  ·  view source on GitHub ↗
(self, widget, result)

Source from the content-addressed store, hash-verified

311 pass
312
313 def _fixresult(self, widget, result):
314 if result:
315 # keep directory and filename until next time
316 # convert Tcl path objects to strings
317 try:
318 result = result.string
319 except AttributeError:
320 # it already is a string
321 pass
322 path, file = os.path.split(result)
323 self.options["initialdir"] = path
324 self.options["initialfile"] = file
325 self.filename = result # compatibility
326 return result
327
328
329#

Callers

nothing calls this directly

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected