Beispiel #1
0
                    setattr(obj, n, ",".join(vl))
                    if server_data_fp:
                        server_data_fp.write("%s.%s=%s\n" %
                                             (header_str, n, ",".join(vl)))

            a = a.next

        b = b.next

    pbs_disconnect(con)
    _pbs_v1.set_python_mode()
    return obj


# Allow the C implementation of hooks to call pbs_statobj function.
_pbs_v1.set_pbs_statobj(pbs_statobj)


#:------------------------------------------------------------------------
#                       JOB TYPE
#:-------------------------------------------------------------------------
class _job(object):
    """
    This represents a PBS job.
    """

    attributes = PbsReadOnlyDescriptor('attributes', {})
    _attributes_hook_set = {}

    def __new__(cls, value, connect_server=None):
        return object.__new__(cls, value)
Beispiel #2
0
                        vl=[vo, v]
                        setattr(obj, n, ",".join(vl))
                        if server_data_fp:
                            server_data_fp.write("%s.%s=%s\n" % (header_str, n, ",".join(vl)))

                a=a.next
  
            b=b.next

        pbs_disconnect(con)
        _pbs_v1.set_python_mode()
        return obj 


# Allow the C implementation of hooks to call pbs_statobj function.
_pbs_v1.set_pbs_statobj(pbs_statobj)

#:------------------------------------------------------------------------
#                       JOB TYPE
#:-------------------------------------------------------------------------
class _job(object):
    """
    This represents a PBS job.
    """

    attributes = PbsReadOnlyDescriptor('attributes', {})
    _attributes_hook_set = {}

    def __new__(cls,value,connect_server=None):
        return object.__new__(cls, value)