pymt.utils package¶
Submodules¶
pymt.utils.prefix module¶
-
pymt.utils.prefix.names_with_prefix(names, prefix)[source]¶ Find names that begin with a common prefix. In this case, names are a series
.-separated words, much like module names.Returns a
listof all names that begin with prefix. The order of matched names is maintained.>>> names_with_prefix(['foo.bar', 'foobar.baz'], 'foo') ['foo.bar'] >>> names_with_prefix(['foo.bar', 'foo.bar', 'foo.foo'], 'foo') ['foo.bar', 'foo.foo']