![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|


Public Member Functions | |
| __init__ (self, base=None) | |
| findall (self) | |
| add (self, item) | |
| add_many (self, items) | |
| sorted (self, wantdirs=False) | |
| clear (self) | |
| process_directive (self, directive) | |
Public Attributes | |
| base | |
| prefix | |
| allfiles | |
| files | |
Protected Member Functions | |
| _parse_directive (self, directive) | |
| _include_pattern (self, pattern, anchor=True, prefix=None, is_regex=False) | |
| _exclude_pattern (self, pattern, anchor=True, prefix=None, is_regex=False) | |
| _translate_pattern (self, pattern, anchor=True, prefix=None, is_regex=False) | |
| _glob_to_re (self, pattern) | |
A list of files built by exploring the filesystem and filtered by applying various patterns to what we find there.
| pip._vendor.distlib.manifest.Manifest.__init__ | ( | self, | |
base = None |
|||
| ) |
Initialise an instance. :param base: The base directory to explore under.
|
protected |
Remove strings (presumably filenames) from 'files' that match 'pattern'. Other parameters are the same as for 'include_pattern()', above. The list 'self.files' is modified in place. Return True if files are found. This API is public to allow e.g. exclusion of SCM subdirs, e.g. when packaging source distributions
|
protected |
Translate a shell-like glob pattern to a regular expression. Return a string containing the regex. Differs from 'fnmatch.translate()' in that '*' does not match "special characters" (which are platform-specific).
|
protected |
Select strings (presumably filenames) from 'self.files' that match 'pattern', a Unix-style wildcard (glob) pattern. Patterns are not quite the same as implemented by the 'fnmatch' module: '*' and '?' match non-special characters, where "special" is platform-dependent: slash on Unix; colon, slash, and backslash on DOS/Windows; and colon on Mac OS. If 'anchor' is true (the default), then the pattern match is more stringent: "*.py" will match "foo.py" but not "foo/bar.py". If 'anchor' is false, both of these will match. If 'prefix' is supplied, then only filenames starting with 'prefix' (itself a pattern) and ending with 'pattern', with anything in between them, will match. 'anchor' is ignored in this case. If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and 'pattern' is assumed to be either a string containing a regex or a regex object -- no translation is done, the regex is just compiled and used as-is. Selected strings will be added to self.files. Return True if files are found.
|
protected |
Validate a directive. :param directive: The directive to validate. :return: A tuple of action, patterns, thedir, dir_patterns
|
protected |
Translate a shell-like wildcard pattern to a compiled regular expression. Return the compiled regex. If 'is_regex' true, then 'pattern' is directly compiled to a regex (if it's a string) or just returned as-is (assumes it's a regex object).
| pip._vendor.distlib.manifest.Manifest.add | ( | self, | |
| item | |||
| ) |
Add a file to the manifest. :param item: The pathname to add. This can be relative to the base.
| pip._vendor.distlib.manifest.Manifest.add_many | ( | self, | |
| items | |||
| ) |
Add a list of files to the manifest. :param items: The pathnames to add. These can be relative to the base.
| pip._vendor.distlib.manifest.Manifest.clear | ( | self | ) |
Clear all collected files.
| pip._vendor.distlib.manifest.Manifest.findall | ( | self | ) |
Find all files under the base and set ``allfiles`` to the absolute pathnames of files found.
| pip._vendor.distlib.manifest.Manifest.process_directive | ( | self, | |
| directive | |||
| ) |
Process a directive which either adds some files from ``allfiles`` to
``files``, or removes some files from ``files``.
:param directive: The directive to process. This should be in a format
compatible with distutils ``MANIFEST.in`` files:
http://docs.python.org/distutils/sourcedist.html#commands
| pip._vendor.distlib.manifest.Manifest.sorted | ( | self, | |
wantdirs = False |
|||
| ) |
Return sorted files in directory order