FAQ
I switched from Mark Hammonds pywin32 extensions for file choosers as the
multiselect there seems to crash on me when selecting more than a few dozen.
Using Tk now. Works well but the resulting string passed back seems to
'decorated' when the files are on local disk and not decorated when
retrieved over a USB interface from an external disk?

I do this:
From local disk I get back:
'{file1.bin} {file2.bin}'
From external disk I get back:
'file1.bin file2.bin'

I can handle/parse both, not an issue but it raises the question: Are these
the only two possibilities? Is it the same across platforms (I use Python
2.7 on Win Vista)?

See code below.

Thanks for the insight!
Alex van der Spek
+++++++++++++++++++

from Tkinter import *
import tkFileDialog as tkf

tkroot=Tk()
tkroot.withdraw()

initdir=os.environ['HOME']
filetype=[('Binary Timeseries','*.bin'),('All files','*.*')]
filenames=tkf.askopenfilenames(parent=tkroot,initialdir=initdir,filetypes=filetype)
tkroot.destroy()

Search Discussions

  • Gabriel Genellina at May 24, 2011 at 12:41 am
    En Mon, 23 May 2011 10:00:53 -0300, Alex van der Spek <zdoor at xs4all.nl>
    escribi?:
    I switched from Mark Hammonds pywin32 extensions for file choosers as
    the multiselect there seems to crash on me when selecting more than a
    few dozen. Using Tk now. Works well but the resulting string passed back
    seems to 'decorated' when the files are on local disk and not decorated
    when retrieved over a USB interface from an external disk?

    I do this:
    From local disk I get back:
    '{file1.bin} {file2.bin}'
    From external disk I get back:
    'file1.bin file2.bin'

    I can handle/parse both, not an issue but it raises the question: Are
    these the only two possibilities? Is it the same across platforms (I use
    Python 2.7 on Win Vista)?
    An old bug. See http://bugs.python.org/issue5712 for a workaround.

    --
    Gabriel Genellina

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMay 23, '11 at 1:00p
activeMay 24, '11 at 12:41a
posts2
users2
websitepython.org

People

Translate

site design / logo © 2022 Grokbase