Open topic with navigation
<viz:res>.addPublishFilter
Add filter that excludes files from publish dependency list
<viz:res>.addPublishFilter( |
|
filter |
) |
|
filter
A pattern string or callback function for filtering files. All filenames that match the pattern string will be excluded from the published EXE.
If a callback function is specified, then the callback function will be passed a filename and the function should return True if the file should be filtered out (excluded) or False if the file should be included.
Remarks
This command allows you to specify a filter for excluding certain files from the publish dependency list. The filter will be applied after the script exits and all dependencies have been determined.
Return Value
None
Example
# Exclude all files containing .svn
viz.res.addPublishFilter('*.svn*')
# Create callback equivalent to above filter
def myfilter(filename):
return '.svn' in filename
viz.res.addPublishFilter(myfilter)
See also