本文整理汇总了Python中omero.cli.CLI.close方法的典型用法代码示例。如果您正苦于以下问题:Python CLI.close方法的具体用法?Python CLI.close怎么用?Python CLI.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类omero.cli.CLI
的用法示例。
在下文中一共展示了CLI.close方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from omero.cli import CLI [as 别名]
# 或者: from omero.cli.CLI import close [as 别名]
def main():
parser = Parser()
parser.add_login_arguments()
parser.add_argument("--orphans", action="store_true")
parser.add_argument("--unknown", action="store_true")
parser.add_argument("--search", action="store_true")
parser.add_argument("--images", action="store_true")
parser.add_argument("--copy-from", type=long, default=None)
parser.add_argument("--copy-type", default="Image")
parser.add_argument("--copy-to", type=long, default=None)
parser.add_argument("screen", nargs="?")
ns = parser.parse_args()
cli = CLI()
cli.loadplugins()
client = cli.conn(ns)
try:
query = client.sf.getQueryService()
if ns.orphans:
orphans(query)
elif ns.unknown:
unknown(query)
elif ns.search:
search = client.sf.createSearchService()
check_search(query, search)
elif not ns.screen:
stat_screens(query)
else:
if ns.copy_to:
copy(client, ns.copy_from, ns.copy_type, ns.copy_to)
else:
for x in stat_plates(query, ns.screen, ns.images):
print x
finally:
cli.close()
示例2: check
# 需要导入模块: from omero.cli import CLI [as 别名]
# 或者: from omero.cli.CLI import close [as 别名]
def check(self):
from omero.cli import CLI
from omero.gateway import BlitzGateway
cli = CLI()
cli.loadplugins()
cli.onecmd('login -q')
try:
gateway = BlitzGateway(client_obj=cli.get_client())
for experiment in self.m["experiments"]:
self.check_object(gateway, experiment, "Project")
for experiment in self.m["screens"]:
self.check_object(gateway, experiment, "Screen")
if "map" in self.m:
if self.m["experiments"]:
study_type = "Project"
else:
study_type = "Screen"
self.check_object(gateway, self.m, study_type)
finally:
if cli:
cli.close()
gateway.close()
示例3: main
# 需要导入模块: from omero.cli import CLI [as 别名]
# 或者: from omero.cli.CLI import close [as 别名]
def main():
parser = Parser()
parser.add_login_arguments()
parser.add_argument("file")
parser.add_argument("object")
ns = parser.parse_args()
cli = CLI()
cli.loadplugins()
client = cli.conn(ns)
try:
screen_metadata(client, ns.file, ns.object)
finally:
cli.close()