tkFileDialog, askopenfiles in v2.6 question

fransstil frans.stil at gmail.com
Wed Nov 26 17:51:48 EST 2008


To select a group of files works fine in 2.5
...
    from tkFileDialog import askopenfiles

    fnames = askopenfiles(title = "Select files",
                          initialdir = "C:\\temp",
                          filetypes=[("All", "*.*")])

    for i in range(len(fnames)):
        fnames[i] = fnames[i].name
        ...
    return fnames
...

but now 2.6 strange results

- IOError: [Errno 2] No such file or directory: u'{'

- ERROR '.name'  no longer exists in 2.6

- If '.name' removed the return of 'askopenfiles' is no longer a list,
  it contains braces for some?! of the directories
  example: {C:/temp/file1.ext} {C:/temp/file2.ext} {C:/temp/file3.ext}

- askopenfilenames gives the same results

Can someone gave me a hint

Thanks in advance

Frans Stil



--------------=  Posted using GrabIt  =----------------
------=  Binary Usenet downloading made easy =---------
-=  Get GrabIt for free from http://www.shemes.com/  =-




More information about the Python-list mailing list