Last change
on this file since 120 was
74,
checked in by bas, 19 years ago
|
distro/setup.py:
- Changed for old Oscar installations
Thanks to: Robin Humble <rjh@…>
distro/examples/new_interface.py:
- Small print fix
Thanks to: Robin Humble <rjh@…>
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Id
|
File size:
583 bytes
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | # |
---|
3 | # Author: Bas van der Vlies <basv@sara.nl> |
---|
4 | # Date : 02 March 2005 |
---|
5 | # Desc. : Usage of the new PBSQuery module |
---|
6 | # |
---|
7 | # SVN info: |
---|
8 | # $Id: new_interface.py 74 2005-03-04 09:11:10Z bas $ |
---|
9 | # |
---|
10 | # |
---|
11 | # |
---|
12 | |
---|
13 | from PBSQuery import PBSQuery |
---|
14 | |
---|
15 | def main(): |
---|
16 | |
---|
17 | p = PBSQuery() |
---|
18 | |
---|
19 | nodes = p.getnodes() |
---|
20 | for name, node in nodes.items(): |
---|
21 | print node |
---|
22 | if node.is_free(): |
---|
23 | print "%s : Found an free node" %name |
---|
24 | |
---|
25 | jobs = p.getjobs() |
---|
26 | for name, job in jobs.items(): |
---|
27 | for key in job.keys(): |
---|
28 | print '%s = %s' %(key, job[key]) |
---|
29 | |
---|
30 | l = ['state', 'np' ] |
---|
31 | nodes = p.getnodes(l) |
---|
32 | for node in nodes.values(): |
---|
33 | print node |
---|
34 | |
---|
35 | main() |
---|
Note: See
TracBrowser
for help on using the repository browser.