[wxPython-users] wildcards for file dialogs

Josiah Carlson jcarlson at uci.edu
Mon Sep 4 01:21:57 PDT 2006


Christian Meesters <meesters at uni-mainz.de> wrote:
> 
> Hi,
> 
> Just two question on file dialogs:
> - Say I'd like to display files matching *.py and *.pyc at the same time in a 
> file dialog. Can a wildcard be modified to accomplish that?

"All python files (*.py *.pyw)|*.py;*.pyw"

You Probably don't want to transfer .pyc ever, as they are regenerated
on the first run of your Python program.  Tou can swap replace the pyws
in the above with pyc to display them, but that's probably not what you
*really* want.


> - And (a similar question): How can a file dialog be enforced to ignore the 
> case of a file suffix? (e.g. the wildcard should match *.py and *.PY at the 
> same time) I am transferring files from a windows machine to my linux 
> platform on a regular basis and the files usually ending in upper case are 
> changed to lower case if manipulated - and this matters on linux, of course.

I'm surprised you run into that problem at all.  Generally speaking,
transferring from Windows -> Linux should give you lowercase file names
unless you have specifically created a Windows filename with caps.

 - Josiah





More information about the wxpython-users mailing list