Last change
on this file since 319 was
309,
checked in by bas, 9 years ago
|
Checkin the pbs swig development files
|
-
Property svn:executable set to
*
|
File size:
740 bytes
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
3 | import sys |
---|
4 | import pbs |
---|
5 | |
---|
6 | pbs_server = pbs.pbs_default() |
---|
7 | con = pbs.pbs_connect(pbs_server) |
---|
8 | |
---|
9 | print con |
---|
10 | |
---|
11 | z = pbs.new_attrl(1) |
---|
12 | z[0].name = 'state' |
---|
13 | print z[0].name |
---|
14 | |
---|
15 | batch_info = pbs.pbs_statnode(con, "", z, "NULL") |
---|
16 | #print type(batch_info), batch_info, batch_info.name |
---|
17 | print type(batch_info), batch_info |
---|
18 | print 'bas' |
---|
19 | print type(batch_info[0]) |
---|
20 | print batch_info[0] |
---|
21 | print batch_info[0].name |
---|
22 | |
---|
23 | #b = pbs.batch_statusPtr(batch_info[0]) |
---|
24 | #print type(b) |
---|
25 | #print b |
---|
26 | #print b.name |
---|
27 | #sys.exit(1) |
---|
28 | |
---|
29 | while batch_info.this: |
---|
30 | node_attr = batch_info.attribs |
---|
31 | print batch_info.name, ':' |
---|
32 | while node_attr.this: |
---|
33 | # print node_attr.this |
---|
34 | print '\t', node_attr.name ,node_attr.value |
---|
35 | node_attr = node_attr.next |
---|
36 | |
---|
37 | batch_info = batch_info.next |
---|
Note: See
TracBrowser
for help on using the repository browser.