source: trunk/examples/pbsnodes-a.py @ 329

Last change on this file since 329 was 70, checked in by bas, 19 years ago

examples/pbsnodes-a.py:

  • it works now
  • Property svn:keywords set to Id
File size: 509 bytes
Line 
1#!/usr/bin/env python
2#
3# Author: Bas van der Vlies <basv@sara.nl>
4# Date  : 17 Aug 2001
5# Desc. : Simple pbsnodes -a
6#
7# CVS info:
8# $Id: pbsnodes-a.py 70 2005-01-28 10:19:04Z bas $
9#
10#
11#
12
13
14import pbs
15import sys
16
17def main():
18
19  pbs_server = pbs.pbs_default()
20  if not pbs_server:
21    print "No default pbs server"
22    sys.exit(1)
23
24  con = pbs.pbs_connect(pbs_server)
25  nodes = pbs.pbs_statnode(con, "", "NULL", "NULL")
26
27
28  for node in nodes:
29    print node.name
30    for attrib in node.attribs:
31      print '\t', attrib.name, '=', attrib.value
32
33main()
Note: See TracBrowser for help on using the repository browser.