This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Tkinter + OSX + Spaces : Multiple file dialogues created
Type: behavior Stage:
Components: macOS, Tkinter Versions: Python 3.4
process
Status: open Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: ned.deily, ronaldoussoren, rovf, serhiy.storchaka
Priority: normal Keywords:

Created on 2014-05-18 08:55 by rovf, last changed 2022-04-11 14:58 by admin.

Messages (2)
msg218736 - (view) Author: (rovf) Date: 2014-05-18 08:55
I'm running this on OSX 10.6 (SnowLeopard) with the OSX "Spaces" feature enabled (i.e. several virtual desktops).

This is my (complete) program:

from tkinter.filedialog import asksaveasfilename
pathname=asksaveasfilename(initialdir='.',title='gaga')

This has the following odd behaviours:

- The file dialogue opens, but when I switch to another space, the file dialogue is open there too, as a *separate* file dialogue. I.e., when I go back to the original space, select a file and exit the dialogue, my program continues running (for instance, when called from an interactive python shell, I get the prompt again), but on the other space, the dialogue is still open.

- I also noticed that the parameter initialdir='.' is NOT honoured, i.e. the file dialogue starts on the topmost directory.

BTW, the same behaviour is also in Python 2.6.
msg383076 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-15 16:40
asksaveasfilename is just a wrapper around the tk_getSaveFile Tk command which is implemented differently on Windows, macOS and X Window. The used widgets have very different appearance and behavior on different platforms, so there is no chance to test macOS issues on Windows or Linux. On Linux at least it honoures initialdir='.'.

In any case Tkinter just converts arguments and results of the Tk command. It does not affect the appearance and behavior. We cannot do anything to fix bugs in Tk.
History
Date User Action Args
2022-04-11 14:58:03adminsetstatus: pending -> open
github: 65720
2020-12-15 16:40:28serhiy.storchakasetstatus: open -> pending

nosy: + serhiy.storchaka
messages: + msg383076

resolution: third party
2020-11-16 20:01:42ronaldoussorensetnosy: + ronaldoussoren
components: + macOS
2014-05-18 09:17:54ned.deilysetnosy: + ned.deily
2014-05-18 08:55:40rovfcreate