Last change
on this file since 356 was
356,
checked in by martijk, 6 years ago
|
python3 compatible print #26732
|
-
Property svn:keywords set to
Id
|
File size:
512 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 356 2018-04-11 11:57:42Z martijk $ |
---|
9 | # |
---|
10 | # |
---|
11 | # |
---|
12 | |
---|
13 | |
---|
14 | import pbs |
---|
15 | import sys |
---|
16 | |
---|
17 | def 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 | |
---|
33 | main() |
---|
Note: See
TracBrowser
for help on using the repository browser.