list_sessions
list_sessions#
- qx_utilities.general.utilities.list_sessions(batchfile=None, sessions=None, filter=None, sessionsfolder=None)#
list_sessions [batchfile=None] [sessions=None] [filter=None] [sessionsfolder=None]Print the comma separated list of the sessions a command would run over.
Parameters
- --batchfile (str):
Path to a batch.txt file.
- --sessions (str):
A string with pipe | or comma separated list of sessions (sessions ids) to be processed; glob patterns (*, ?, [abc]) may be used, e.g. "AP128,OP139,ER*". A *.list file with a list of session ids may be given instead. If a batchfile is provided, this parameter selects within it.
- --filter (str):
An optional parameter given as a string of <key>:<value> pairs joined by | (OR) or by & (AND) — one operator at a time. Only the sessions the filter selects are returned. Values may be glob patterns.
- --sessionsfolder (str):
The sessions folder to match the sessions against when no batchfile is provided.
Notes
The three parameters are resolved exactly as they are for any other command, so this is what any command given the same parameters will run over. Inside a SLURM job array that is the subset belonging to this array task, which is what the get_sessions_for_slurm_array spelling of this command was for.
