source: devel/test.py @ 309

Last change on this file since 309 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
3import sys
4import pbs
5
6pbs_server = pbs.pbs_default()
7con = pbs.pbs_connect(pbs_server)
8
9print con
10
11z = pbs.new_attrl(1) 
12z[0].name = 'state'
13print z[0].name
14
15batch_info = pbs.pbs_statnode(con, "", z, "NULL")
16#print type(batch_info), batch_info, batch_info.name
17print type(batch_info), batch_info
18print 'bas'
19print type(batch_info[0])
20print batch_info[0]
21print 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
29while 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.