wiki:TorqueUsage/DataTypes/Batch_status

Version 1 (modified by bas, 18 years ago) (diff)

--

Batch_status data type

Batch_status is a structure which is defined in pbs_ifl.h as:

struct batch_status {
        struct batch_status *next;
        char                *name;
        struct attrl        *attribs;
        char                *text;
};

Python Usage

This type is mostly use as return type. Here is an example how to use it:

nodes = pbs.pbs_statnode(c, "", "NULL", "NULL")
for node in nodes:
   print node.name
   for attrib in node.attribs:
     print '%s = %s' %(attrib.name, attrib.value)

Note: That the next pointer definition is not used in the Python code. The module will automatically convert a C linked list to a Python list a vice versa