diff options
Diffstat (limited to 'plugins/warp/api/python')
| -rw-r--r-- | plugins/warp/api/python/warp.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/warp/api/python/warp.py b/plugins/warp/api/python/warp.py index 866d179b..fc487a4d 100644 --- a/plugins/warp/api/python/warp.py +++ b/plugins/warp/api/python/warp.py @@ -350,6 +350,13 @@ class WarpContainer(metaclass=_WarpContainerMetaclass): warpcore.BNWARPFreeContainerList(containers, count.value) return result + @staticmethod + def by_name(name: str) -> Optional['WarpContainer']: + for container in WarpContainer: + if container.name == name: + return container + return None + @property def name(self) -> str: return warpcore.BNWARPContainerGetName(self.handle) |
