omero.util.import_candidates module¶
Utility method for calling the equivalent of “omero import -f”. Results are parsed when using as_dictionary.
- util.import_candidates.as_dictionary(path, readers='', extra_args=None)[source]¶
Run as_stdout, parses the output and returns a dictionary of the form:
` { some_file_in_group : [ some_file_in_group some_other_file_in_group ... last_file_in_group ], some_file_in_second_group : ... } `
you can pass more arguments to the import command through the extra_args argument in the form of a list.` to_import = as_dictionary("/my/dir/with_tifs", extra_args=["--depth", "6"]) `
will go through the directories with a depth level of 6 instead of the default 4. Arguments of interest might be: debugging, report, logback. Note that the command runs locally so options such as –exclude will not work as they need information from the server.
- util.import_candidates.as_stdout(path, readers='', extra_args=None)[source]¶
Returns the import candidates for the given path.
you can pass more arguments to the import command through the extra_args argument in the form of a list.
..code
>>> as_stdout("/my/dir/with_tifs", extra_args=["--depth", "6"])