On Thu, Nov 19, 2015 at 12:06 AM, Ulli Horlacher <frams...@rus.uni-stuttgart.de> wrote: >> The limitation is that this will not work if any of the file names >> contain astral (non-BMP) chars because tk cannot handle such characters. > > What are "astral chars"?
Characters not on the Basic Multilingual Plane (BMP). The Unicode character set is divided into a number of planes of 65,536 codepoints each, with the most commonly used ones on the first plane, the BMP. A lot of programs either cannot use non-BMP characters or have problems with them; for instance, anything that uses UTF-16 as its internal representation (ECMAScript, notably; also Python 2 on Windows) sees astral characters as pairs of code points. > In my application the user MUST select files and directories (in one go). It's extremely uncommon to be able to select a combination of files and directories. The UI for this would be quite annoying, I think. You may find it easier to have your own wrapper; for example, have a list of selected files/directories, with buttons "Add File" and "Add Directory" underneath. The former would use askopenfilenames (despite the singular in the button name), and the latter would use askdirectory. Trying to do both at once would be hard. ChrisA -- https://mail.python.org/mailman/listinfo/python-list