Add a filter for the extension of a file in the file browser
Unfortunately this isnt documented, however it is used in the templates that come with blender, see Text -&gt; Templates -&gt; Python -&gt; Operator File Export, there is a filter_glob string property.

eg:

filter_glob = StringProperty(
        default="*.txt;*;*.py",
        options={'HIDDEN'},
        )