Index: /tags/4.6.0/AUTHORS
===================================================================
--- /tags/4.6.0/AUTHORS	(revision 342)
+++ /tags/4.6.0/AUTHORS	(revision 342)
@@ -0,0 +1,22 @@
+Author:
+    Bas van der Vlies <bas.vandervlies@surfsara.nl>
+
+Configure and Debian package support: 
+    Yaroslav Halchenko
+
+PBSQuery module:
+    Bas van der Vlies
+
+Contributors:
+    Ramon Bastiaans
+    Roy Dragseth (PBSQuery)
+    Walter de Jong
+    Shunjie Lau
+    Martin Pels 
+    Dennis Stam
+    Jens Timmerman
+    Mark Roberts 
+    Mattias Slabanja
+    Willem Vermin
+    Stijn de Weirdt
+    Sil Westerveld
Index: /tags/4.6.0/CHANGES
===================================================================
--- /tags/4.6.0/CHANGES	(revision 342)
+++ /tags/4.6.0/CHANGES	(revision 342)
@@ -0,0 +1,768 @@
+=========== 4.6.0
+ * Added support for torque version 5.x. Note: the rm interface does not work for me on debian wheezy.
+   Author: Bas van der Vlies
+
+ * PBSQuery had been update to new cpuid range for torque 5
+   Author: stijnd : deweirdt add ugent dot be 
+   Applied by : Bas van der Vlies
+
+=========== 4.5.0
+ * new_rack_pbsmon.py: Added option -j/--job. It will show the nodes that are used by the specified job
+ Author: Dennis Stam
+
+ * JobscriptParser.py: Added a new usefull script which parses the jobscript and returns the attropl as datastructure
+ Author: Dennis Stam
+  
+
+=========== 4.4.1
+ * new_rack_pbsmon.py: Added option -p/--property to filter on torque node properties. It will show
+   the nodes that meet the property request with a capital M on a non-color terminal and in green on
+   color terminals.
+ Requested by: Willem Vermin and Wim Rijks
+ Author: Dennis Stam
+
+ * Fixed docdir bug in configure.in and Makefile.in, closes #39
+ Author: Dennis Stam
+
+=========== 4.4.0
+ * Drop support for versions older then 2.4
+ Author: Bas van der Vlies
+
+ * Added support for torque version >= 4.2
+ Author: Bas van der Vlies
+
+ * rewrote setup.py.in
+ Inspired by: stijn dot deweirdt at ugent dot be
+ Author: Bas van der Vlies
+
+ * docdir is now configurable, closes #37
+ Author: jens dot timmerman add ugent dot be
+ Applied by: Bas van der Vlies
+
+ * The swig development environment to generate the pbs_python package
+   is now available at:
+    - svn co https://oss.trac.surfsara.nl/pbs_python/svn/devel
+
+=========== 4.3.7
+ * pbs_jobmonitor/pbs_joblogin ported to torque 2.5 to fix jobarrays
+  Author: Willem Vermin (SURFsara)
+  Applied by: Bas van der Vlies
+  
+=========== 4.3.6
+ * Modified sara_nodes.py and new_rack_pbsmon.py so:
+   - We using argparse instead of OptionParser
+   - Changed the print statement to an print function which will work with Python 2.5+
+   - Removed module PBSAdvancedParser.py
+   Author: Dennis Stam
+
+=========== 4.3.5
+ * PBSQuery bugfix, parsing of node status line with multiple EVENT: settings
+   was wrong
+   Author: Bas van der Vlies
+
+ * Added an example how to make use of the EVENT status message:
+    - examples/pbs_script.sh
+   Author: Bas van der Vlies
+
+ * implemented __nonzero__ for PBS dictionary, closes #33, eg:
+    status = getjob(id)
+    if status:
+        do something
+    else:
+        no job
+  Author: Bas van der Vlies
+
+ * PBSQuery bugfix. getjob() can now handle short jobname, eg: 
+    * p.getjob('6073545') 
+
+   Author: Willem Vermin (SARA) & Bas van der Vlies 
+
+ * added an example: pbs_jobmonitor shows the output of top 
+   -u user on the node
+    - one cycle of top
+    - user: the user the job belongs to
+
+   renamed as pbs_joblogin logs in to the node as the user 
+   who invokes this script (os.getenv('USER'))
+
+   Author: Willem Vermin (SARA)
+  
+=========== 4.3.3
+ * New generated files for pbs_wrap.c and pbs.py to support python 3.X versions
+   Reported by: Steve Traylen <steve dot traylen add cern dot ch>
+   Author: Bas van der Vlies 
+
+ * Fixed AdvancedParser when using 01-12 range the zero was not appended.
+   Reported by: Ramon Bastiaans
+   Author: Dennis Stam
+
+ * examples/sara_nodes.py: Catch the PBSQuery error if we can not make a 
+   connection with the batch server and exit the program.
+   Author: Bas van der Vlies 
+
+ * Remove the debian dependency on AdvancedParser. We now have
+   our own PBSAdvanceParser so it does not conflict with other SARA
+   packages.
+   Reported by: Ramon Bastiaans (SARA)
+   Fixed by: Bas van der Vlies
+
+ * Make pbs_torque only dependend on libtorque instead of torque and adjusted 
+   the maintainer of the package, closes #30
+   Reported by: Guillermo Marcus  <guillermo dot marcus add@gmail dot com>
+   Fixed by: Bas van der Vlies
+   
+=========== 4.3.0
+ * new_rack_pbsmon.py: For backward compatibility added -a/--all option. 
+   Has the same functionality as -s/--summary
+   Author: Bas van der Vlies
+
+ * Added some license info to debian package and include GPL and LGPL 3.0
+   files.
+   Suggested by: W. Trevor King <wking at drexel dot edu>
+
+ * PBSQuery.py: Added support for new feature in node status field:
+    * message=EVENT:<key=value:>+
+    * message=ERROR <text>
+
+  Added the following syntax for node:
+  	* node['error']
+    * node['event']
+
+  eg: node: n1
+    state = free
+    np = 8
+    properties = ib,switch1,highmem
+    ntype = cluster
+    jobs = 0/567403.sara.nl, 1/567403.sara.nl
+    status = ..,loadave=0.00,message=EVENT:sample.time=1288864220.003:cputotals.user=0:iconnect.pktout=0,netload=3487600394,state=free,...
+
+  example code:
+  	p = PBSQuery()
+    node = p.getnode(n1)
+    print node.event['sample.time']
+    print node['event']['sample.time']
+
+   Requested by: Roy Dragseth <roy dot dragseth add uit dotno>
+   Author: Bas van der Vlies
+
+=========== 4.2.0
+ * Updated LICENSE file to LGPLV3. Thanks to Justin Bronder 
+   (jsbronder add gentoo dot org) for the information and
+   explanation.
+
+ * examples/pbsmon.py. Patched so it also works for torque 2.5
+   Author: Stijn De Weirdt stijn dot deweirdt at ugent dot be
+   Applied by: Bas van der Vlies
+
+ * setup.py.in changed determine which torque version is installed
+   so we also support snapshots.
+   Author: Mark Roberts ( mark at gingergeeks dot co dot uk)
+   Applied by: Bas van der Vlies
+
+ * PBSQuery:
+   - get_nodes function for jobs now works for old and new datastructure and
+     gives correct results if unique=True
+     Reported by + idea for patch: Shunjie Lau (eijnuhs add gmail dot com)
+     Author: Bas van der Vlies
+
+ * Added AdvanceParser module. new_rack_pbsmon.py and sara_nodes.py make use of
+   this module
+   Author: Dennis Stam (Dennis dot Stam at sara dot nl)
+
+ * examples/new_rack_pbsmon.py:
+     - Better specification for node expression
+     - added a new option -l/--list to list the state of a nodes and which job 
+       is running on it, eg:
+             new_rack_pbsmon.py - l gb-r[1-3]n[3-6] gb-r4[n1-20]
+
+   Authors: Dennis Stam & Bas van der Vlies 
+   Applied by: Bas van der Vlies
+
+ * examples/sara_nodes.py:
+   An utility to set/clear notes for multiple nodes, see ..
+   Author: Dennis Stam (Dennis dot Stam at sara dot nl)
+
+ * setup.py.in:
+   Added support for runtime-libraries when torque is installed in a non-default
+   location, closes #22
+   Author: Mattias (slabanja at chalmers dot se)
+   Applied by: Bas van der Vlies
+
+ * Changed build system for debian
+   Authors: Dennis Stam & Bas van der Vlies 
+
+=========== 4.1.2
+ * examples/new_rack_pbsmon.py now uses the new PBSQuery data 
+   structure.
+   Author: Bas van der Vlies
+
+ * PBSQuery:
+     - fixed and error in get_jobs function for nodes. Did not
+       support new data structure and uniq did not work.
+       Authors: Shunjie Lau <eijnuhs at gmail dot com> and Bas van der Vlies
+
+=========== 4.1.0
+ * Delete function pbs.version() replaced by
+    * pbs.version 
+        This is a string variable
+    * pbs.version_info
+        Is a tuple variable. So we can use it in scripts
+
+   This analogue with sys module, closes #20
+
+   Requested by: Dennis Stam ( Dennis dot Stam add sara dot nl )
+   Author: Bas van der Vlies
+
+ * More robust make/configure/setup.py
+   Reported by: 
+   	- Saidi, Yacine <saidi add linmpi dot mpg dot de> 
+	- Shunjie Lau <eijnuhs add gmail dot com> 
+   Author: Bas van der Vlies
+
+
+ * Only use the pbs_wrap.c and pbs.py 2.4 version for torque version 2.4.7 and higher. 
+   Reported by: Saidi, Yacine <saidi add linmpi dot mpg dot de> 
+   Author: Bas van der Vlies
+   
+=========== 4.0.2
+  * Quick fix so we do not get any undefined symbols. Forgot to
+    add the torque library when we compile the package.
+    Reported by: Shunjie Lau ( eijnuhs add gmail dot com)
+    Author: Bas van der Vlies
+
+=========== 4.0.1
+  * Fixed a bug in setting the right library path  for compiling.
+    Reported by: Chad Vizino ( vizino add psc dot edu )
+    Author: Bas van der Vlies
+   
+=========== 4.0.0
+  * pbs.py added some new functions for 2.4 version:
+    - pbs_fbserver(void);
+    - pbs_get_server_list(void);
+    - pbs_sigjobasync(int connect, char *job_id, char *signal, char *extend);
+    - pbs_alterjob_async(int connect, char *job_id, struct attrl *ATTRL, char *extend);
+    - pbs_checkpointjob(int connect, char *job_id, char *extend);
+    - log_ext(int,char *,char *,int);
+    - log_init(char *, char *);
+    - log_remove_old(char *,unsigned long);
+
+    Note: version 2.1.X is still supported
+
+  * autotools environment
+    - Added support for finding pbs-config (borrowed for mpiexec source)
+    - Detecting which version of torque is installed
+    - only support installations that have pbs-config installed. 
+    - Removed old code for installations that do not a have pbs-config
+      installed.
+
+  * PBSQuery.py
+    - There was a bug in the new data interface (Resource_List for jobs)
+      Reported & Patch by: Mark Roberts ( mark at gingergeeks dot co dot uk)
+      Applied by with some minor changes: Bas van der Vlies
+
+    - The new data structure is the default. You can switch back to the old
+      one with:
+            p = PBSQuery()
+	    p.old_data_structure()
+
+      Author: Bas van der Vlies
+
+   * examples/ha_server.py
+     An example how to use the High Availabilty torque functions
+     Author: Bas van der Vlies & Mark Roberts ( mark at gingergeeks dot co dot uk )
+
+=========== 3.6.0
+  * pbs, new generated pbs_wrap.c, pbs.py fixes a bug in pbs_runjob()
+    Reported by: Dennis Stam
+    Fixed by: Bas van der Vlies 
+
+=========== 3.5.0
+  * PBSQuery
+        The class functions of node, job and queue support old and new data
+        structure.
+
+        Changed the behaviour of the new data stucture, We can use it as
+        dictionary and as class attribute, this is equivalent, eg:
+          - print node['np'] and print node.np
+
+        for a node we parse the 'status' line and split on '=' char, You now can
+        use these statements, eg
+          - print node.status.arch     (node['status'].arch or node['status']['arch'])
+          - print node.status.nsession
+
+        for a job we parse the 'Variable_List' line and split on '=' char, You now can
+        use the statements, eg:
+          - print job.Variable_List.PBS_O_WORKDIR
+          - print job.Variable_List.PBS_O_HOME
+
+	For more info see examples/new_interface.py
+
+    Author: Bas van der Vlies
+
+ * new_rack_pbsmon.py
+        Rewrite to new data structure and automatically determine how many nodes
+        and racks cluster has and skip printing of empty racks (default), use -w/--wide
+        for old behaviour.
+
+   Author: Bas van der Vlies
+
+
+=========== 3.2.0
+	- PBSQuery:
+	  New data structure. In the old structure it is a dictionary
+	  with a value and the value is a string. This is changed
+	  that dictionary values are now of type list or dictionary depends
+	  on the value of the keyword, eg for a node:
+	    - np = 2:
+	      * node['np'] = [ '2' ]  
+
+	    - properties = cores2, mem4gb, parallel 
+	      * node['properties'] = [ 'cores2', 'mem4gb', 'parallel' ]
+
+	    - status = arch=x86_64,sessions=22599,,size=70627864kb, ...
+	      * node['status']['arch'] = [ 'x86_64' ]
+	      * node['status']['sessions'] = [ '222599' ]
+	      * ...
+
+	 The data structure is activated by the function:
+	  * new_data_structure()
+
+        In a future release it will be come the default.
+	example:
+		p = PBSQuery()
+		p.new_data_structure()
+
+		nodes = p.getnodes()
+		print nodes.np, nodes['np']
+
+	Author: Bas van der Vlies
+
+	- PBSQuery
+	  For old and new data structure we now can use another syntax:
+	   * node['np'] and node.np are equivalent
+
+	  This new syntax works for all keywords.
+
+	Author: Bas van der Vlies
+
+	- Added iter object for job, node, queue and server objects, eg:
+	  node = p.getnode('gb-r1n1')
+	  print node.name
+	  for attrib in node:
+	  	print '%\t%s = %s' %(attrib, node[attrib]) 
+	Author: Bas van der Vlies
+
+	- fixed an error in getnode, getqueue and getjob, return empty
+	  dictionary if not found
+	Author: Bas van der Vlies
+	
+	- New build system for rpm packages, make -f Makefile.rpm
+	  Author: Michel Jouvin <jouvin add lal dot in2p3 dot fr>
+
+        Applied: Bas van der Vlies
+
+=========== 3.0.1
+	- PBSQuery
+		* Removed a testing code line
+		Reported By: sam @ vpac dot org
+		Fixed by: Bas van der Vlies
+
+=========== 3.0.0
+	- PBSQuery
+		* Cleaned up some old lines of code which didn't do anything.
+		* Changed the returnvalue of getqueue, getnode and getjob. Now
+		  they return an instance of the object, instead of a dict.
+		  This is API change so we bumped the version to 3.0.0
+		* Now the getnode-function accepts the short name as well as
+		  the long name as an argument.
+
+		Author: Sil Westerveld <Sil.Westerveld@sara.nl>
+
+	- pbs.py, _pbs.so, PBSQuery.py
+		* Fixed a memory leak when used in daemon mode
+		Author: Bas van der Vlies <basv@sara.nl>
+
+=========== 2.9.8 
+	- pbs_python.spec file patch added libdir and python defines so it 
+	  will build for RHEL5.1/CentOS 5.1
+	  by        : Michael Sternberg <sternberg add anl dot gov>
+	  applied by: Bas van der Vlies
+
+	- Updated the header files for pbs_python. So it can use some new 
+	  defines variables/defines, eg:
+		* ATTR_NODE_status
+		* ATTR_NODE_note
+		* ...
+	  Added by: Dennis Stam <dennis.stam@sara.nl>, Bas van der Vlies
+
+	- Two new functions to log.h:
+		log_roll(int size);
+		log_size(void);
+	  Added by: Bas van der Vlies
+
+	- We now have proper destructors (free memory) in SWIG for attrl and 
+	  attropl attributes.
+	  Added by: Bas van der Vlies
+
+	- PBSQuery
+		* Added getnodes_with_property() function. This will get all nodes with
+		  a certain property, eg:
+		   - get all nodes with property 'cores8' and return all attributes:
+		      getnodes_with_property('cores8')
+		
+		   - get all nodes with property 'cores2' and only return the 
+		     attributes 'state' and 'properties':
+		      attrl = [ 'state', 'properties' ]
+		      getnodes_with_property('cores2', attrl)
+		
+		     Only for torque version > 2.1.0 
+	     
+		Added by: Bas van der Vlies
+
+		* Added to class node the function
+		 - get_jobs(self, unique=None)
+		   Returns a list of the currently running job-id('s) on the node.
+		Added by: Sil Westerveld <Sil.Westerveld@sara.nl>
+
+		* Added get_server_name() function.
+		  This will return the PBS-server's name.
+		Added by: Sil Westerveld <Sil.Westerveld@sara.nl>
+
+		* Added to class _PBSobject the function
+		  - uniq(self, list)
+		    Filters out unique items of a list.
+		Added by: Sil Westerveld <Sil.Westerveld@sara.nl>
+
+		* Added to class job the function
+		  - get_nodes(self, unique=None)
+		    Returns a list of the nodes which run the job.
+		Added by: Sil Westerveld <Sil.Westerveld@sara.nl>
+
+=========== Version 2.9.4
+	-  Function pbs.pbs_geterrmsg does not exits any more is
+	   replaced by pbs.error():
+                errno, text = pbs.error()
+		print errno, text
+	   Reported by: pk at q-leap dot com
+	   Fixed by   : Bas van der Vlies
+
+	- PBSQuery.py
+	   * Added get_version() for server class, returns the version of 
+	     the batch server
+	     Added by    : Bas van der Vlies
+
+	   * Added get_nodes() for job class, returns a list of nodes on 
+	     which the job is run
+	     Added by    : Bas van der Vlies
+
+	   * PBSQuery.py rewrite make use of UserDict module.
+	     Suggested by: Ramon Bastiaans
+	     Fixed by    : Bas van der Vlies
+
+=========== Version 2.9.2
+	- The function pbs_rescquery() did not work. Fixed it
+	- The function avail(), did not work fixed it
+	- The functions pbs_rescreserve and pbs_rescrelease did not work
+	  fixed it
+
+	- Fixed a bug in new_rack_pbsmon.py. Counting of serial
+	  nodes was wrong and state down has topmost priority
+
+=========== Version 2.9.0
+	- Added support for new torque build system 2.1.0
+	- Added new_rack_pbsmon.py
+	  Authors: Walter de Jong & Bas van der Vlies
+
+=========== Version 2.8.2
+
+Configure has a new option:
+	--with-pbsdir=PATH
+
+If set it will use PATH specified as argument to
+find the pbs/torque libraries. If unset it will use
+some useful defaults to find the libaries.
+Suggested by: Troy Baer
+
+PBSQuery.py:
+	- If we can not make a connection with the server
+	  then raise an exception and let the programmer 
+	  decides what to do.
+
+pbs_python.spec:
+	- It can now handle mode bits
+	  Author: Martin Pels from SARA
+        
+=========== Version 2.8.0
+
+setup.py:
+	- Added /usr/lib to PBS_LIB_DIR
+
+pbs.py:
+	- Added new function "pbs.error()". This function checks if 
+	  an error has occured with a pbs function, eg:
+	    task_id = pbs.pbs_submit(c, attrl, "A.tsk", 'NULL', 'NULL')
+	    error_number, err_txt = pbs.error()
+	    if error_number:
+	   	print error_number, err_txt
+
+          prints the following message if script A.tsk does not exists:
+	    15042 (qsub) cannot access script file
+
+pbs_python.spec:
+	- to make rpm packages from the source package, initial version
+	Author: Martin Pels from SARA
+
+README:
+	- Now requires python 2.1 and higher
+	- Explain how to build DEBIAN package
+
+=========== Version 2.7.10
+
+PBSQuery.py:
+	Fixed an error. You always got all resources from eg nodes
+	even when you supplied an attribute list where you only
+	requested the 'state' of the node.
+
+	Updated the inline python documentation
+
+=========== Version 2.7.9
+
+Fixed an error the previous version was in DEBUG mode. So
+you get an lot undesired output on the screen.
+
+debian package now also generated a package with the write 
+version info.
+
+=========== Version 2.7.8
+
+Setup.py:
+	Can also handle ROCKS installations + the version
+	info is now the same as pbs.py
+	Thanks to: Roy Dragseth
+
+=========== Version 2.7.7
+
+PBSQuery module: 
+  It can now be used in daemon programs. The pbs_server closes
+  the connection after an certain amount of time. This is fixed,
+  before every query there is an new connection and if the query 
+  is finished the connection is closed.
+  
+=========== Version 2.7.6
+
+Now setup.py can also handle old Oscar Installations. 
+Thanks To: Robin Humble
+
+Fixed an print statement fix in new_interface.py:
+Thanks To: Robin Humble
+
+Made some improvements for PBSQuery module:
+	- Updated the documentation
+	- Added the has_key() function to all
+ 	  PBSObjects. So that the behaviour is similar to 
+          an dictionary
+	  Suggested By: Ramon Bastiaans
+	
+=========== Version 2.7.5
+ Added PBSQuery module.  This module requires pbs.py and it a simple module 
+ for querying the pbs server. The documentation is in the module. Use for 
+ example ipython to read it.
+
+ Written By: Roy Dragseth 
+             Bas van der Vlies
+
+ eg: ( see also examples/new_interface.py)
+
+ from PBSQuery import PBSQuery
+ p = PBSQuery()
+
+ jobs = p.getjobs()
+ for name, job in jobs.items()
+ 	print job
+
+=========== Version 2.7.4
+ New versions fixes an bug in function pbs.pbs_statnode(). 
+ Reported by: Keith Poirier 
+
+ Configure support:
+ Contributed By: Yaroslav Halchenko
+
+ Debian package support:
+ Contributed By: Yaroslav Halchenko
+
+ Added Support for Debuging the interface, You must edit pbs_wrap.c 
+ and search for SARA_DEBUG:
+	#define SARA_DEBUG 1
+ Implemented by: Ramon Bastiaans
+
+ examples/pbsmon.py:
+ 	- Fixed an error when regex fails to determine node number, 
+	  no status was displayed
+        - It will now display and 'j' if the node is free for the batch
+	  system and a job runs on the node (SMP-systems).
+ Changed by: Bas van der Vlies
+
+ examples/rack_pbsmon.py:
+ 	- An pbsmon that display node info per rack
+	- Edit the rack_pbsmon.py to adjust the values. It requires
+	  that hostname contains rack and node id's, 
+	  eg: gb-r<number>n<number>
+ Contributed by: Walter de Jong
+
+=========== Version 2.7.3
+ The name SPBS is changed to the new name TORQUE (Tera-scale Open-source
+ Resource and QUEing manager). 
+
+ The interface support OPENPBS and TORQUE.
+
+=========== Version 2.7.2
+ Some minor changes to include files. Now the Scalable PBS keywords
+ are also supported ( server attribute names: node_ping_rate and
+ node_check_rate). This does not interfere with the openpbs software.
+
+ pbsmon.py could not handle an one node cluster. Fixed it.
+
+=========== Version 2.7
+ Forgot to wrap the pbs_statfree() function. So we could not free
+ allocated memory from functions that return 'struct batch_status *' 
+ like pbs_statjob().
+
+ pbsmon.py can now handle 2 and 3 digit hostnames. Patch supplied by
+ Daniel Olson
+
+=========== Version 2.6.1
+ Setup.py now checks if all openpbs libraries are installed to compile the 
+ package.
+
+=========== Version 2.6
+
+ Fixed a bug in the pbs python module. Forgot to map the pbs_statjob()
+ function. This bug prevented to pass 'struct attrl' variables to this
+ function. Thanks to Evelyn Shiu for reporting this bug.
+
+
+=========== Version 2.5
+ Added the OpenPbs logging functions (log.h and liblog.a). There
+ is an example in the examples directory: logpbs.py
+
+ Fixed a bug in examples/resmom_info.py used the default port for
+ pbs_resmon if getservbyname fails.
+
+ Fixed a bug in resmom code. If the user has no permissions to query
+ the pbs_mom daemon a empty string is returned. Now we check for
+ the empty string. So we do not get a python exception.
+
+ Fixed a bug in setup.py forgot the exit statement when we did not
+ find the pbs libraries.
+
+=========== Version 2.3
+ Bugfix in the pbsnodes-a.py. Forgot to import the sys module.
+
+ Removed some obsolete code. 
+
+ As for now we make use of the distutils module. So the package
+ is automatically compiled and installed in proper directories, usage:
+    python setup.py install
+ This requires that the package 'distutils' must be installed. As for
+ version 1.6 and higher it is in the distribution.
+
+ Added a function that prints the pbs python interface version. So we
+ can check if we have the right interface version:
+ import pbs
+ print pbs.version()
+ 
+
+=========== Version 2.2
+
+In this release we can query the pbs_mom daemon with the aid of
+resource management functions:
+   pbs.openrm()
+   pbs.closerm()
+   pbs.downrm()
+   pbs.configrm()
+   pbs.addreq()
+   pbs.allreq()
+   pbs.flushreq()
+   pbs.activereq()
+   pbs.fullresp()
+   pbs.getreq()
+
+There is also a python function:
+   pbs.get_mom_values(id, [list]):
+     id   - connection id of pbs.openrm(node-name, port-number)
+     list - Is a optional paramter. A list of resource keywords
+
+   If 'list' is not supplied then this function will get the values
+   for the standard resource keywords, eg uname, loadave, .. + 'arch' 
+   depended keywords. The arch feature is only implemented for linux, 
+   but it can easily be ported to other oses.
+
+   if 'list' is supplied then we only fetch values for the keywords
+   that are in the list.
+
+   The function returns a dictonary. The keys are the resource keywords.
+
+   See 'resmom_info.py' for a example of this new feature.
+
+=========== Version 2.0
+
+The previous version was a simple interface above the PBS C API LIB.  This 
+interface has gone a major changes. The most noticeable change is  that
+the functions accept/return Python lists instead of C-lists.  So you can now 
+use standard Python syntax for manipulating Python lists. If you are familar 
+with the Python syntax then you will appreciate this new interface.
+
+NOTE:
+  This interface is NOT compatible with the old one
+
+Here are some guidelines to convert your code to the new one:
+
+The constructors for the struct has gone a major change:
+  old code:
+    temp = pbs.new_attrl();
+    attrl_p = pbs.attrlPtr(temp)
+    attrl_p.name = 'state'
+
+  new_code:
+     attr_l = pbs.new_attrl(1)   // Creates a list of attrl structs length 1
+     attr_l[0].name = 'state'
+
+
+The pbs_stat functions returns Python lists instead of C-lists. There is
+NO next field anymore:
+  old_code:
+    temp = pbs.new_attrl();
+    attrl_p = pbs.attrlPtr(temp)
+    attrl_p.this = 'NULL'
+
+    nodes = pbs.pbs_statnode(con, "", attrl_p, "NULL")
+
+    while nodes.this != 'NULL':
+      print nodes.name
+
+      node_attrl = nodes.attribs
+      while node_attrl.this != 'NULL':
+        print '\t', node_attrl.name, '=', node_attrl.value
+	node_attrl = node_attrl.next
+
+    nodes = nodes.next 
+
+
+  new_code:
+    nodes = pbs.pbs_statnode(con, "", "NULL", "NULL")
+    for node in nodes:
+      print node.name
+      for attrib in node.attribs:
+        print '\t', attrib.name, '=', attrib.value
+
+Another advantage is you can use the print statement to show the
+connect of attrl and attropl classes:
+   attr_l = pbs.new_attrl(2)
+   attr_l[0].name = 'bas'
+   attr_l[0].value = 'van der Vlies'
+
+   print  attr_l[0]
+   >> (bas,,van der Vlies)
+    
+I hope these examples illustrate the changes. If you specify a wrong type
+for a function then function wil raise a Python exception.
Index: /tags/4.6.0/COPYING
===================================================================
--- /tags/4.6.0/COPYING	(revision 342)
+++ /tags/4.6.0/COPYING	(revision 342)
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Index: /tags/4.6.0/COPYING.LESSER
===================================================================
--- /tags/4.6.0/COPYING.LESSER	(revision 342)
+++ /tags/4.6.0/COPYING.LESSER	(revision 342)
@@ -0,0 +1,165 @@
+                   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
Index: /tags/4.6.0/LICENSE.openpbs
===================================================================
--- /tags/4.6.0/LICENSE.openpbs	(revision 342)
+++ /tags/4.6.0/LICENSE.openpbs	(revision 342)
@@ -0,0 +1,76 @@
+
+        OpenPBS (Portable Batch System) v2.3 Software License
+
+Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+All rights reserved.
+
+---------------------------------------------------------------------------
+For a license to use or redistribute the OpenPBS software under conditions
+other than those described below, or to purchase support for this software,
+please contact Veridian Systems, PBS Products Department ("Licensor") at:
+
+   www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+                       877 902-4PBS (US toll-free)
+---------------------------------------------------------------------------
+
+This license covers use of the OpenPBS v2.3 software (the "Software") at
+your site or location, and, for certain users, redistribution of the
+Software to other sites and locations.  Use and redistribution of
+OpenPBS v2.3 in source and binary forms, with or without modification,
+are permitted provided that all of the following conditions are met.
+After December 31, 2001, only conditions 3-6 must be met:
+
+1. Commercial and/or non-commercial use of the Software is permitted
+   provided a current software registration is on file at www.OpenPBS.org.
+   If use of this software contributes to a publication, product, or
+   service, proper attribution must be given; see www.OpenPBS.org/credit.html
+
+2. Redistribution in any form is only permitted for non-commercial,
+   non-profit purposes.  There can be no charge for the Software or any
+   software incorporating the Software.  Further, there can be no
+   expectation of revenue generated as a consequence of redistributing
+   the Software.
+
+3. Any Redistribution of source code must retain the above copyright notice
+   and the acknowledgment contained in paragraph 6, this list of conditions
+   and the disclaimer contained in paragraph 7.
+
+4. Any Redistribution in binary form must reproduce the above copyright
+   notice and the acknowledgment contained in paragraph 6, this list of
+   conditions and the disclaimer contained in paragraph 7 in the
+   documentation and/or other materials provided with the distribution.
+
+5. Redistributions in any form must be accompanied by information on how to
+   obtain complete source code for the OpenPBS software and any
+   modifications and/or additions to the OpenPBS software.  The source code
+   must either be included in the distribution or be available for no more
+   than the cost of distribution plus a nominal fee, and all modifications
+   and additions to the Software must be freely redistributable by any party
+   (including Licensor) without restriction.
+
+6. All advertising materials mentioning features or use of the Software must
+   display the following acknowledgment:
+
+    "This product includes software developed by NASA Ames Research Center,
+    Lawrence Livermore National Laboratory, and Veridian Information Solutions,
+    Inc.  Visit www.OpenPBS.org for OpenPBS software support,
+    products, and information."
+
+7. DISCLAIMER OF WARRANTY
+
+THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+ARE EXPRESSLY DISCLAIMED.
+
+IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+This license will be governed by the laws of the Commonwealth of Virginia,
+without reference to its choice of law rules.
Index: /tags/4.6.0/Makefile.in
===================================================================
--- /tags/4.6.0/Makefile.in	(revision 342)
+++ /tags/4.6.0/Makefile.in	(revision 342)
@@ -0,0 +1,33 @@
+TAR=tar
+GZIP_ENV=--best
+
+PACKAGE_TARNAME=@PACKAGE_TARNAME@
+
+PREFIX=@prefix@
+exec_prefix=$(PREFIX)
+BINDIR=$(PREFIX)/bin
+
+DOCDIR=@docdir@
+EXAMPLES=$(PREFIX)/$(DOCDIR)/examples
+
+.PHONY: install pythonlib
+pythonlib:
+	#(cd src; make)
+	python setup.py build
+
+#install: pythonlib sara_install
+install: pythonlib
+	python ./setup.py install --prefix $(DESTDIR)/$(exec_prefix) ;
+	install -D LICENSE.openpbs $(DESTDIR)/$(PREFIX)/$(DOCDIR)/LICENSE.openpbs
+	install -D COPYING $(DESTDIR)/$(PREFIX)/$(DOCDIR)/COPYING
+	install -D COPYING.LESSER $(DESTDIR)/$(PREFIX)/$(DOCDIR)/COPYING.LESSER
+	(cd examples; for i in *py; do install -D $$i  $(DESTDIR)/$(EXAMPLES)/$${i}; done)
+
+sara_install:
+	install -D examples/new_rack_pbsmon.py $(DESTDIR)/$(BINDIR)/pbsmon
+
+clean:
+	rm -rf config.log config.cache config.status build
+
+distclean: clean
+	rm Makefile setup.py
Index: /tags/4.6.0/Makefile.rpm
===================================================================
--- /tags/4.6.0/Makefile.rpm	(revision 342)
+++ /tags/4.6.0/Makefile.rpm	(revision 342)
@@ -0,0 +1,46 @@
+PRODUCT=pbs_python
+VERSION=3.2.0
+RELEASE=1
+
+#PYTHON_VERSION=2.3
+PYTHON_VERSION=$(shell python -c "import re;import sys;print re.match('(?P<major>\d\.\d)',sys.version).group('major')")
+#LIBDIR=/usr/lib64
+LIBDIR=$(shell if [ `uname -p` = 'x86_64' ]; then echo /usr/lib64; else echo /usr/lib; fi)
+
+TAR=/bin/tar
+
+SRCS = aclocal.m4 configure configure.in Makefile.in setup.py.in README TODO src examples
+
+_rpmtopdir = $(PWD)/rpm-build
+_rpmsrcdir = $(_rpmtopdir)/SOURCES
+_rpmbuilddir = $(_rpmtopdir)/BUILD
+_prodsrcdir = $(_rpmbuilddir)/$(PRODUCT)-$(VERSION)
+
+all:	rpm
+
+rpm:	$(_rpmsrcdir)/$(PRODUCT).tar.gz
+	@echo Building rpm...
+	@rpmbuild -ba --define '_sourcedir $(_rpmsrcdir)' \
+                      --define '_builddir $(_rpmbuilddir)' \
+                      --define 'prodversion $(VERSION)' \
+                      --define 'prodrelease $(RELEASE)' \
+                      --define 'pythonlib python$(PYTHON_VERSION)' \
+                      --define 'libdir $(LIBDIR)' \
+                         $(PRODUCT).spec
+	@rm -R $(_rpmsrcdir)
+
+$(_rpmsrcdir)/$(PRODUCT).tar.gz: $(SRCS) $(_rpmbuilddir) $(_rpmsrcdir)
+	@echo "Building tar file for sources ($(SRCS))..."
+	@if [ -d  $(_prodsrcdir) ]; then \
+	  rm -Rf $(_prodsrcdir); \
+	fi
+	@mkdir -p $(_prodsrcdir)
+	@cp -R $(SRCS) $(_prodsrcdir)
+	@$(TAR) -cz -C $(_rpmbuilddir) --exclude .svn --exclude CVS -f $@ $(PRODUCT)-$(VERSION)
+
+$(_rpmbuilddir):
+	@mkdir -p $(_rpmbuilddir)
+
+$(_rpmsrcdir):
+	@mkdir -p $(_rpmsrcdir)
+
Index: /tags/4.6.0/README
===================================================================
--- /tags/4.6.0/README	(revision 342)
+++ /tags/4.6.0/README	(revision 342)
@@ -0,0 +1,66 @@
+the latest stable pbs_python interface is available from:
+    ftp://ftp.surfsara.nl/pub/outgoing/pbs_python.tar.gz
+
+Information, documentation and reporting bugs for the package:
+    https://oss.trac.surfsara.nl/oss/pbs_python
+
+bug resport:
+    pbs_python@surfsara.nl
+
+=============== Brief description =============================
+Pbs_python interface is a wrapper class for the OPENPBS/TORQUE 
+C LIB API.  Now you can write utilities/extensions in Python 
+instead of C.  
+
+The Python wrapper class is tested on:
+
+  - LISA cluster debian wheezy, torque 2.5.13
+  - LTC test cluster debian wheezy, torque 5.0.1
+  - LTC test cluster centos 6, torque 5.0.1
+  - It should run on different OSes.
+
+-- Compile and install the package: (Require python 2.1 and higher)
+
+  As for python version 2.1 and higher the procedure is:
+    ./configure
+    make
+    make install
+
+  Debian package:
+    debian/rules binary
+
+--- Testing the package:
+
+The test programs are include as a reference how to use the pbs
+python module. You have to edit some test programs to reflect
+your PBS/Torque installation.
+
+pbsmon.py        - ascii xpbsmon
+rack_pbsmon.py   - ascii xpbsmon by rack layout
+pbsnodes-a.py    - pbsnodes -a
+pbs_version.py   - print server version
+set_property.py  - set some node properties
+resmom_info.py   - queries the pbs_mom daemon on the nodes
+logpbs.py	 - Shows the usage of the PBS logging routines
+new_interface.py - Example how to use PBSQuery module
+PBSQuery.py      - python <install_path>/PBSQuery.py (has builtin demo)
+
+sara_nodes.py    - We use this program to set the nodes offline/online. when 
+                   there are no command line arguments. It will list the 
+                   nodes that are down/oflline. For more info see:
+                    - https://subtrac.sara.nl/oss/pbs_python/wiki/TorqueExamples
+
+pbs_jobmonitor   - Shows the output of top -u user on the node:
+                     * one cycle of top
+                     * user: the user the job belongs to
+
+pbs_joblogin     - logs in to the node as the user who invokes this script 
+                   (os.getenv('USER'))
+
+For more info about SARA see:
+    http://www.surfsara.nl/index_eng.html
+
+--
+Bas van der Vlies
+| Operations, Support & Development | SURFsara | Science Park 140 | 1098 XG  Amsterdam
+| T +31 (0) 20 800 1300  | bas.vandervlies@surfsara.nl | www.surfsara.nl |
Index: /tags/4.6.0/aclocal.m4
===================================================================
--- /tags/4.6.0/aclocal.m4	(revision 342)
+++ /tags/4.6.0/aclocal.m4	(revision 342)
@@ -0,0 +1,1023 @@
+# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Do all the work for Automake.                            -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 10
+
+AC_PREREQ([2.54])
+
+# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright 2002  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+	 [AM_AUTOMAKE_VERSION([1.7.9])])
+
+# Helper functions for option handling.                    -*- Autoconf -*-
+
+# Copyright 2001, 2002  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+#  -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+#                                                          -*- Autoconf -*-
+# Copyright (C) 2003  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# serial 5						-*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      : > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored.
+      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking.   -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Check to see how 'make' treats includes.	-*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL                                              -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
+
+
+# Copyright 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# AM_PATH_PYTHON([MINIMUM-VERSION])
+
+# Adds support for distributing Python modules and packages.  To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable.  To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement.  MINIMUM-VERSION should consist of
+# numbers and dots only.
+
+AC_DEFUN([AM_PATH_PYTHON],
+ [
+  dnl Find a Python interpreter.  Python versions prior to 1.5 are not
+  dnl supported because the default installation locations changed from
+  dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
+  dnl in 1.5.
+  m4_define([_AM_PYTHON_INTERPRETER_LIST],
+	    [python python2 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5])
+
+  m4_if([$1],[],[
+    dnl No version check is needed.
+    # Find any Python interpreter.
+    AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST)
+    am_display_PYTHON=python
+  ], [
+    dnl A version check is needed.
+    if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      AC_MSG_CHECKING([whether $PYTHON version >= $1])
+      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+			      [AC_MSG_RESULT(yes)],
+			      [AC_MSG_ERROR(too old)])
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # VERSION.
+      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
+	[am_cv_pathless_PYTHON],[
+	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST : ; do
+          if test "$am_cv_pathless_PYTHON" = : ; then
+            AC_MSG_ERROR([no suitable Python interpreter found])
+	  fi
+          AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+        done])
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+      am_display_PYTHON=$am_cv_pathless_PYTHON
+    fi
+  ])
+
+  dnl Query Python for its version number.  Getting [:3] seems to be
+  dnl the best way to do this; it's what "site.py" does in the standard
+  dnl library.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+    [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
+  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+  dnl Use the values of $prefix and $exec_prefix for the corresponding
+  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
+  dnl distinct variables so they can be overridden if need be.  However,
+  dnl general consensus is that you shouldn't need this ability.
+
+  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
+
+  dnl At times (like when building shared libraries) you may want
+  dnl to know which OS platform Python thinks this is.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+    [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
+  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+
+  dnl Set up 4 directories:
+
+  dnl pythondir -- where to install python scripts.  This is the
+  dnl   site-packages directory, not the python standard library
+  dnl   directory like in previous automake betas.  This behavior
+  dnl   is more consistent with lispdir.m4 for example.
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+    [am_cv_python_pythondir],
+    [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
+  AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
+  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
+  dnl   more consistent with the rest of automake.
+
+  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+  dnl pyexecdir -- directory for installing python extension modules
+  dnl   (shared libraries)
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+    [am_cv_python_pyexecdir],
+    [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
+     echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
+  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+
+  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+])
+
+
+# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent (first
+# word of sys.version), in order to cope with versions such as 2.2c1.
+# hexversion has been introduced in Python 1.5.2; it's probably not
+# worth to support older versions (1.5.1 was released on October 31, 1998).
+AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys, string
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
+
+# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   (exit $ac_status); }])
+
Index: /tags/4.6.0/configure
===================================================================
--- /tags/4.6.0/configure	(revision 342)
+++ /tags/4.6.0/configure	(revision 342)
@@ -0,0 +1,3042 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for pbs-python 4.4.1.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='pbs-python'
+PACKAGE_TARNAME='pbs-python'
+PACKAGE_VERSION='4.4.1'
+PACKAGE_STRING='pbs-python 4.4.1'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="src/C++/pbs_wrap.cxx"
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+pkgpyexecdir
+pkgpythondir
+pythondir
+PYTHON_PLATFORM
+PYTHON_EXEC_PREFIX
+PYTHON_PREFIX
+PYTHON_VERSION
+PYTHON
+pbs_version
+pbs_library_dir
+pbs_library_compile_line
+PBSCONFIG
+pbsdir
+pyexecdir
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_pbsdir
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures pbs-python 4.4.1 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/pbs-python]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of pbs-python 4.4.1:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-pbsdir=PATH	The torque/pbs install directory
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+pbs-python configure 4.4.1
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by pbs-python $as_me 4.4.1, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+pbsdir_default=''
+
+# Check whether --with-pbsdir was given.
+if test "${with_pbsdir+set}" = set; then :
+  withval=$with_pbsdir; pbsdir=$withval
+else
+  pbsdir=$pbsdir_default
+fi
+
+
+
+# Verify the PBS libs are there, but let Makefile handle including them
+# on the link line.  First check for modern torque pbs-config program using
+# $pbsdir and the rest of PATH, then fall back to looking around for the
+# libraries by hand.
+# Extract the first word of "pbs-config", so it can be a program name with args.
+set dummy pbs-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PBSCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PBSCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PBSCONFIG="$PBSCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$pbsdir:$pbsdir/bin:$pbsdir/../bin:$PATH"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PBSCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_PBSCONFIG" && ac_cv_path_PBSCONFIG="none"
+  ;;
+esac
+fi
+PBSCONFIG=$ac_cv_path_PBSCONFIG
+if test -n "$PBSCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PBSCONFIG" >&5
+$as_echo "$PBSCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test "$PBSCONFIG" != "none"; then
+  pbs_library_compile_line="`$PBSCONFIG --libs`"
+  pbs_library_dir="`$PBSCONFIG --libdir`"
+  pbs_version="`$PBSCONFIG --version`"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Found torque version: $pbs_version" >&5
+$as_echo "Found torque version: $pbs_version" >&6; }
+else
+  as_fn_error $? "Failed to find program pbs-config" "$LINENO" 5
+fi
+
+
+
+
+
+
+
+
+
+        # Find any Python interpreter.
+    for ac_prog in python python2 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PYTHON+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PYTHON in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+$as_echo "$PYTHON" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$PYTHON" && break
+done
+
+    am_display_PYTHON=python
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5
+$as_echo_n "checking for $am_display_PYTHON version... " >&6; }
+if ${am_cv_python_version+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
+$as_echo "$am_cv_python_version" >&6; }
+  PYTHON_VERSION=$am_cv_python_version
+
+
+
+  PYTHON_PREFIX='${prefix}'
+
+  PYTHON_EXEC_PREFIX='${exec_prefix}'
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5
+$as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
+if ${am_cv_python_platform+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5
+$as_echo "$am_cv_python_platform" >&6; }
+  PYTHON_PLATFORM=$am_cv_python_platform
+
+
+
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5
+$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
+if ${am_cv_python_pythondir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
+$as_echo "$am_cv_python_pythondir" >&6; }
+  pythondir=$am_cv_python_pythondir
+
+
+
+  pkgpythondir=\${pythondir}/$PACKAGE
+
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5
+$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
+if ${am_cv_python_pyexecdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
+     echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
+$as_echo "$am_cv_python_pyexecdir" >&6; }
+  pyexecdir=$am_cv_python_pyexecdir
+
+
+
+  pkgpyexecdir=\${pyexecdir}/$PACKAGE
+
+
+
+ac_config_files="$ac_config_files Makefile setup.py"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+	g
+	s/^\n//
+	s/\n/ /g
+	p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by pbs-python $as_me 4.4.1, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+pbs-python config.status 4.4.1
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "setup.py") CONFIG_FILES="$CONFIG_FILES setup.py" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X "  :F $CONFIG_FILES      "
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+
+  esac
+
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
Index: /tags/4.6.0/configure.in
===================================================================
--- /tags/4.6.0/configure.in	(revision 342)
+++ /tags/4.6.0/configure.in	(revision 342)
@@ -0,0 +1,41 @@
+#AC_INIT(src/PBSQuery.py)
+
+AC_PREREQ([2.69])
+AC_INIT([pbs-python], [4.4.1])
+AC_CONFIG_SRCDIR([src/C++/pbs_wrap.cxx])
+
+AC_SUBST(prefix)
+AC_SUBST(exec_prefix)
+AC_SUBST(pyexecdir)
+
+
+pbsdir_default=''
+AC_ARG_WITH([pbsdir],
+ [  --with-pbsdir=PATH	The torque/pbs install directory],
+  pbsdir=$withval, pbsdir=$pbsdir_default)
+AC_SUBST(pbsdir)
+
+# Verify the PBS libs are there, but let Makefile handle including them
+# on the link line.  First check for modern torque pbs-config program using
+# $pbsdir and the rest of PATH, then fall back to looking around for the
+# libraries by hand.
+AC_PATH_PROG(PBSCONFIG, pbs-config, none, $pbsdir:$pbsdir/bin:$pbsdir/../bin:$PATH)
+if test "$PBSCONFIG" != "none"; then
+  pbs_library_compile_line="`$PBSCONFIG --libs`"
+  pbs_library_dir="`$PBSCONFIG --libdir`"
+  pbs_version="`$PBSCONFIG --version`"
+  AC_MSG_RESULT(Found torque version: $pbs_version)
+else
+  AC_MSG_ERROR([Failed to find program pbs-config])
+fi
+AC_SUBST(pbs_library_compile_line)
+AC_SUBST(pbs_library_dir)
+AC_SUBST(pbs_version)
+
+
+AM_PATH_PYTHON
+
+AC_OUTPUT(
+        Makefile
+	setup.py
+	)
Index: /tags/4.6.0/debian/changelog
===================================================================
--- /tags/4.6.0/debian/changelog	(revision 342)
+++ /tags/4.6.0/debian/changelog	(revision 342)
@@ -0,0 +1,364 @@
+pbs-python (4.6.0-1) UNRELEASED; urgency=low
+
+  * See Changes
+
+ -- Bas van der Vlies <bas.vandervlies@surfsara.nl>  Tue, 10 Mar 2015 12:03:25 +0100
+
+pbs-python (4.4.1-1) unstable; urgency=low
+
+  * See CHANGES
+
+ -- Dennis Stam <dennis.stam@surfsara.nl>  Wed, 04 Jun 2014 14:37:45 +0200
+
+pbs-python (4.4.0-1) unstable; urgency=low
+
+  * See CHANGES
+
+ -- Bas van der Vlies <bas.vandervlies@surfsara.nl>  Fri, 17 Jan 2014 14:13:07 +0100
+
+pbs-python (4.3.7-1) lenny; urgency=low
+
+  * See CHANGESk
+
+ -- Bas van der Vlies <bas.vandervlies@surfsara.nl>  Thu, 19 Sep 2013 14:11:56 +0200
+
+pbs-python (4.3.6-1) lenny; urgency=low
+
+  * See Changes
+
+ -- Dennis Stam <dennis.stam@surfsara.nl>  Thu, 16 May 2013 09:07:03 +0200
+
+pbs-python (4.3.5-1) lenny; urgency=low
+
+  * sara is now surfsara.nl, changed all references
+  * added a new code example for EVENT node parsing
+  * See Changes
+
+ -- Bas van der Vlies <bas.vandervlies@surfsara.nl>  Mon, 29 Apr 2013 17:21:39 +0200
+
+pbs-python (4.3.4-2) lenny; urgency=low
+
+  * Removed gb- from REGEX new_rack
+
+ -- Dennis Stam <dennis.stam@surfsara.nl>  Tue, 19 Feb 2013 16:54:39 +0100
+
+pbs-python (4.3.4-1) lenny; urgency=low
+
+  * See CHANGES 
+  * install pbs_jobmonitor and pbs_joblogin in /usr/bin
+
+ -- Bas van der Vlies <basv@sara.nl>  Fri, 27 Apr 2012 09:54:54 +0200
+
+pbs-python (4.3.3-1) lenny; urgency=low
+
+  * see CHANGES
+
+ -- Bas van der Vlies <basv@sara.nl>  Tue, 03 Jan 2012 12:01:15 +0100
+
+pbs-python (4.3.1-1) lenny; urgency=low
+
+  * see CHANGES 
+
+ -- Bas van der Vlies <bas@sara.nl>  Wed, 24 Aug 2011 14:08:09 +0200
+
+pbs-python (4.3.0-1) lenny; urgency=low
+
+  * See CHANGES
+
+ -- Bas van der Vlies <bas@sara.nl>  Fri, 05 Nov 2010 09:04:29 +0100
+
+pbs-python (4.2.0-2) lenny; urgency=low
+
+  * Update LICENSE file to LGPLV3 
+  * patched pbsmon.py for torque 2.5
+  * see CHANGES for complete list
+
+ -- Bas van der Vlies <bas@sara.nl>  Thu, 10 Jun 2010 10:27:43 +0200
+
+pbs-python (4.1.2-1) lenny; urgency=low
+
+  * See changes not yes finishedm but some important fixes 
+
+ -- bas van der Vlies <basv@sara.nl>  Thu, 20 May 2010 11:11:21 +0200
+
+pbs-python (4.1.0-1) lenny; urgency=low
+
+  * See CHANGES file 
+
+ -- bas van der Vlies <bas@sara.nl>  Thu, 29 Apr 2010 13:24:24 +0200
+
+pbs-python (4.0.2-1) lenny; urgency=low
+
+  * See CHANGES file
+
+ -- bas van der Vlies <bas@sara.nl>  Fri, 23 Apr 2010 10:27:58 +0200
+
+pbs-python (4.0.1-1) lenny; urgency=low
+
+  * See CHANGES file 
+
+ -- bas van der Vlies <bas@sara.nl>  Wed, 21 Apr 2010 08:26:02 +0200
+
+pbs-python (4.0.0-1) lenny; urgency=low
+
+  * See CHANGES file 
+
+ -- Bas van der Vlies <basv@sara.nl>  Fri, 09 Apr 2010 09:43:24 +0200
+
+pbs-python (3.6.0-1) lenny; urgency=low
+
+  * New generated files pbs_wrap.c and pbs.py fixes an error in pbs_runjob() 
+
+ -- Bas van der Vlies <basv@sara.nl>  Fri, 15 Jan 2010 04:40:35 +0100
+
+pbs-python (3.5.0-1) lenny; urgency=low
+
+  * PBSQuery
+        The class functions of node, job and queue support old and new data
+        structure.
+
+    Changed the behaviour of the new data stucture, We can use it as 
+    dictionary and as class attribute, this is equivalent, eg:
+      - print node['np'] and print node.np 
+
+    for a node we parse the 'status' line and split on '=' char, You now can 
+    use these statements, eg
+     - print node.status.arch     (node['status'].arch or node['status']['arch'])
+     - print node.status.nsession
+
+    for a job we parse the 'Variable_List' line and split on '=' char, You now can 
+    use the statements, eg:
+     - print job.Variable_List.PBS_O_WORKDIR
+     - print job.Variable_List.PBS_O_HOME
+
+    for more info see examples/new_interface.py
+
+    Author: Bas van der Vlies
+
+  * new_rack_pbsmon.py
+    Rewrite to new data structure and automatically determine how many nodes
+    and racks cluster has and skip printing of empty racks (default), use -w/--wide
+    for old behaviour.
+
+    Author: Bas van der Vlies
+
+ -- Bas van der Vlies <bas@sara.nl>  Mon, 12 Nov 2009 15:03:16 +0200
+
+pbs-python (3.2.0-1) intrepid; urgency=low
+
+  *  PBSQuery:
+     New data structure. In the old structure it is a dictionary
+     with a value and the value is a string. This is changed that
+     dictionary values are now of type list or dictionary depends
+     on the value of keyword, eg for a node:
+       - np = 2:
+       - node['np'] = [ '2' ]
+       - properties = cores2, mem4gb, parallel
+       - node['properties'] = [ 'cores2', 'mem4gb', 'parallel' ]
+       - status = arch=x86_64,sessions=22599,,size=70627864kb, ...
+       - node['status']['arch'] = [ 'x86_64' ]
+       - node['status']['sessions'] = [ '222599' ]
+       - ...
+
+         The data structure is activated by the function:
+          - new_data_structure()
+
+         In a future release it will be come the default.
+         example:
+         p = PBSQuery()
+         p.new_data_structure() 
+
+        nodes = p.getnodes()
+        print nodes.np, nodes['np']
+
+         Author: Bas van der Vlies
+
+  *  PBSQuery:
+  	For old and new data structure we now can use another syntax:
+     - node['np'] and node.np are equivalent
+
+        This new syntax works for all keywords.
+        Author: Bas van der Vlies
+
+  *  PBSQuery:
+  	Added iter object for job, node, queue and server objects, eg:
+        node = p.getnode('gb-r1n1')
+        print node.name
+        for attrib in node:
+           print '%\t%s = %s' %(attrib, node[attrib])
+        Author: Bas van der Vlies
+
+  *  PBSQuery:
+        fixed an error in getnode, getqueue and getjob, return
+        empty dictionary if not found.
+        Author: Bas van der Vlies
+
+  *  PBSQuery:
+        New build system for rpm packages, make -f Makefile.rpm
+        Author: Michel Jouvin <jouvin add lal dot in2p3 dot fr>
+        Applied: Bas van der Vlies
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Thu, 14 May 2009 13:41:00 +0200
+
+pbs-python (3.0.1-2) intrepid; urgency=low
+
+  * adjust number of nodes to 32 
+
+ -- root <root@rc.sara.nl>  Tue, 17 Mar 2009 18:17:18 +0100
+
+pbs-python (3.0.1-1) intrepid; urgency=low
+
+  * Small bug fix
+
+ -- root <root@rc.sara.nl>  Wed, 28 Jan 2009 13:58:43 +0100
+
+pbs-python (3.0.0-1) intrepid; urgency=low
+
+  * New api for PBSQuery and build on any architecture
+
+ -- Bas van der Vlies <bas@sara.nl>  Tue, 11 Nov 2008 12:48:39 +0100
+
+pbs-python (2.9.8-3) intrepid; urgency=low
+
+  * New functions added to PBSQuery
+
+ -- Bas van der Vlies <basv@sara.nl>  Fri, 10 Oct 2008 11:18:38 +0200
+
+pbs-python (2.9.8-2) intrepid; urgency=low
+
+  * New PBSQuery module
+
+ -- Bas van der Vlies <bas@sara.nl>  Wed,  8 Oct 2008 14:05:44 +0200
+
+pbs-python (2.9.8-1) intrepid; urgency=low
+
+  * New version with updated torque header file (version 2.X)
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Wed, 24 Sep 2008 12:32:29 +0200
+
+pbs-python (2.9.6-1) intrepid; urgency=low
+
+  * pbs_python.spec file patch added libdir and python defines so it
+    will build for RHEL5.1/CentOS 5.1 (by Michael Sternberg) and some
+    minor changes to the pbs_ifl.h file
+
+ -- Dennis Stam <dennis.stam@sara.nl>  Thu, 18 Sep 2008 11:23:16 +0200
+
+pbs-python (2.9.4-1) unstable; urgency=low
+
+  * New version with all the fixes as mentioned below 
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Thu, 16 Nov 2006 14:29:16 +0100
+
+pbs-python (2.9.2-4) unstable; urgency=low
+
+  * PBSQuery: Make use of UserDict module
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Wed, 18 Oct 2006 11:46:34 +0200
+
+pbs-python (2.9.2-3) unstable; urgency=low
+
+  *  Fixed a has_key bug must return zero instead of None
+     Thanks to Ramon Bastiaans for reporting
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Fri, 13 Oct 2006 15:33:25 +0200
+
+pbs-python (2.9.2-2) unstable; urgency=low
+
+  * new_rack_pbsmon.py fixes serial/parallel calculations 
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Tue, 10 Oct 2006 12:13:25 +0200
+
+pbs-python (2.9.2-1) unstable; urgency=low
+
+  * New upstream version, read CHANGES file 
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Tue, 19 Sep 2006 16:17:54 +0200
+
+pbs-python (2.9.1-6) unstable; urgency=low
+
+  *  New torque build system
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Fri, 21 Jul 2006 10:41:31 +0200
+
+pbs-python (2.9.1-5) unstable; urgency=low
+
+  * Down state has most priority. So display it 
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Fri, 16 Jun 2006 14:44:48 +0200
+
+pbs-python (2.9.1-4) unstable; urgency=low
+
+  *  Added sara_install to Makefile.in. Else
+     no new pbsmon for SARA
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Thu, 15 Jun 2006 12:23:54 +0200
+
+pbs-python (2.9.1-3) unstable; urgency=low
+
+  * New version adjusted new_rack_pbsmon.py to 39 racks 
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Mon, 12 Jun 2006 11:56:26 +0200
+
+pbs-python (2.9.1-2) unstable; urgency=low
+
+  * Fixed a bug in new_rack_pbsmon.py 
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Fri, 26 May 2006 16:41:35 +0200
+
+pbs-python (2.9.0-1) unstable; urgency=low
+
+  * Added new build system for torque 2.1.0 and higher
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Thu, 20 Apr 2006 14:25:21 +0200
+
+pbs-python (2.8.2-3) unstable; urgency=low
+
+  * Changed new_rack_pbsmon.py script by walter 
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Thu, 13 Apr 2006 14:10:36 +0200
+
+pbs-python (2.8.2-2) unstable; urgency=low
+
+  *  Fixed Makefile.in, now right script
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Fri,  7 Apr 2006 10:59:35 +0200
+
+pbs-python (2.8.2-1) unstable; urgency=low
+
+  *  Added new pbsmon example: new_rack_pbsmon.py uses PBSQuery
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Thu,  6 Apr 2006 15:12:03 +0200
+
+pbs-python (2.8.0-2) unstable; urgency=medium
+
+  * Used swig 1.3.24 with python2.1 works also on higher python versions
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Mon,  7 Nov 2005 14:55:00 +0100
+
+pbs-python (2.8.0-1) unstable; urgency=low
+
+  * New pbs_python release, See CHANGES
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Fri,  4 Nov 2005 15:58:44 +0100
+
+pbs-python (2.7.10-1) unstable; urgency=low
+
+  * Added examples/LICENSE.sara to /usr/share/doc directory
+  * Made an sara_install section for pbsmon --> examples/rack_pbsmon.py
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon, 26 Sep 2005 16:32:06 +0200
+
+pbs-python (2.7.9-2) unstable; urgency=low
+
+  * Bumped up version
+  * Fixed  DEBUG mode
+
+ -- Bas van der Vlies <bas@rc.sara.nl>  Fri, 24 Jun 2005 11:23:30 +0200
+
+pbs-python (2.7.5-1) unstable; urgency=low
+
+  * Initial version
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Mon, 1 Nov 2004 12:13:08 -0400
+
Index: /tags/4.6.0/debian/compat
===================================================================
--- /tags/4.6.0/debian/compat	(revision 342)
+++ /tags/4.6.0/debian/compat	(revision 342)
@@ -0,0 +1,1 @@
+5
Index: /tags/4.6.0/debian/control
===================================================================
--- /tags/4.6.0/debian/control	(revision 342)
+++ /tags/4.6.0/debian/control	(revision 342)
@@ -0,0 +1,14 @@
+Source: pbs-python
+Section: misc
+Priority: optional
+Maintainer: Bas van der Vlies <basv@sara.nl>
+Build-Depends: debhelper (>> 4.0.0), cdbs, chrpath, python, torque
+Standards-Version: 3.5.8
+
+Package: pbs-python
+Section: misc
+Architecture: any
+Depends: libtorque2, ${python:Depends}, ${python:Provides}, python-argparse | python (>= 2.7)
+Description: python API for the Torque library
+ PBS_PYTHON interface is a wrapper class for the OPENPBS/TORQUE C LIB API.
+ Now you can write utilities/extensions in Python instead of C.
Index: /tags/4.6.0/debian/copyright
===================================================================
--- /tags/4.6.0/debian/copyright	(revision 342)
+++ /tags/4.6.0/debian/copyright	(revision 342)
@@ -0,0 +1,32 @@
+Format-Specification:
+    http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
+    Upstream-Maintainer: Bas van der Vlies <basv@sara.nl>
+    Upstream-Source: https://subtrac.sara.nl/oss/pbs_python
+    Upstream-Name: pbs_python
+
+Files: *
+Copyright: SARA: Bas van der Vlies
+License: LGPL-3+
+
+Files: src/rm.h src/pbs_ifl.h src/log.h src/pbs_error.h
+Copyright: Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+License:  OpenPBS (Portable Batch System) v2.3 Software License
+
+
+Files: debian/*
+Copyytight:  Yaroslav Halchenko <yoh@psychology.rutgers.edu>
+             Bas van der Vlies <basv@sara.nl>
+             Donovan Rebbechi <elflord@psychology.rutgers.edu>
+             Benjamin Martin Bly <ben@psychology.rutgers.edu>
+License: Artistic License
+
+License: Artistic License
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the "Artistic License" which comes
+    with Perl.
+
+    On Debian GNU/Linux systems, the complete text of the Artistic Licence
+    in `/usr/share/common-licenses/Artistic'.
+
+License:  OpenPBS (Portable Batch System) v2.3 Software License
+    Is include this package as LICENSE.openpbs in /usr/shar/doc/pbs-python
Index: /tags/4.6.0/debian/examples
===================================================================
--- /tags/4.6.0/debian/examples	(revision 342)
+++ /tags/4.6.0/debian/examples	(revision 342)
@@ -0,0 +1,1 @@
+examples/*
Index: /tags/4.6.0/debian/pycompat
===================================================================
--- /tags/4.6.0/debian/pycompat	(revision 342)
+++ /tags/4.6.0/debian/pycompat	(revision 342)
@@ -0,0 +1,1 @@
+2
Index: /tags/4.6.0/debian/pyversions
===================================================================
--- /tags/4.6.0/debian/pyversions	(revision 342)
+++ /tags/4.6.0/debian/pyversions	(revision 342)
@@ -0,0 +1,1 @@
+2.5-
Index: /tags/4.6.0/debian/rules
===================================================================
--- /tags/4.6.0/debian/rules	(revision 342)
+++ /tags/4.6.0/debian/rules	(revision 342)
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+
+DEB_PYTHON_SYSTEM := pysupport
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
+
+DEB_PYTHON_SETUP_CMD := setup.py
+DEB_PYTHON_COMPRESS_EXCLUDE := .pyc
+DEB_STRIP_EXCLUDE := .pyc
+
+dh_configure::
+	./configure
+
+binary-post-install/pbs-python::
+	mkdir -p debian/pbs-python/usr/bin
+	install -D examples/new_rack_pbsmon.py debian/pbs-python/usr/bin/pbsmon
+	install -D examples/sara_nodes.py debian/pbs-python/usr/bin/sara_nodes
+	install -D examples/pbs_jobmonitor debian/pbs-python/usr/bin/pbs_jobmonitor
+	( cd debian/pbs-python/usr/bin; ln -s pbs_jobmonitor pbs_joblogin )
Index: /tags/4.6.0/description.html
===================================================================
--- /tags/4.6.0/description.html	(revision 342)
+++ /tags/4.6.0/description.html	(revision 342)
@@ -0,0 +1,42 @@
+<HTML>
+<HEAD>
+<TITLE>OpenPbs programming with PYTHON</TITLE>
+</HEAD>
+<BODY>
+<H1>OpenPbs programming with PYTHON</H1>
+<H2>Introduction</H2>
+<P>
+This a openpbs/torque python module. So you can now use python instead of the OPENPBS 
+C API to make OpenPbs programs to set/query queue, node and server attributes.
+
+<P>
+<H2>Installation</H2>
+<P>
+To install the python modules for python version 1.6 and higher it is easy:
+<BLOCKQUOTE>
+  ./configure
+  make
+  make install
+</BLOCKQUOTE>
+
+As for python versions lower the 1.6 the following procedure is required.
+First you have to make the python module and test if it works. It
+depends on your python installation where you want to place the
+pbs modules. Some good places are:
+<BLOCKQUOTE>
+     /usr/lib/python1.5/site-packages<BR>
+     /usr/local/lib/python1.5/site-packages<BR>
+</BLOCKQUOTE>
+<P>
+<H1>Author Contact Information</H1>
+<P>
+The OpenPbs C API to python interface is written by:
+<P>
+<BLOCKQUOTE>
+Bas van der Vlies, <A href="mailto:basv@sara.nl">basv@sara.nl</A><BR>
+the Netherlands
+</BLOCKQUOTE>
+<P>
+</BODY>
+</HTML>
+
Index: /tags/4.6.0/examples/JobParser.py
===================================================================
--- /tags/4.6.0/examples/JobParser.py	(revision 342)
+++ /tags/4.6.0/examples/JobParser.py	(revision 342)
@@ -0,0 +1,265 @@
+#!/usr/bin/env python
+#
+# Author:       Dennis Stam
+# Date:         30 September 2014
+# Description:  This is a very simple jobscript parser to fetch all #PBS arguments
+#               and convert them to a attropl list which can be used for submission
+#
+
+import re
+import sys
+import argparse
+import time
+import pbs
+
+class JobParser(object):
+    '''A simple simple jobscript parser to fetch all #PBS arguments from the header'''
+
+    job_script = None
+    matcher = re.compile(r'\#PBS\s(?P<args>.+)')
+
+    ## These are the arguments that exist in Torque
+    pbs_attrs = {
+        'a' : {
+            'func': 'pbs_datetime',
+            'args_opts': {
+                'type': str,
+            },
+        },
+        'A' : {
+            'args_opts': {
+                'type': str,
+            },
+        },
+        # Checkpoint is not yet implemented
+        #'c' : {
+        #    'args_opts': {
+        #        'type': str,
+        #        'action': 'append',
+        #    },
+        #},
+        'e' : {
+            'args_opts': {
+                'type': str,
+            },
+        },
+        'F' : {
+            'args_opts': {
+                'type': str,
+            },
+        },
+        'f' : {
+            'args_opts': {
+                'action' : 'store_true',
+            },
+        },
+        'h' : {
+            'args_opts': {
+                'action' : 'store_true',
+            },
+        },
+        'I' : {
+            'args_opts': {
+                'action' : 'store_true',
+            },
+        },
+        'j' : {
+            'args_opts': {
+                'type': str,
+                'choices': ['eo','oe','n'],
+            },
+        },
+        'k' : {
+            'args_opts': {
+                'type': str,
+                'choices' : ['e','o','eo','oe','n'],
+            },
+        },
+        'l' : {
+            'args_opts': {
+                'type': str,
+                'action': 'append',
+            },
+        },
+        'm' : {
+            'args_opts': {
+                'type': str,
+                'choices': ['a','b','e','n'],
+            },
+        },
+        'M' : {
+            'args_opts': {
+                'type': str,
+                'action': 'append',
+            },
+        },
+        'N' : {
+            'args_opts': {
+                'type': str,
+            },
+        },
+        'o' : {
+            'args_opts': {
+                'type': str,
+            },
+        },
+        'p' : {
+            'args_opts': {
+                'type': int,
+            },
+        },
+        'P' : {
+            'args_opts': {
+                'type': str,
+            },
+        },
+        'q' : {
+            'args_opts': {
+                'type': str,
+            },
+        },
+        'r' : {
+            'args_opts': {
+                'action' : 'store_true',
+            },
+        },
+        'S' : {
+            'args_opts': {
+                'type': str,
+                'action' : 'append',
+            },
+        },
+        't' : {
+            'args_opts': {
+                'type': str,
+            },
+        },
+        'u' : {
+            'args_opts': {
+                'type': str,
+                'action' : 'append',
+            },
+        },
+        'W' : {
+            'args_opts': {
+                'type': str,
+                'action' : 'append',
+            },
+        },
+    }
+
+    def __init__(self, job_script=None):
+        if hasattr(job_script, 'readlines'):
+            self.job_script = job_script.readlines()
+
+    def read(self, filename):
+        try:
+            with open(filename, 'r') as fi:
+                self.job_script = fi.readlines()
+        except IOError:
+            error_str = "Jobscript filename does not exists: %s" %(filename)
+            raise Exception(error_str)
+
+    def __get_pbs_args(self):
+        if not self.job_script:
+            raise Exception("User function read to read from file")
+
+        args = list()
+        for line in self.job_script:
+            if self.matcher.search(line.strip()):
+                args.append(self.matcher.findall(line.strip())[0])
+        return args
+
+    def pbs_datetime(self, input):
+
+        current_time, current_seconds = tuple(time.strftime('%Y%m%d%H%M.%S').split('.'))
+
+        if len(input.strip()) == 12:
+            return input.strip()
+        elif len(input.strip()) == 10:
+            return current_time[0:2] + input.strip()
+        elif len(input.strip()) == 8:
+            return current_time[0:4] + input.strip()
+        elif len(input.strip()) == 6:
+            return current_time[0:6] + input.strip()
+        elif len(input.strip()) == 4:
+            return current_time[0:8] + input.strip()
+
+        return current_time
+
+    def parse_pbs(self):
+        '''Parse the arguments and check if they are using the correct format'''
+
+        ## First create an arguments parser
+        parser = argparse.ArgumentParser(add_help=False)
+        for arg, options in self.pbs_attrs.items():
+            parser.add_argument('-'+arg, **options['args_opts'])
+
+        ## Parse the arguments that have been found in the jobscript
+        args = parser.parse_args(self.__get_pbs_args())
+
+        ## Create an dict with items we wan't to set, skip evrything which is None, empty of False
+        process_args = dict()
+        for k,v in args.__dict__.items():
+            if v:
+                if self.pbs_attrs.has_key(k) and self.pbs_attrs[k].has_key('func'):
+                    try:
+                        process_args[k] = getattr(self, self.pbs_attrs[k]['func'])(v)
+                    except AttributeError as err:
+                        raise Exception('Could not locate function')
+                else:
+                    if type(v) is type(list()):
+                        value = list()
+                        for x in v:
+                            value.extend(x.strip().split(','))
+                        process_args[k] = ",".join(value)
+                    else:
+                        process_args[k] = v.strip()
+        return process_args
+
+    def get_attropl(self):
+        data = self.parse_pbs()
+
+        ### First al the keys, except for --resource-list/-l
+        ##  and perhaps more later
+        length = len([ x for x in data.keys() if x not in ['l']])
+        if data.has_key('l'):
+            length += len(data['l'].split(','))
+
+        attropl = pbs.new_attropl(length)
+        index = 0
+
+        for attr, value in data.items():
+            if attr in ['l']:
+                for v in value.split(','):
+                    parts = v.split('=')
+                    resource, value = parts[0], "=".join(parts[1:])
+                    attropl[index].name = getattr(pbs, 'ATTR_'+attr)
+                    attropl[index].resource = resource
+                    attropl[index].value = value
+                    index += 1
+            else:
+                attropl[index].name = getattr(pbs, 'ATTR_'+attr)
+                attropl[index].value = value
+                index += 1
+        return attropl
+
+if __name__ == '__main__':
+    jp = JobParser()
+
+    try:
+        jp.read(sys.argv[1])
+    except IndexError:
+        print("Usage: %s <jobscript>" %(sys.argv[0]))
+        sys.exit(1)
+        
+
+    server_name = pbs.pbs_default()
+    con = pbs.pbs_connect(server_name)
+    job_id = pbs.pbs_submit(con, jp.get_attropl(), sys.argv[1], 'batch', 'NULL')
+
+    e, e_txt = pbs.error()
+    if e:
+        print(e, e_txt)
+    else:
+        print(job_id)
Index: /tags/4.6.0/examples/README
===================================================================
--- /tags/4.6.0/examples/README	(revision 342)
+++ /tags/4.6.0/examples/README	(revision 342)
@@ -0,0 +1,6 @@
+To test these utilities set the environment variabele PYTHONPATH:
+for sh-shells:
+    PYTHONPATH=../src; export PYTHONPATH
+
+for csh-shells:
+    setenv PYTHONPATH ../src
Index: /tags/4.6.0/examples/ha_server.py
===================================================================
--- /tags/4.6.0/examples/ha_server.py	(revision 342)
+++ /tags/4.6.0/examples/ha_server.py	(revision 342)
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+#
+# Author: Bas van der Vlies <basv@sara.nl>
+# Date  : 15 Apr 2009
+# Desc. : Usage of the High Availabilty functions in torque
+#
+# SVN info:
+# $Id: new_interface.py 74 2005-03-04 09:11:10Z bas $
+#
+#
+#
+import sys
+
+import pbs
+
+def method1():
+	pbs_server = pbs.pbs_default() 
+	if not pbs_server:
+		print "No default pbs server"
+		sys.exit(1)
+
+	con = pbs.pbs_connect(pbs_server)
+	if con == -1:
+		print "Default pbs server connection failed"
+		pbs_server = pbs.pbs_fbserver()
+		if not pbs_server:
+			print "No pbs fallback server"
+			sys.exit(1)
+		else:
+			con = pbs.pbs_connect(pbs_server)
+			if con == -1:
+				print "pbs fallback server connection failed"
+				sys.exit(1)
+
+	print "Connected to %s" %(pbs_server)
+
+def method2():
+	try:
+		server_list = pbs.pbs_get_server_list().split(',')
+	except AttributeError, detail:
+		print 'The installed torque version does not support pbs_get_server_list function'
+		sys.exit(1)
+	for server in server_list:
+		pbs_server = server
+		con = pbs.pbs_connect(server)
+		if con != -1:
+			break
+
+	if con == -1:
+		print 'Could not connect to a server (%s)' %('.'.join(server_list))
+		sys.exit(1)
+
+	print "Connected to %s" %(pbs_server)
+
+
+method1()
+method2()
+
+
Index: /tags/4.6.0/examples/logpbs.py
===================================================================
--- /tags/4.6.0/examples/logpbs.py	(revision 342)
+++ /tags/4.6.0/examples/logpbs.py	(revision 342)
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+#
+# Author: Bas van der Vlies <basv@sara.nl>
+# Date  : 21 Oct 2002
+# Desc. : How to use the logging facility of Openpbs
+#
+# $Id$
+#
+import pbs
+import sys
+
+def main():
+  
+   # Open log in current directory with current date
+   #
+   if pbs.log_open('', '.'):
+     print 'Could not open log file'
+     sys.exit(1)
+
+   pbs.log_record(pbs.PBSEVENT_ERROR, pbs.PBS_EVENTCLASS_REQUEST, 'test1', 'this a test message')
+
+   # Give a verbose message of closing the file
+   #
+   pbs.log_close(1)
+
+   # Open the sched log file
+   #
+   if pbs.log_open('', '/var/spool/torque/sched_logs'):
+     print 'Could not open log file in /var/spool/torque/sched_logs'
+     sys.exit(1)
+
+   pbs.log_record(pbs.PBSEVENT_JOB, pbs.PBS_EVENTCLASS_JOB, 'test1', 'this a test message')
+
+   # Give a NON verbose message of closing the file
+   #
+   pbs.log_close(0)
+
+main()
Index: /tags/4.6.0/examples/new_interface.py
===================================================================
--- /tags/4.6.0/examples/new_interface.py	(revision 342)
+++ /tags/4.6.0/examples/new_interface.py	(revision 342)
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+#
+# Author: Bas van der Vlies <basv@sara.nl>
+# Date  : 02 March 2005
+# Desc. : Usage of the new PBSQuery module
+#
+# SVN info:
+# $Id$
+#
+#
+#
+
+import pbs
+from PBSQuery import PBSQuery
+from PBSQuery import PBSError
+
+import sys
+
+def main():
+
+  p = PBSQuery()
+  p.new_data_structure()
+
+  #job = p.getjob('2983215')
+  #print job['substate']
+  #print job.substate
+  #print job.queue
+  #print job.Resource_List
+  #print job.Resource_List.nodes 
+  #print job.Resource_List.arch 
+  #print job.Variable_List.PBS_O_HOME
+
+  l = ['np', 'state' ]
+  node = p.getnode("r2n2", l)
+
+  print node.name
+  print node.name, node['np']
+
+  sys.exit(0)
+
+  #nodes = p.getnodes(l)
+  for id in nodes:
+	print id
+
+	try:
+		print nodes[id].np
+		print nodes[id].status.arch
+		print nodes[id].status.uname
+		print nodes[id].state
+	except PBSError, detail:
+		print detail
+		pass
+	
+     #for attrib in nodes[id]:
+     #	print attrib, nodes[id][attrib]
+
+main()
Index: /tags/4.6.0/examples/new_rack_pbsmon.py
===================================================================
--- /tags/4.6.0/examples/new_rack_pbsmon.py	(revision 342)
+++ /tags/4.6.0/examples/new_rack_pbsmon.py	(revision 342)
@@ -0,0 +1,667 @@
+#! /usr/bin/env python
+#
+# This version of pbsmon is base on the new_rack_pbsmon.py
+# 
+# Authors:
+#   Bas van der Vlies
+#   Dennis Stam
+#
+#      SVN Info:
+#              $Id$
+#              $URL$
+#
+
+"""
+specifying hostnames:
+  To specify a range use the [] to indicate a range, a couple of examples:
+
+  The first five nodes of rack 16
+      - gb-r16n[1-5]
+
+  The first five nodes and node 12 and 18 of rack 16 to 20
+      - gb-r[16-20]n[1-5,12,18]
+
+  The first five nodes de in rack 16 with padding enabled
+      - gb-r[16]n[01-5]
+
+The ranges ([]) are not only limited to numbers, letters can also be used.
+"""
+
+import sys
+import re
+import re
+import types
+
+import pbs
+from PBSQuery import PBSQuery
+from PBSQuery import PBSError
+
+## This RE pattern is used for the hostrange
+HOSTRANGE = r'\[([0-9az\-,]+)\]'
+
+# Remark: When both are True, extended view is being printed
+PRINT_TABLE = True
+PRINT_EXTENDED = False
+
+# Which nodes must be skipped
+EXCLUDE_NODES = [ 'login' ]
+
+# Some global OPTS
+OPT_SKIP_EMPTY_RACKS = True
+OPT_SERVERNAME = None
+
+## Begin: TABLE view opts
+
+# A node has the following syntax gb-r10n10
+#  r10 is rack name -> skip one char --> gives us rack number = 10
+#  n10 is node name -> skip one char --> gives us node number = 10
+# Then we have to set these variables to determine automatically the 
+# number of nodes and racks 
+#
+NODE_EXPR = "r(?P<racknr>[0-9]+)n(?P<nodenr>[0-9]+)" 
+
+START_RACK = 1 
+
+## End: TABLE view opts
+
+## Begin: EXTENDED view opts
+
+LENGTH_NODE  = 0
+LENGTH_STATE = 0
+
+EXTENDED_PATTERNS = {
+    'header' : ' %-*s | %-*s | %s', 
+    'row': ' %-*s | %-*s | %s',
+    'line': ' %s',
+    'line_char': '-',
+}
+
+## End: EXTENDED view opts
+
+pbs_ND_single           = 'job (single)'
+pbs_ND_total            = 'total'
+pbs_ND_free_serial      = 'free serial'
+pbs_ND_free_parallel    = 'free parallel'
+
+PBS_STATES = {
+    pbs.ND_free             : '_',
+    pbs.ND_down             : 'X',
+    pbs.ND_offline          : '.',
+    pbs.ND_reserve          : 'R',
+    pbs.ND_job_exclusive    : 'J',
+    pbs.ND_job_sharing      : 'S',
+    pbs.ND_busy             : '*',
+    pbs.ND_state_unknown    : '?',
+    pbs.ND_timeshared       : 'T',
+    pbs.ND_cluster          : 'C',
+    pbs_ND_single           : 'j',
+    pbs_ND_free_serial      : '_',
+    pbs_ND_free_parallel    : '_',
+    pbs_ND_total            : ' '
+}
+
+## Color support?
+import curses
+curses.setupterm()
+if curses.tigetnum("colors") > 2:
+    TERMINAL_COLOR=True
+else:
+    TERMINAL_COLOR=False
+
+####
+## Rewriting the print function, so it will work with all versions of Python
+def _print(*args, **kwargs):
+    '''A wrapper function to make the functionality for the print function the same for Python2.4 and higher'''
+    ## First try if we are running in Python3 and higher
+    try:
+        Print = eval('print')
+        Print(*args, **kwargs)
+    except SyntaxError:
+        ## Then Python2.6 and Python2.7
+        try:
+            D = dict()
+            exec('from __future__ import print_function\np=print', D)
+            D['p'](*args, **kwargs)
+            del D
+        ## Finally Python2.5 or lower
+        except SyntaxError:
+            del D
+            fout    = kwargs.get('file', sys.stdout)
+            write   = fout.write
+            if args:
+                write(str(args[0]))
+                sep = kwargs.get('sep', ' ')
+                for arg in args[1:]:
+                    write(sep)
+                    write(str(a))
+                write(kwargs.get('end', '\n'))
+
+class color:
+    PURPLE = '\033[95m'
+    CYAN = '\033[96m'
+    DARKCYAN = '\033[36m'
+    BLUE = '\033[94m'
+    GREEN = '\033[92m'
+    YELLOW = '\033[93m'
+    RED = '\033[91m'
+    BOLD = '\033[1m'
+    UNDERLINE = '\033[4m'
+    END = '\033[0m'
+
+def compare_lists(list_a, list_b):
+    return not any(x not in list_b for x in list_a)
+
+## Import argparse here, as I need the _print function
+try:
+    import argparse
+except ImportError:
+    _print('Cannot find argparse module', file=sys.stderr)
+    sys.exit(1)
+
+####
+## BEGIN functions for hostrange parsing
+def l_range(start, end):
+    '''The equivalent for the range function, but then with letters, uses the ord function'''
+    start = ord(start)
+    end   = ord(end)
+    rlist = list()
+
+    ## A ord number must be between 96 (a == 97) and 122 (z == 122)
+    if start < 96 or start > 122 and end < 96 or end > 122:
+        raise Exception('You can only use letters a to z')
+    ## If start is greater then end, then the range is invalid
+    elif start > end:
+        raise Exception('The first letter must be smaller then the second one')
+    ## Just revert the ord number to the char
+    for letter in range(start, end + 1):
+        rlist.append(chr(letter))
+    return rlist
+
+def return_range(string):
+    '''This function will return the possible values for the given ranges'''
+
+    ## First check if the first char is valid
+    if string.startswith(',') or string.startswith('-'):
+        raise Exception('Given pattern is invalid, you can\'t use , and - at the beginning')
+
+    numbers_chars        = list()
+    equal_width_length  = 0
+
+    ## First splitup the sections (divided by ,)
+    for section in string.split(','):
+        ## Within a section you can have a range, max two values
+        chars = section.split('-')
+        if len(chars) == 2:
+            ## When range is a digit, simply use the range function
+            if chars[0].isdigit() and chars[1].isdigit():
+                ## Owke, check for equal_width_length
+                if chars[0][0] == '0' or chars[1][0] == '0':
+                    if len(chars[0]) >= len(chars[1]):
+                        equal_width_length = len(chars[0])
+                    else:
+                        equal_width_length = len(chars[1])
+                ## Don't forget the +1
+                numbers_chars += range(int(chars[0]), int(chars[1])+1)
+            ## If one of the two is a digit, raise an exceptio
+            elif chars[0].isdigit() or chars[1].isdigit():
+                raise Exception('I can\'t combine integers with letters, change your range please')
+            ## Else use the l_range
+            else:
+                numbers_chars += l_range(chars[0], chars[1])
+        else:
+            ## If the value of the section is a integer value, check if it has a 0
+            if section.isdigit() and section[0] == '0':
+                if len(section) > equal_width_length:
+                    equal_width_length = len(section)
+            numbers_chars.append(section)
+
+        ## if the equal_width length is greater then 0, rebuild the list
+        ## 01, 02, 03, ... 10
+        if equal_width_length > 0:
+            tmp_list = list()
+            for number_char in numbers_chars:
+                if type(number_char) is types.IntType or number_char.isdigit():
+                    tmp_list.append('%0*d' % ( equal_width_length, int(number_char)))
+                else:
+                    tmp_list.append(number_char)
+            numbers_chars = tmp_list
+
+    return numbers_chars
+
+def product(*args, **kwargs):
+    '''Taken from the python docs, does the same as itertools.product, 
+    but this also works for py2.5'''
+    pools = map(tuple, args) * kwargs.get('repeat', 1)
+    result = [[]]
+    for pool in pools:
+        result = [x+[y] for x in result for y in pool]
+    for prod in result:
+        yield tuple(prod)
+
+def parse_args(args):
+    rlist = list()
+    for arg in args:
+        parts = re.findall(HOSTRANGE, arg)
+        if parts:
+            ## create a formatter string, sub the matched patternn with %s
+            string_format = re.sub(HOSTRANGE, '%s', arg)
+            ranges = list()
+
+            ## detect the ranges in the parts
+            for part in parts:
+                ranges.append(return_range(part))
+            
+            ## produce the hostnames
+            for combination in product(*ranges):
+                rlist.append(string_format % combination)
+        else:
+            rlist.append(arg)
+    return rlist
+
+## END functions for hostrange parsing
+####
+
+def sanitize_jobs( jobs ):
+
+    ljobs = list()
+
+    for job in jobs:
+        ljobs.extend( re.findall( r'[0-9]+\/([0-9]+)\.*.', job ) )
+
+    return list( set( ljobs ) )
+
+def parse_nodename( nodename ):
+    global NODE_EXPR
+
+    parts = re.search( r'%s' % NODE_EXPR, nodename, re.VERBOSE )
+
+    try:
+        racknr = parts.group( 'racknr' )
+    except Exception:
+		racknr = 0
+
+    try:
+        nodenr = parts.group( 'nodenr' )
+    except Exception:
+        nodenr = 0
+
+    return int( racknr ), int( nodenr )
+
+def get_nodes( racknode=False, hosts=None ):
+    global LENGTH_NODE
+    global LENGTH_STATE
+    global OPT_SERVERNAME
+
+    nodes_dict = dict()
+
+    try:
+        if not OPT_SERVERNAME:
+            p = PBSQuery()
+        else:
+            p = PBSQuery( OPT_SERVERNAME )
+    except PBSError, reason:
+        _print('Error: %s' % reason)
+        sys.exit( -1 )
+
+    p.new_data_structure()
+
+    attr = [ 'state', 'jobs', 'properties', 'jobs' ]
+
+    try:
+        nodes = p.getnodes( attr )
+    except PBSError, reason:
+        _print('Error: %s' % reason)
+        sys.exit( -1 )
+
+    number_of_racks = 0
+    nodes_per_rack = 0
+    hosts_list = list()
+    
+    for node, attr in nodes.items():
+        if node in EXCLUDE_NODES:
+            continue
+
+        if hosts and node not in hosts:
+            continue
+
+        if pbs.ND_down in attr.state:
+            state = pbs.ND_down
+        else:
+            state = attr.state[ 0 ]
+
+        state_char = PBS_STATES[ state ]
+
+        if attr.is_free() and attr.has_job():
+            state = pbs.ND_busy 
+            state_char = PBS_STATES[ pbs_ND_single ]
+
+        if not nodes_dict.has_key( node ):
+            nodes_dict[ node ] = dict()
+
+        # Setting the longest lenght
+        if len( node ) > LENGTH_NODE:
+            LENGTH_NODE = len( node )
+
+        if len( state ) > LENGTH_STATE:
+            LENGTH_STATE = len( state )
+
+        if racknode:
+            racknr, nodenr = parse_nodename( node )
+
+            if racknr > number_of_racks:
+                number_of_racks = racknr
+
+            if nodenr > nodes_per_rack:
+                nodes_per_rack = nodenr
+            
+            if not nodes_dict.has_key( racknr ):
+                nodes_dict[ racknr ] = dict()
+
+            if not nodes_dict[ racknr ].has_key( nodenr ):
+                nodes_dict[ racknr ][ nodenr ] = dict()
+
+            nodes_dict[ racknr ][ nodenr ][ 'state_char' ] = state_char
+            nodes_dict[ racknr ][ nodenr ][ 'state' ] = state
+        
+            if attr.has_key( 'jobs' ):
+                nodes_dict[ racknr ][ nodenr ][ 'jobs' ] = sanitize_jobs( attr.jobs )
+            else:
+                nodes_dict[ racknr ][ nodenr ][ 'jobs' ] = []
+
+            if attr.has_key( 'properties' ):
+                nodes_dict[ racknr ][ nodenr ][ 'properties' ] = attr.properties
+            else:
+                nodes_dict[ racknr ][ nodenr ][ 'properties' ] = []
+
+        else:
+            hosts_list.append( node )
+            nodes_dict[ node ][ 'state_char' ] = state_char
+            nodes_dict[ node ][ 'state' ] = state
+        
+            if attr.has_key( 'jobs' ):
+                nodes_dict[ node ][ 'jobs' ] = sanitize_jobs( attr.jobs )
+            else:
+                nodes_dict[ node ][ 'jobs' ] = []
+
+            if attr.has_key( 'properties' ):
+                nodes_dict[ node ][ 'properties' ] = attr.properties
+            else:
+                nodes_dict[ node ][ 'properties' ] = []
+
+    if not racknode:
+        return nodes_dict, hosts_list
+
+    return nodes_dict, number_of_racks, nodes_per_rack
+
+def _generate_index( str ):
+    index = []
+
+    def _append( fragment, alist=index ):
+        if fragment.isdigit():
+            fragment = int( fragment )
+        alist.append( fragment )
+
+    prev_isdigit = str[0].isdigit()
+    current_fragment = ''
+
+    for char in str:
+        curr_isdigit = char.isdigit()
+
+        if curr_isdigit == prev_isdigit:
+            current_fragment += char
+        else:
+            _append( current_fragment )
+            current_fragment = char
+            prev_isdigit = curr_isdigit
+
+    _append( current_fragment )
+
+    return tuple( index )
+
+def real_sort( inlist ):
+    indices = map(_generate_index, inlist )
+    decorated = zip( indices, inlist )
+    decorated.sort()
+
+    return [ item for index, item in decorated ]
+
+def print_table(properties=None, jobs=None):
+    global START_RACK 
+    global OPT_SKIP_EMPTY_RACKS
+
+    nodes, racknr, nodenr = get_nodes( True )
+
+    ## Code herebelow has been taken from the new_rack_pbsmon.py
+    save_column = None
+    
+    _print()    
+    _print('  ', end=' ')
+    for rack in xrange( START_RACK, racknr + 1 ):
+        
+        if not ( rack % 10 ):
+            char = '%d' % ( rack / 10 )
+            save_column = char
+        else:
+            char = ' '
+
+        if OPT_SKIP_EMPTY_RACKS:
+            if nodes.has_key( rack ):
+                if save_column:
+                    char = save_column
+                    save_column = None
+                _print(char, end=' ')
+        else:
+            _print(char, end=' ')
+    _print()    
+
+    _print('  ', end=' ')
+    for rack in xrange( START_RACK, racknr + 1 ):
+        
+        char = rack % 10
+        if OPT_SKIP_EMPTY_RACKS:
+            if nodes.has_key( rack ):
+                _print(char, end=' ')
+        else:
+            _print(char, end=' ')
+    _print()
+
+    for node in xrange( 1, nodenr + 1 ):
+        _print('%2d' % node, end=' ')
+
+        for rack in xrange( START_RACK, racknr + 1 ):
+            if OPT_SKIP_EMPTY_RACKS:
+                if not nodes.has_key( rack ):
+                    continue
+            try:
+                if properties and compare_lists(properties,nodes[ rack ][ node ]['properties']):
+                    prop_color = True
+                else:
+                    prop_color = False
+
+                if jobs and compare_lists(jobs, nodes[ rack ][ node ]['jobs']):
+                    job_color = True
+                else:
+                    job_color = False
+
+                if prop_color or job_color:
+                    if TERMINAL_COLOR and prop_color and job_color:
+                        _print(color.GREEN + nodes[ rack ][ node ][ 'state_char' ] + color.END, end=' ')
+                    elif TERMINAL_COLOR and  prop_color:
+                        _print(color.BLUE + nodes[ rack ][ node ][ 'state_char' ] + color.END, end=' ')
+                    elif TERMINAL_COLOR and  job_color:
+                        _print(color.YELLOW + nodes[ rack ][ node ][ 'state_char' ] + color.END, end=' ')
+                    else:
+                        _print('M', end=' ')
+                else:
+                    _print(nodes[ rack ][ node ][ 'state_char' ], end=' ')
+            except KeyError:
+                _print(' ', end=' ')
+        _print()
+    _print()
+
+def print_table_summary():
+    global PBS_STATES
+    global OPT_SERVERNAME
+
+    try:
+        if not OPT_SERVERNAME:
+            p = PBSQuery()
+        else:
+            p = PBSQuery( OPT_SERVERNAME )
+    except PBSError, reason:
+        _print('error: %s' % reason)
+        sys.exit(-1)
+
+    # get the state of the nodes
+    attr = [ 'state', 'jobs', 'properties' ]
+    try:
+        nodes = p.getnodes(attr)
+    except PBSError, reason:
+        _print('error: %s' % reason)
+        sys.exit(-1)
+
+    node_dict = {}
+
+    count_states = {}
+    for key in PBS_STATES.keys():
+        count_states[key] = 0
+
+    for nodename, node in nodes.items():
+
+        # Skip login nodes in status display
+        #
+        if not nodename.find('login'):
+            continue
+
+        state = node['state'][ 0 ]
+
+        state_char = PBS_STATES[state]
+        count_states[state] += 1
+        count_states[pbs_ND_total] += 1
+
+        if node.is_free():                          # can happen for single CPU jobs
+            if node.has_job():
+#               _print('TD: %s' % nodename, node)
+                state_char = PBS_STATES[pbs_ND_single]
+                count_states[pbs.ND_free] -=  1
+                count_states[pbs_ND_single] += 1
+            else:
+                if  'infiniband' in node['properties']:
+                    count_states[pbs_ND_free_parallel] +=  1 
+                elif  'ifiniband' in node['properties']:
+                    count_states[pbs_ND_free_serial] +=  1 
+                #else:
+                #   count_states[pbs_ND_free_serial] +=  1 
+                
+#       print_('TD: %s %s' % (nodename, state_char))
+        dummy = nodename.split('-')
+        if len( dummy ) > 1:
+            node_dict[dummy[1]] = state_char
+        else:
+            node_dict[dummy[0]] = state_char
+
+    legend = PBS_STATES.keys()
+    legend.sort()
+
+    n = 0
+    for state in legend:
+        _print('  %s  %-13s : %-5d' % (PBS_STATES[state], state, count_states[state]), end=' ')
+
+        n = n + 1
+        if not (n & 1):
+            _print()
+ 
+    if TERMINAL_COLOR:
+        _print()
+        _print('Colors has been enabled for your terminal:')
+        _print(' - ' + color.YELLOW + 'Matched jobs' + color.END)
+        _print(' - ' + color.BLUE + 'Matched properties' + color.END)
+        _print(' - ' + color.GREEN + 'Matched jobs and properties' + color.END)
+
+def print_extended(hosts=None, properties=None, jobs=None):
+    global LENGTH_NODE
+    global LENGTH_STATE 
+    global EXTENDED_PATTERNS
+    
+    nodes, ihosts = get_nodes( hosts=hosts )
+    row_header = EXTENDED_PATTERNS[ 'header' ] % ( ( LENGTH_NODE + 2 ), 'Node', ( LENGTH_STATE + 2 ), 'State', 'Jobs' )
+    LENGTH_ROW = len( row_header )
+
+    rows_str = list()
+    ihosts = real_sort( ihosts )
+    for node in ihosts:
+        attr = nodes[ node ]
+
+        if jobs and not compare_lists(jobs, attr['jobs']):
+            continue
+
+        if properties and not compare_lists(properties, attr['properties']):
+            continue
+
+        row_str = EXTENDED_PATTERNS[ 'row' ] % ( ( LENGTH_NODE + 2 ), node, ( LENGTH_STATE + 2 ), attr[ 'state' ], ','.join( attr[ 'jobs' ] ) )
+
+        if len( row_str ) > LENGTH_ROW:
+            LENGTH_ROW = len( row_str )
+
+        rows_str.append( row_str )
+
+    _print()
+    _print(row_header)
+    _print(EXTENDED_PATTERNS[ 'line' ] % ( EXTENDED_PATTERNS[ 'line_char' ] * LENGTH_ROW ))
+    _print('\n'.join( rows_str ))
+    _print()
+
+if __name__ == '__main__':
+    
+    parser = argparse.ArgumentParser(
+        formatter_class=argparse.RawDescriptionHelpFormatter,
+        description=__doc__,
+    )
+
+    parser.add_argument('nodes', metavar='NODES', nargs='*', type=str)
+    parser.add_argument("-t", "--table", dest="table", action="store_true", help="Show an table", default=PRINT_TABLE )
+    parser.add_argument("-l", "--list", dest="extended", action="store_true", help="Show node rows with state and jobinfo", default=PRINT_EXTENDED )
+    parser.add_argument("-s", "--summary", dest="summary", action="store_true", help="Display a short summary", default=False )
+    parser.add_argument("-a", "--all", dest="summary", action="store_true", help="Display a short summary" )
+    parser.add_argument("-w", "--wide", dest="wide", action="store_true", help="Wide display for node status ( only when -t is used )" )
+    parser.add_argument("-S", "--servername", dest="servername", help="Change the default servername", default=None )
+    parser.add_argument("-p", "--properties", dest="properties", help="Show nodes with property, you can use more than 1 property by using , (this is always een and) ie. -p infiniband,mem64gb", default=None)
+    parser.add_argument("-j", "--job", dest="jobs", help="Show which nodes are uses by a job", default=None)
+    parser.add_argument('--version', action='version', version=pbs.version)
+
+    args = parser.parse_args()
+
+    if args.nodes:
+        args.nodes = parse_args(args.nodes)
+
+    if args.servername:
+        OPT_SERVERNAME = args.servername
+
+    if args.wide:
+        OPT_SKIP_EMPTY_RACKS = False
+
+    if args.nodes:
+        args.extended = True
+
+    if args.extended and PRINT_TABLE:
+        args.table = False
+
+    if args.table and PRINT_EXTENDED:
+        args.extended = False
+
+    if args.properties:
+        args.properties = [ item.strip() for item in args.properties.split(',') ]
+
+    if args.jobs:
+        args.jobs = [ item.strip() for item in args.jobs.split(',') ]
+
+    if args.extended:
+        print_extended(args.nodes, args.properties, args.jobs) 
+    elif args.table:
+        print_table(args.properties, args.jobs)
+    else:
+        _print('Something is wrong, bye!', file=sys.stderr)
+        sys.exit( -1 )
+
+    if args.summary:
+        print_table_summary()
Index: /tags/4.6.0/examples/node_event_parse.py
===================================================================
--- /tags/4.6.0/examples/node_event_parse.py	(revision 342)
+++ /tags/4.6.0/examples/node_event_parse.py	(revision 342)
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+#
+# Author: Bas van der Vlies <basv@sara.nl>
+# Date  : 17 Aug 2001 
+# Desc. : Simple pbsnodes -a
+#
+# SVN info:
+#   $Id$
+#   $URL$ 
+#
+#
+#
+
+
+import pbs
+import sys
+from PBSQuery import PBSQuery
+
+p = PBSQuery()
+node = p.getnode('gb-r7n3')
+print node['event']
Index: /tags/4.6.0/examples/pbs_joblogin
===================================================================
--- /tags/4.6.0/examples/pbs_joblogin	(revision 342)
+++ /tags/4.6.0/examples/pbs_joblogin	(revision 342)
@@ -0,0 +1,113 @@
+#!/usr/bin/env python
+# 
+# Author:
+#  Willem Vermin, SARA, April 2012
+#
+# SVN Info:
+#   $Id#
+#   $URL: https://oss.trac.sara.nl/pbs_python/svn/trunk/examples/pbs_jobmonitor $
+#
+# pbs_jobmonitor, pbs_joblogin <jobnr> [nodenr]
+#    jobnr: the number of the job
+#    nodenr: the rank of the node in the job
+#
+# depending on the name with this script is called it performs the
+# following:
+
+# called as pbs_jobmonitor:
+#       shows the output of top -u user on the node
+#       - one cycle of top
+#       - user: the user the job belongs to
+#
+# called as pbs_joblogin:
+#       logs in to the node as the user who invokes this script
+#            (os.getenv('USER'))
+#
+from PBSQuery import PBSQuery
+import sys,os
+def uniq(seq, idfun=None): 
+  # http://www.peterbe.com/plog/uniqifiers-benchmark
+   # order preserving
+   if idfun is None:
+       def idfun(x): return x
+   seen = {}
+   result = []
+   for item in seq:
+       marker = idfun(item)
+       if marker in seen: continue
+       seen[marker] = 1
+       result.append(item)
+   return result
+
+def usage(a):
+  if a == 'pbs_jobmonitor':
+    print a,'shows the system usage of a node where a job is running'
+  if a == 'pbs_joblogin':
+    print a,'logs you in to a node where a job is running'
+    
+  print 'Usage:'
+  print a,'<jobnumber> [nodenumber]'
+  print 'where <jobnumber> is the number of the job'
+  print '      nodenumber is the rank number of the node allocated to the job'
+  print '      (default 0)'
+  
+me = sys.argv[0].split('/')[-1]
+print '['+me+']'
+p = PBSQuery()
+
+try:
+  j=sys.argv[1]
+except:
+  usage(me)
+  sys.exit(1)
+
+if len(sys.argv) > 2:
+  try:
+    num = int(sys.argv[2])
+  except:
+    usage(me)
+    sys.exit(1)
+else:
+  num = 0
+
+job = p.getjob(j)
+
+try:
+  h = job['exec_host'][0]
+except:
+  print 'No such job:',j
+  sys.exit(1)
+
+hh = h.split('+')
+nodes=[]
+for h in hh:
+  nodes = nodes + [ h.split('/')[0]]
+
+nodes = uniq(nodes)
+print 'Job',j,'is running on',len(nodes),'nodes:'
+i=0
+for h in nodes:
+  print h,
+  i = i+1
+  if i > 7:
+    i=0
+    print
+if i != 0:
+  print
+
+if num >= len(nodes):
+  print 'No node number',num
+  sys.exit(1)
+
+if me == 'pbs_jobmonitor':
+  user=job['Job_Owner'][0].split('@')[0]
+  print 'top for node #',num,':',nodes[num],'user:',user
+  sys.stdout.flush()
+  os.system('ssh '+nodes[num]+' top -n1 -b -u ' + user)
+
+if me == 'pbs_joblogin':
+  user = os.getenv('USER')
+  print 'logging in to node #',num,':',nodes[num],'user:',user
+  sys.stdout.flush()
+  os.system('ssh -X '+nodes[num])
+
Index: /tags/4.6.0/examples/pbs_jobmonitor
===================================================================
--- /tags/4.6.0/examples/pbs_jobmonitor	(revision 342)
+++ /tags/4.6.0/examples/pbs_jobmonitor	(revision 342)
@@ -0,0 +1,113 @@
+#!/usr/bin/env python
+# 
+# Author:
+#  Willem Vermin, SARA, April 2012
+#
+# SVN Info:
+#   $Id#
+#   $URL$
+#
+# pbs_jobmonitor, pbs_joblogin <jobnr> [nodenr]
+#    jobnr: the number of the job
+#    nodenr: the rank of the node in the job
+#
+# depending on the name with this script is called it performs the
+# following:
+
+# called as pbs_jobmonitor:
+#       shows the output of top -u user on the node
+#       - one cycle of top
+#       - user: the user the job belongs to
+#
+# called as pbs_joblogin:
+#       logs in to the node as the user who invokes this script
+#            (os.getenv('USER'))
+#
+from PBSQuery import PBSQuery
+import sys,os
+def uniq(seq, idfun=None): 
+  # http://www.peterbe.com/plog/uniqifiers-benchmark
+   # order preserving
+   if idfun is None:
+       def idfun(x): return x
+   seen = {}
+   result = []
+   for item in seq:
+       marker = idfun(item)
+       if marker in seen: continue
+       seen[marker] = 1
+       result.append(item)
+   return result
+
+def usage(a):
+  if a == 'pbs_jobmonitor':
+    print a,'shows the system usage of a node where a job is running'
+  if a == 'pbs_joblogin':
+    print a,'logs you in to a node where a job is running'
+    
+  print 'Usage:'
+  print a,'<jobnumber> [nodenumber]'
+  print 'where <jobnumber> is the number of the job'
+  print '      nodenumber is the rank number of the node allocated to the job'
+  print '      (default 0)'
+  
+me = sys.argv[0].split('/')[-1]
+print '['+me+']'
+p = PBSQuery()
+
+try:
+  j=sys.argv[1]
+except:
+  usage(me)
+  sys.exit(1)
+
+if len(sys.argv) > 2:
+  try:
+    num = int(sys.argv[2])
+  except:
+    usage(me)
+    sys.exit(1)
+else:
+  num = 0
+
+job = p.getjob(j)
+
+try:
+  h = job['exec_host'][0]
+except:
+  print 'No such job:',j
+  sys.exit(1)
+
+hh = h.split('+')
+nodes=[]
+for h in hh:
+  nodes = nodes + [ h.split('/')[0]]
+
+nodes = uniq(nodes)
+print 'Job',j,'is running on',len(nodes),'nodes:'
+i=0
+for h in nodes:
+  print h,
+  i = i+1
+  if i > 7:
+    i=0
+    print
+if i != 0:
+  print
+
+if num >= len(nodes):
+  print 'No node number',num
+  sys.exit(1)
+
+if me == 'pbs_jobmonitor':
+  user=job['Job_Owner'][0].split('@')[0]
+  print 'top for node #',num,':',nodes[num],'user:',user
+  sys.stdout.flush()
+  os.system('ssh '+nodes[num]+' top -n1 -b -u ' + user)
+
+if me == 'pbs_joblogin':
+  user = os.getenv('USER')
+  print 'logging in to node #',num,':',nodes[num],'user:',user
+  sys.stdout.flush()
+  os.system('ssh -X '+nodes[num])
+
Index: /tags/4.6.0/examples/pbs_script.sh
===================================================================
--- /tags/4.6.0/examples/pbs_script.sh	(revision 342)
+++ /tags/4.6.0/examples/pbs_script.sh	(revision 342)
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [ -f /etc/node_status/reboot_event ]
+then
+    cat /etc/node_status/reboot_event | while read line
+    do
+        echo "EVENT:$line"
+    done
+fi
Index: /tags/4.6.0/examples/pbs_version.py
===================================================================
--- /tags/4.6.0/examples/pbs_version.py	(revision 342)
+++ /tags/4.6.0/examples/pbs_version.py	(revision 342)
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+# Author: Bas van der Vlies <basv@sara.nl>
+# Date  : 17 Aug 2001 
+# Desc. : print version of pbs_server
+#    
+# CVS info:
+# $Id$
+#
+#
+import sys
+import pbs
+
+def main():
+
+  pbs_server = pbs.pbs_default()
+  if not pbs_server:
+    print 'No default server'
+    sys.exit(1)
+
+  con = pbs.pbs_connect(pbs_server)
+
+  attr_l = pbs.new_attrl(1)
+  attr_l[0].name = 'pbs_version'
+
+  server_info = pbs.pbs_statserver(con, attr_l, 'NULL')
+  for entry in server_info:
+    print entry.name
+    for attrib in entry.attribs:
+       print '\t', attrib.name, ' = ', attrib.value
+
+main()
Index: /tags/4.6.0/examples/pbsmon.py
===================================================================
--- /tags/4.6.0/examples/pbsmon.py	(revision 342)
+++ /tags/4.6.0/examples/pbsmon.py	(revision 342)
@@ -0,0 +1,159 @@
+#!/usr/bin/env python
+#
+# Author: Bas van der Vlies <basv@sara.nl>
+# Date  : 17 Aug 2001
+# Desc. : This script displays the status of the PBS batch.
+#         It display the status of a node. The ideas are
+#         based on the awk-script of Willem Vermin
+#
+# CVS info:
+# $Id$
+#
+import sys
+import string
+import re
+
+import pbs
+
+pbs_ND_free_and_job = 'not_all_procs_used'
+
+translate_state = {
+    pbs.ND_free             : '_',
+    pbs.ND_down             : 'X',
+    pbs.ND_offline          : '.',
+    pbs.ND_reserve          : 'R',
+    pbs.ND_job_exclusive    : 'J',
+    pbs.ND_job_sharing      : 'S',
+    pbs.ND_busy             : '*',
+    pbs.ND_state_unknown    : '?',   
+    pbs.ND_timeshared       : 'T',
+    pbs.ND_cluster          : 'C',
+    pbs_ND_free_and_job     : 'j'
+}
+
+
+
+def display_cluster_status(nl, sl):
+
+  # Thanks to Daniel Olson, we have now code that can handle
+  # 2 and 3 digit hostname numbers
+  #
+  if len(nl) == 1: 
+    width = len( nl[0] )
+  else:
+    width = len( nl[-1] )
+
+  # Determine what format we have to use
+  #
+  if width == 3:
+    step = end = 19
+    format = '%3s'
+  else:
+    step  = end = 25
+    format = '%2s'
+
+  start = 0 
+
+  items = len(nl)
+
+  # Sanity check 
+  if end > items:
+    end = items
+
+  while start < items:
+
+    print ' ',
+    for j in range(start,end):
+      print format %(nl[j]) ,
+
+    print '\n ',
+    for j in range(start,end):
+      print format %(sl[j]) ,
+   
+    print '\n'
+
+    start = end
+    end = end + step 
+
+    if end > items:
+      end = items
+   
+  # Now some statistics
+  #
+  n = 0
+  for key in translate_state.keys():
+    value = translate_state[key]
+    print "%3s %-21s : %d\t |" %( value, key, sl.count(value) ),
+    if n%2:
+      print ''
+    n = n + 1
+
+def main():
+  state_list = []
+  node_list  = []
+  node_nr    = 0
+
+  if len(sys.argv) > 1:
+    pbs_server = sys.argv[1]
+  else:
+    pbs_server = pbs.pbs_default()
+    if not pbs_server:
+      print "No default pbs server, usage: pbsmon [server] "
+      sys.exit(1)
+
+  con = pbs.pbs_connect(pbs_server)
+  if con < 0:
+     errno, text = pbs.error()
+     print errno, text
+     sys.exit(1)
+
+  # We are only interested in the state and jobs of a node
+  #
+  attrl = pbs.new_attrl(2);
+  attrl[0].name='state'
+  attrl[1].name = 'jobs'
+
+
+  nodes = pbs.pbs_statnode(con, "", attrl, "NULL")
+
+  # Some is het None dan weer NULL, beats me
+  #
+  for node in nodes:
+
+    # display_node_status(batch_info)
+    node_attr = node.attribs
+
+    # A node can have serveral states, huh. We are only
+    # interested in first entry.
+    #
+    temp = string.splitfields(node_attr[0].value, ',')
+    state = temp[0]
+
+    # look if on a free node a job is scheduled, then mark it
+    # as other state
+    #
+    if state == pbs.ND_free:
+       if len([x for x in node_attr if x.name == 'jobs']):
+          state_list.append(translate_state[pbs_ND_free_and_job])
+       else:
+          state_list.append(translate_state[state])
+    else:
+          state_list.append(translate_state[state])
+		
+		
+    re_host = re.compile(r"""
+
+      (?P<name>\d+)
+
+      """, re.VERBOSE)
+
+    result = re_host.search(node.name)
+    if result:
+      node_list.append( result.group('name') )
+    else:
+      node_nr = node_nr + 1
+      node_list.append( str(node_nr) )
+
+  display_cluster_status(node_list, state_list)
+
+main()
Index: /tags/4.6.0/examples/pbsnodes-a.py
===================================================================
--- /tags/4.6.0/examples/pbsnodes-a.py	(revision 342)
+++ /tags/4.6.0/examples/pbsnodes-a.py	(revision 342)
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+#
+# Author: Bas van der Vlies <basv@sara.nl>
+# Date  : 17 Aug 2001 
+# Desc. : Simple pbsnodes -a
+#
+# CVS info:
+# $Id$
+#
+#
+#
+
+
+import pbs
+import sys
+
+def main():
+
+  pbs_server = pbs.pbs_default()
+  if not pbs_server:
+    print "No default pbs server"
+    sys.exit(1)
+
+  con = pbs.pbs_connect(pbs_server)
+  nodes = pbs.pbs_statnode(con, "", "NULL", "NULL")
+
+
+  for node in nodes:
+    print node.name
+    for attrib in node.attribs:
+      print '\t', attrib.name, '=', attrib.value
+
+main()
Index: /tags/4.6.0/examples/rack_pbsmon.py
===================================================================
--- /tags/4.6.0/examples/rack_pbsmon.py	(revision 342)
+++ /tags/4.6.0/examples/rack_pbsmon.py	(revision 342)
@@ -0,0 +1,138 @@
+#! /usr/bin/env python
+#
+#	pbsmon	WJ104
+#
+#	Hint: set ts=4
+#
+
+import os
+import sys
+import string
+
+import pbs
+
+
+NODES_PER_RACK = 19
+N_RACKS = 15
+
+pbs_ND_single = 'job (single)'
+
+
+PBS_STATES = {
+	pbs.ND_free				: '_',
+	pbs.ND_down				: 'X',
+	pbs.ND_offline			: '.',
+	pbs.ND_reserve			: 'R',
+	pbs.ND_job_exclusive	: 'J',
+	pbs.ND_job_sharing		: 'S',
+	pbs.ND_busy				: '*',
+	pbs.ND_state_unknown	: '?',
+	pbs.ND_timeshared		: 'T',
+	pbs.ND_cluster			: 'C',
+	pbs_ND_single			: 'j'
+}
+
+
+
+def pbsmon():
+	global NODES_PER_RACK, N_RACKS, PBS_STATES
+
+	if len(sys.argv) > 1:
+		pbs_server = sys.argv[1]
+	else:
+		pbs_server = pbs.pbs_default()
+
+	if not pbs_server:
+		print 'No default pbs server, usage: %s [server]' % os.path.basename(sys.argv[0])
+		sys.exit(1)
+
+	con = pbs.pbs_connect(pbs_server)
+	if con < 0:
+		errno, text = pbs.error()
+		print errno, text
+		sys.exit(1)
+
+# get the state of the nodes
+	attrl = pbs.new_attrl(2)
+	attrl[0].name = 'state'
+	attrl[1].name = 'jobs'
+	nodes = pbs.pbs_statnode(con, '', attrl, 'NULL')
+
+	node_dict = {}
+
+	count_states = {}
+	for key in PBS_STATES.keys():
+		count_states[key] = 0
+
+	for node in nodes:
+		node_attr = node.attribs
+		temp = string.split(node_attr[0].value, ',')
+		state = temp[0]
+		state_char = PBS_STATES[state]
+		count_states[state] = count_states[state] + 1
+
+		if state == pbs.ND_free:
+			if len(node_attr) > 1:
+#				print 'TD: %s' % node.name, node_attr[1]
+				state_char = PBS_STATES[pbs_ND_single]
+				count_states[pbs.ND_free] = count_states[pbs.ND_free] - 1
+				count_states[pbs_ND_single] = count_states[pbs_ND_single] + 1
+
+#		print 'TD: %s %s' % (node.name, state_char)
+		node_dict[node.name] = state_char
+
+	legend = PBS_STATES.keys()
+	legend.sort()
+
+# print nodes with gb-r%dn%d naming scheme
+	print '  ',
+	for rack in xrange(1, N_RACKS+1):
+		print '%2d' % rack,
+	print
+
+	for node_nr in xrange(1, NODES_PER_RACK+1):
+		print '%2d' % node_nr,
+
+		for rack in xrange(1, N_RACKS+1):
+			node_name = 'gb-r%dn%d' % (rack, node_nr)
+
+			if node_dict.has_key(node_name):
+				print ' %s' % node_dict[node_name],
+
+				del node_dict[node_name]
+			else:
+				print '  ',
+
+		if node_nr-1 < len(legend):
+			state = legend[node_nr-1]
+			print '  %s  %-13s : %d' % (PBS_STATES[state], state, count_states[state])
+		else:
+			print
+
+	print
+
+# any other nodes?
+	arr = node_dict.keys()
+	if arr:
+		arr.sort()
+
+		for node in arr:
+			print '%s %s' % (node, node_dict[node])
+
+		print
+
+#	n = 0
+#	for state in legend:
+#		print '%s  %-13s : %-3d     ' % (PBS_STATES[state], state, count_states[state]),
+#		n = n + 1
+#		if n > 1:
+#			n = 0
+#			print
+
+
+if __name__ == '__main__':
+	pbsmon()
+
+
+# EOB
+
Index: /tags/4.6.0/examples/resmom_info.py
===================================================================
--- /tags/4.6.0/examples/resmom_info.py	(revision 342)
+++ /tags/4.6.0/examples/resmom_info.py	(revision 342)
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+#
+# Author: Bas van der Vlies <basv@sara.nl>
+# Date  : 27 Feb 2002
+# Desc. : This will query the pbs_mom daemon about its resources
+#
+# $Id$
+#
+import pbs
+import sys
+import time
+import socket
+
+def main():
+  server = pbs.pbs_default()
+  c      = pbs.pbs_connect(server)
+
+  nodes = pbs.pbs_statnode(c, '', 'NULL', 'NULL')
+
+  for node in nodes:
+    print node.name, ' :'
+    attrs = node.attribs
+    for attr in attrs:
+      print '\t%s = %s' %(attr.name, attr.value)
+
+    try:
+      mom_port = socket.getservbyname('pbs_resmon', 'tcp')
+    except socket.error:
+      mom_port = pbs.PBS_MANAGER_SERVICE_PORT
+
+    mom_id = pbs.openrm(node.name, mom_port)
+
+    mom_keys = pbs.get_mom_values(mom_id)
+    for key in mom_keys.keys():
+      print '\t%s = %s' %(key, mom_keys[key])
+
+    print '\nTesting list with user supplied keywords'
+
+    l = [ 'bas', 'ncpus', 'loadave' ]
+    mom_keys = pbs.get_mom_values(mom_id, l)
+    for key in mom_keys.keys():
+      print '\t%s = %s' %(key, mom_keys[key])
+    print ''
+    pbs.closerm(mom_id)
+
+
+main()
Index: /tags/4.6.0/examples/sara_nodes.py
===================================================================
--- /tags/4.6.0/examples/sara_nodes.py	(revision 342)
+++ /tags/4.6.0/examples/sara_nodes.py	(revision 342)
@@ -0,0 +1,640 @@
+#!/usr/bin/env python
+#
+# Author: Dennis Stam
+# Date  : 6th of September 2012
+#
+# Tested with Python 2.5, 2.6, 2.7 (should work for 3.0, 3.1, 3.2)
+#   sara_nodes uses the module argparse
+
+## The documenation, is shown when you type --help
+HELP_DESCRIPTION = '''This program is a great example what you can achieve with the pbs_python wrapper. You can use sara_nodes to change the state of a machine to offline with a reason. Several information is stored in the nodes note attribute. Information such as; date added, date last change, the username, ticket number (handy when you wan't to reference to an issue in your tracking system) and the message.'''
+HELP_EPILOG = '''The format argument uses the Python string formatting. Fields that can be used are; nodename, state, date_add, date_edit, username, ticket and note. For example sara_nodes -f '%(nodename)s;%(state)s' '''
+
+## This variable is used to sort by basename
+SPLIT_SORT = r'r\d+n\d+'
+## This RE pattern is used for the hostrange
+HOSTRANGE = r'\[([0-9az\-,]+)\]'
+## Which states are allowed to show in the print_overview
+ALLOWED_STATES = set(['down', 'offline', 'unknown'])
+
+import pbs
+import PBSQuery
+import re
+import sys
+import time
+import getpass
+import types
+
+## Use the cli arguments to change the values
+ARGS_QUIET      = False
+ARGS_VERBOSE    = False
+ARGS_DRYRUN     = False
+
+####
+## Rewriting the print function, so it will work with all versions of Python
+def _print(*args, **kwargs):
+    '''A wrapper function to make the functionality for the print function the same for Python2.4 and higher'''
+
+    ## First try if we are running in Python3 and higher
+    try:
+        Print = eval('print')
+        Print(*args, **kwargs)
+    except SyntaxError:
+        ## Then Python2.6 and Python2.7
+        try:
+            D = dict()
+            exec('from __future__ import print_function\np=print', D)
+            D['p'](*args, **kwargs)
+            del D
+        ## Finally Python2.5 or lower
+        except SyntaxError:
+            del D
+            fout    = kwargs.get('file', sys.stdout)
+            write   = fout.write
+            if args:
+                write(str(args[0]))
+                sep = kwargs.get('sep', ' ')
+                for arg in args[1:]:
+                    write(sep)
+                    write(str(a))
+                write(kwargs.get('end', '\n'))
+
+## Import argparse here, as I need the _print function
+try:
+    import argparse
+except ImportError:
+    _print('Cannot find argparse module', file=sys.stderr)
+    sys.exit(1)
+
+####
+## BEGIN functions for hostrange parsing
+def l_range(start, end):
+    '''The equivalent for the range function, but then with letters, uses the ord function'''
+    start = ord(start)
+    end   = ord(end)
+    rlist = list()
+
+    ## A ord number must be between 96 (a == 97) and 122 (z == 122)
+    if start < 96 or start > 122 and end < 96 or end > 122:
+        raise Exception('You can only use letters a to z')
+    ## If start is greater then end, then the range is invalid
+    elif start > end:
+        raise Exception('The letters must be in alphabetical order')
+    ## Just revert the ord number to the char
+    for letter in range(start, end + 1):
+        rlist.append(chr(letter))
+    return rlist
+
+def return_range(string):
+    '''This function will return the possible values for the given ranges'''
+
+    ## First check if the first char is valid
+    if string.startswith(',') or string.startswith('-'):
+        raise Exception('Given pattern is invalid, you can\'t use , and - at the beginning')
+
+    numbers_chars        = list()
+    equal_width_length  = 0
+
+    ## First splitup the sections (divided by ,)
+    for section in string.split(','):
+        ## Within a section you can have a range, max two values
+        chars = section.split('-')
+        if len(chars) == 2:
+            ## When range is a digit, simply use the range function
+            if chars[0].isdigit() and chars[1].isdigit():
+                ## Owke, check for equal_width_length
+                if chars[0][0] == '0' or chars[1][0] == '0':
+                    if len(chars[0]) >= len(chars[1]):
+                        equal_width_length = len(chars[0])
+                    else:
+                        equal_width_length = len(chars[1])
+                ## Don't forget the +1
+                numbers_chars += range(int(chars[0]), int(chars[1])+1)
+            ## If one of the two is a digit, raise an exception
+            elif chars[0].isdigit() or chars[1].isdigit():
+                raise Exception('I can\'t combine integers with letters, change your range please')
+            ## Else use the l_range
+            else:
+                numbers_chars += l_range(chars[0], chars[1])
+        else:
+            ## If the value of the section is a integer value, check if it has a 0
+            if section.isdigit() and section[0] == '0':
+                if len(section) > equal_width_length:
+                    equal_width_length = len(section)
+            numbers_chars.append(section)
+
+        ## if the equal_width length is greater then 0, rebuild the list
+        ## 01, 02, 03, ... 10
+        if equal_width_length > 0:
+            tmp_list = list()
+            for number_char in numbers_chars:
+                if type(number_char) is types.IntType or number_char.isdigit():
+                    tmp_list.append('%0*d' % ( equal_width_length, int(number_char)))
+                else:
+                    tmp_list.append(number_char)
+            numbers_chars = tmp_list
+
+    return numbers_chars
+
+def product(*args, **kwargs):
+    '''Taken from the python docs, does the same as itertools.product, 
+    but this also works for py2.5'''
+    pools = map(tuple, args) * kwargs.get('repeat', 1)
+    result = [[]]
+    for pool in pools:
+        result = [x+[y] for x in result for y in pool]
+    for prod in result:
+        yield tuple(prod)
+
+def parse_args(args):
+    rlist = list()
+    for arg in args:
+        parts = re.findall(HOSTRANGE, arg)
+        if parts:
+            ## create a formatter string, sub the matched patternn with %s
+            string_format = re.sub(HOSTRANGE, '%s', arg)
+            ranges = list()
+
+            ## detect the ranges in the parts
+            for part in parts:
+                ranges.append(return_range(part))
+            
+            ## produce the hostnames
+            for combination in product(*ranges):
+                rlist.append(string_format % combination)
+        else:
+            rlist.append(arg)
+    return rlist
+
+def get_nodes(jobs):
+
+    p = PBSQuery.PBSQuery()
+    nodes = list()
+
+    for job in jobs:
+        exec_hosts = p.getjob(job, ['exec_host'])
+        if not exec_hosts or 'exec_host' not in exec_hosts:
+            continue
+        for exec_host in exec_hosts['exec_host'][0].split('+'):
+            hostname = exec_host.split('/')[0]
+            if hostname not in nodes:
+                nodes.append(hostname)
+    return nodes
+
+## END functions for hostrange parsing
+####
+
+####
+## BEGIN functions for printing
+def _generate_index(string):
+    '''Is used to generate a index, this way we can also sort nummeric values in a string'''
+    return [ int(y) if y.isdigit() else y for y in re.split(r'(\d+)', string) ]
+
+def print_get_nodes(hosts=None):
+    '''This function retrieves the information from your batch environment'''
+    if ARGS_VERBOSE:
+        _print('func:print_get_nodes input:%s' % str(hosts), file=sys.stderr)
+
+    ## there are 2 possible filters, by hostname, or by state
+    pbsq         = PBSQuery.PBSQuery()
+    split_1     = dict()
+    split_2     = dict()
+
+    if ARGS_VERBOSE: 
+        _print('func:print_get_nodes fetching node information', file=sys.stderr)
+    ## We ask from the batch all nodes, and with the properties state and note
+    for host, properties in pbsq.getnodes(['state', 'note']).items():
+        do_host = None
+        ## Check if the current host matches our criterium (given with the arguments
+        ## or has the allowed state)
+        if hosts and host in hosts:
+            do_host = host
+        elif not hosts:
+            ## Do a intersection on both set's, if there is a match, then the host is allowed
+            if bool(ALLOWED_STATES.intersection(set(properties.state))):
+                do_host = host
+
+        ## when we have a do_host (means matches our criterium) then sort
+        ## them by basename
+        if do_host:
+            if SPLIT_SORT and re.findall(SPLIT_SORT, do_host):
+                split_1[host] = properties
+            else:
+                split_2[host] = properties
+    
+    if ARGS_VERBOSE: 
+        _print('func:print_get_nodes returning values', file=sys.stderr)
+    return split_1, split_2
+
+def print_process_dict(dictin):
+    '''This function processes the data from the batch system and make it for all hosts the same layout'''
+    if ARGS_VERBOSE: 
+        _print('func:print_process_dict input:%s' % str(dictin), file=sys.stderr)
+
+    line_print = list()
+    if ARGS_VERBOSE: 
+        _print('func:print_process_dict processing data', file=sys.stderr)
+
+    ## Generate a list containing a dictionary, so we can use the stringformatting functionality
+    ## of Python, fieldnames are: nodename, date_edit, date_add, username, ticket, note
+
+    ## Replaced real_sort with sorted, this means from 50 lines of code to 3
+    for host in sorted(dictin.keys(), key=_generate_index):
+        add_dict = dict()
+
+        add_dict['nodename'] = host
+        ## Glue the state list with a ,
+        add_dict['state'] = ", ".join(dictin[host]['state'] if dictin[host].has_key('state') else [])
+
+        ## Check if the given host has a note
+        note = dictin[host]['note'] if dictin[host].has_key('note') else []
+        if note:
+            add_dict['date_add']    = note[0]
+            add_dict['date_edit']   = note[1]
+            add_dict['username']    = note[2]
+            add_dict['ticket']      = note[3]
+            add_dict['note']        = ",".join(note[4:])
+
+            ## Create an extra date field, combined for date_edit and date_add
+            if add_dict['date_add'] and add_dict['date_edit']:
+                add_dict['date'] = '%s, %s' % (add_dict['date_add'], add_dict['date_edit'])
+            elif add_dict['date_add']:
+                add_dict['date'] = add_dict['date_add']
+            else:
+                add_dict['date'] = None
+
+        else:
+            ## If there is no note, just set the variables with a empty string
+            add_dict['date'] = add_dict['date_add'] = add_dict['date_edit'] = add_dict['username'] = add_dict['ticket'] = add_dict['note'] = ''
+
+        line_print.append(add_dict)
+
+    if ARGS_VERBOSE: 
+        _print('func:print_process_dict returning values', file=sys.stderr)
+    return line_print
+
+def print_create_list(values):
+    tmp_list = list()
+    for pair in values:
+        tmp_list.append('%-*s' % tuple(pair))
+    return tmp_list
+
+def print_overview_normal(hosts=None):
+    '''Print the default overview'''
+    if ARGS_VERBOSE: 
+        _print('func:print_overview_normal input:%s' % str(hosts), file=sys.stderr)
+
+    ## Determine some default values for the column width
+    w_nodename = 8
+    w_state = 5 
+    w_date = w_username = w_ticket = w_note = w_date_add = w_date_edit = 0
+
+    ## Get the data, make it one list, the rest first then the matched
+    matched, rest = print_get_nodes(hosts)
+    print_list = print_process_dict(rest)
+    print_list.extend(print_process_dict(matched))
+
+    ## Detect the max width for the columns
+    for line in print_list:
+        if line['nodename'] and len(line['nodename']) > w_nodename:
+            w_nodename = len(line['nodename'])
+        if line['state'] and len(line['state']) > w_state:
+            w_state = len(line['state'])
+        if line['date'] and len(line['date']) > w_date:
+            w_date = len(line['date'])
+        if line['date_add'] and len(line['date_add']) > w_date_add:
+            w_date_add = len(line['date_add'])
+        if line['date_edit'] and len(line['date_edit']) > w_date_edit:
+            w_date_edit = len(line['date_edit'])
+        if line['username'] and len(line['username']) > w_username:
+            w_username = len(line['username'])
+        if line['ticket'] and len(line['ticket']) > w_ticket:
+            w_ticket = len(line['ticket'])
+        if line['note'] and len(line['note']) > w_note:
+            w_note = len(line['note'])
+
+    ## The length of the full note
+    w_notefull  = w_date + w_username + w_ticket + w_note
+
+    if not ARGS_QUIET:
+        show_fields = [
+            [w_nodename, 'Nodename'],
+            [w_state, 'State'],
+        ]
+        if w_date > 0:
+            show_fields.append([w_date_add,'Added'])
+            show_fields.append([w_date_edit,'Modified'])
+            show_fields.append([w_username,'User'])
+            if w_ticket > 0:
+                if w_ticket < 6:
+                    w_ticket = 6
+                show_fields.append([w_ticket,'Ticket'])
+            show_fields.append([w_note,'Note'])
+
+        _print(' %s' % ' | '.join(print_create_list(show_fields)))
+        _print('+'.join([ '-' * (show_field[0]+2) for show_field in show_fields ]))
+
+    ## Show the information to the user
+    for line in print_list:
+        show_line_fields = [
+            [w_nodename, line['nodename']],
+            [w_state, line['state']],
+        ]
+        if w_date > 0:
+            show_line_fields.append([w_date_add,line['date_add']])
+            show_line_fields.append([w_date_edit,line['date_edit']])
+            show_line_fields.append([w_username,line['username']])
+            if w_ticket > 0:
+                show_line_fields.append([w_ticket,line['ticket']])
+            show_line_fields.append([w_note,line['note']])
+
+        _print(' %s' % ' | '.join(print_create_list(show_line_fields)))
+
+def print_overview_format(hosts=None, format=None):
+    '''Print the information in a certain format, when you want to use it in a
+    different program'''
+
+    matched, rest = print_get_nodes(hosts)
+    print_list = print_process_dict(rest)
+    print_list.extend(print_process_dict(matched))
+
+    for line in print_list:
+        _print(format % line)
+## END functions for printing
+####
+
+class SaraNodes(object):
+    '''This class is used to communicate with the batch server'''
+
+    ticket      = None
+
+    def _get_current_notes(self, nodes):
+        '''A function to retrieve the current message'''
+        if ARGS_VERBOSE: 
+            _print('class:SaraNodes func:_get_current_notes input:%s' % str(nodes), file=sys.stderr)
+
+        pbsq = PBSQuery.PBSQuery()
+        rdict = dict()
+
+        ## We are only intereseted in the note
+        for node, properties in pbsq.getnodes(['note']).items():
+            if node in nodes and properties.has_key('note'):
+                rdict[node] = properties['note']
+        return rdict
+
+    def _get_curdate(self):
+        '''Returns the current time'''
+        if ARGS_VERBOSE: 
+            _print('class:SaraNodes func:_get_curdate', file=sys.stderr)
+        return time.strftime('%d-%m %H:%M', time.localtime())
+
+    def _get_uid(self, prev_uid=None):
+        '''Get the username'''
+        if ARGS_VERBOSE: 
+            _print('class:SaraNodes func:_get_uid input:%s' % prev_uid, file=sys.stderr)
+        cur_uid = getpass.getuser()
+        if prev_uid and cur_uid == 'root':
+            return prev_uid
+        return cur_uid
+
+    def _get_ticket(self, prev_ticket=None):        
+        '''Check if we already have a ticket number'''
+        if ARGS_VERBOSE: 
+            _print('class:SaraNodes func:_get_ticket input:%s' % prev_ticket, file=sys.stderr)
+        cur_ticket = '#%s' % self.ticket
+        if prev_ticket and cur_ticket == prev_ticket:
+            return prev_ticket
+        elif self.ticket and self.ticket.isdigit():
+            return cur_ticket
+        elif self.ticket in ['c','clear','N',]:
+            return ''
+        elif prev_ticket:
+            return prev_ticket
+        return ''
+
+    def _generate_note(self, nodes=None, note=None, append=True):
+        '''Generates the node in a specific format'''
+        if ARGS_VERBOSE: 
+            _print('class:SaraNodes func:_generate_note input:%s,%s,%s' % (str(nodes), note, str(append)), file=sys.stderr)
+
+        ## First step, is to get the current info of a host
+        cur_data = self._get_current_notes(nodes)
+        rdict = dict()
+
+        for node in nodes:
+            date_add = date_edit = username = ticket = nnote = None
+            if node in cur_data.keys():
+                date_add    = cur_data[node][0]
+                date_edit   = self._get_curdate()
+                username    = self._get_uid(cur_data[node][2])
+                ticket      = self._get_ticket(cur_data[node][3])
+                nnote       = ",".join(cur_data[node][4:])
+            else:
+                date_add = date_edit = self._get_curdate()
+                username = self._get_uid()
+                ticket   = self._get_ticket()
+                nnote    = None
+
+            if nnote and append and note:
+                nnote = '%s, %s' % (nnote, note)
+            elif note:
+                nnote = note
+
+            rdict[node] = '%s,%s,%s,%s,%s' % (date_add, date_edit, username, ticket, nnote)
+        return rdict
+
+    def do_offline(self, nodes, note):
+        '''Change the state of node(s) to offline with a specific note'''
+
+        if ARGS_VERBOSE: 
+            _print('class:SaraNodes func:do_offline input:%s,%s' % (str(nodes), note), file=sys.stderr)
+        attributes          = pbs.new_attropl(2)
+        attributes[0].name  = pbs.ATTR_NODE_state
+        attributes[0].value = 'offline'
+        attributes[0].op    = pbs.SET
+        attributes[1].name  = pbs.ATTR_NODE_note
+        attributes[1].op    = pbs.SET
+
+        batch_list = list()
+
+        ## again a loop, now create the attrib dict list
+        for node, note in self._generate_note(nodes, note).items():
+            attributes[1].value = note
+            batch_list.append(tuple([node, attributes]))
+
+        self._process(batch_list)
+
+    def do_clear(self, nodes):
+        '''Clear the state on a node(s) to down, also clear the note'''
+
+        if ARGS_VERBOSE: 
+            _print('class:SaraNodes func:do_clear input:%s' % str(nodes), file=sys.stderr)
+        attributes          = pbs.new_attropl(2)
+        attributes[0].name  = pbs.ATTR_NODE_state
+        attributes[0].value = 'down'
+        attributes[0].op    = pbs.SET
+        attributes[1].name  = pbs.ATTR_NODE_note
+        attributes[1].op    = pbs.SET
+        attributes[1].value = ''
+
+        batch_list = list()
+
+        ## again a loop, now create the attrib dict list
+        for node in nodes:
+            batch_list.append(tuple([node, attributes]))
+
+        self._process(batch_list)
+  
+    def do_modify(self, nodes, note):
+        '''Modify the note on a node, override the previous note'''
+
+        if ARGS_VERBOSE: 
+            _print('class:SaraNodes func:do_modify input:%s,%s' % (str(nodes), note), file=sys.stderr)
+        attributes          = pbs.new_attropl(1)
+        attributes[0].name  = pbs.ATTR_NODE_note
+        attributes[0].op    = pbs.SET
+
+        batch_list = list()
+
+        ## again a loop, now create the attrib dict list
+        for node, note in self._generate_note(nodes, note, append=False).items():
+            attributes[0].value = note
+            batch_list.append(tuple([node, attributes]))
+
+        self._process(batch_list)
+
+    def do_clear_note(self, nodes):
+        '''Clear the  note on the node(s)'''
+
+        if ARGS_VERBOSE: 
+            _print('class:SaraNodes func:do_clear_note input:%s' % str(nodes), file=sys.stderr)
+        attributes          = pbs.new_attropl(1)
+        attributes[0].name  = pbs.ATTR_NODE_note
+        attributes[0].op    = pbs.SET
+        attributes[0].value = ''
+
+        batch_list = list()
+
+        ## again a loop, now create the attrib dict list
+        for node in nodes:
+            batch_list.append(tuple([node, attributes]))
+
+        self._process(batch_list)
+
+    def _process(self, batch_list):
+        '''This function execute the change to the batch server'''
+
+        if ARGS_VERBOSE: 
+            _print('class:SaraNodes func:_process input:%s' % str(batch_list), file=sys.stderr)
+
+        ## Always get the pbs_server name, even in dry-run mode
+        pbs_server = pbs.pbs_default()
+        if not pbs_server:
+            _print('Could not locate a pbs server', file=sys.stderr)
+            sys.exit(1)
+
+        if ARGS_VERBOSE:
+            _print('class:SaraNodes func:_process pbs_server:%s' % pbs_server, file=sys.stderr)
+
+        ## If dry-run is not specified create a connection
+        if not ARGS_DRYRUN:
+            pbs_connection = pbs.pbs_connect(pbs_server)
+
+        ## Execute the changes
+        for node in batch_list:
+            if not ARGS_DRYRUN:
+                pbs_connection = pbs.pbs_connect(pbs_server)
+                rcode = pbs.pbs_manager(pbs_connection, pbs.MGR_CMD_SET, pbs.MGR_OBJ_NODE, node[0], node[1], 'NULL')
+                if rcode > 0:
+                    errno, text = pbs.error()
+                    _print('PBS error for node \'%s\': %s (%s)' % (node[0], text, errno), file=sys.stderr)
+            else:
+                _print("pbs.pbs_manager(pbs_connection, pbs.MGR_CMD_SET, pbs.MGR_OBJ_NODE, %s, %s, 'NULL')" % (node[0], str(node[1])))
+
+        ## Close the connection with the batch system
+        if not ARGS_DRYRUN:
+            pbs.pbs_disconnect(pbs_connection)
+
+if __name__ == '__main__':
+    ## The arguments of sara_nodes
+    parser = argparse.ArgumentParser(
+        description=HELP_DESCRIPTION,
+        epilog=HELP_EPILOG,
+    )
+    parser.add_argument('nodes', metavar='NODES', nargs='*', type=str)
+    parser.add_argument('-j', '--jobs', action='store_true', help='use job id\'s instead of nodenames')
+    parser.add_argument('-v','--verbose', action='store_true', help='enables verbose mode')
+    parser.add_argument('-n','--dry-run', action='store_true', help='enables dry-run mode')
+    parser.add_argument('-q','--quiet', action='store_true', help='enables to supress all feedback')
+    parser.add_argument('-o','--offline', metavar='NOTE', help='change state to offline with message')
+    parser.add_argument('-m','--modify', metavar='NOTE', help='change the message of a node')
+    parser.add_argument('-c','--clear', action='store_true', help='change the state to down')
+    parser.add_argument('-N','--clear-note', action='store_true', help='clear the message of a node')
+    parser.add_argument('-f','--format', metavar='FORMAT', help='change the output of sara_nodes (see footer of --help)')
+    parser.add_argument('-t','--ticket', metavar='TICKET', help='add a ticket number to a node')
+    parser.add_argument('--version', action='version', version=pbs.version)
+
+    ## Parse the arguments
+    args = parser.parse_args()
+
+    ## The options quiet, verbose and dry-run are processed first
+    if args.quiet: 
+        ARGS_QUIET = True
+    if args.verbose: 
+        ARGS_VERBOSE = True
+    if args.dry_run: 
+        ARGS_DRYRUN = ARGS_VERBOSE = True
+
+    if ARGS_VERBOSE: 
+        _print('func:__main__ checking type of operation', file=sys.stderr)
+
+    if args.nodes and args.jobs:
+        args.nodes = get_nodes(args.nodes)
+    elif args.nodes:
+        args.nodes = parse_args(args.nodes)
+
+    ## If offline, modify, clear, clear_note or ticket then initiate the SaraNodes class
+    if args.offline or args.modify or args.clear or args.clear_note or args.ticket:
+        if not args.nodes:
+            _print('You did not specify any nodes, see --help', file=sys.stderr)
+            sys.exit(1)
+
+        sn = SaraNodes()
+        if args.ticket: 
+            sn.ticket = args.ticket 
+
+        if args.offline:
+            if ARGS_VERBOSE: 
+                _print('func:__main__ call sn.do_offline', file=sys.stderr)
+            sn.do_offline(args.nodes, args.offline)
+        elif args.modify:
+            if ARGS_VERBOSE: 
+                _print('func:__main__ call sn.do_modify', file=sys.stderr)
+            sn.do_modify(args.nodes, args.modify)
+        elif args.clear:
+            if ARGS_VERBOSE: 
+                _print('func:__main__ call sn.do_clear', file=sys.stderr)
+            sn.do_clear(args.nodes)
+        elif args.clear_note:
+            if ARGS_VERBOSE: 
+                _print('func:__main__ call sn.do_clear_note', file=sys.stderr)
+            sn.do_clear_note(args.nodes)
+        elif args.ticket:
+            if ARGS_VERBOSE: 
+                _print('func:__main__ call sn.do_modify')
+            sn.do_offline(args.nodes, '')
+    else:
+        if ARGS_DRYRUN:
+            _print('Dry-run is not available when we use PBSQuery', file=sys.stderr)
+
+        if args.format:
+            if ARGS_VERBOSE: 
+                _print('func:__main__ call print_overview_format', file=sys.stderr)
+            print_overview_format(args.nodes, args.format)
+        else:
+            if ARGS_VERBOSE: 
+                _print('func:__main__ call print_overview_normal', file=sys.stderr)
+            print_overview_normal(args.nodes)
+   
+    if ARGS_VERBOSE: 
+        _print('func:__main__ exit', file=sys.stderr)
Index: /tags/4.6.0/examples/set_property.py
===================================================================
--- /tags/4.6.0/examples/set_property.py	(revision 342)
+++ /tags/4.6.0/examples/set_property.py	(revision 342)
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+#
+# Author: Bas van der Vlies <basv@sara.nl>
+# Date  : 17 Aug 2001
+# Desc. : Set a node property
+#
+# CVS info:
+# $Id$
+#
+#
+#
+import sys
+import pbs
+
+def main():
+  pbs_server = pbs.pbs_default()
+  if not pbs_server:
+    print 'No default server'
+    sys.exit(1)
+
+  if len(sys.argv) < 2:
+  	print "Usage: set_property.py <hostname>"
+	sys.exit(1)
+
+  hostname = sys.argv[1]
+
+  con = pbs.pbs_connect(pbs_server)
+
+  attrop_l = pbs.new_attropl(1)
+  attrop_l[0].name  = 'note'
+  attrop_l[0].value = 'set_something_useful'
+  attrop_l[0].op    = pbs.SET
+
+  r =  pbs.pbs_manager(con, pbs.MGR_CMD_SET, pbs.MGR_OBJ_NODE, 
+                    hostname, attrop_l, 'NULL')
+
+  if r > 0:
+    print r, ";"
+    errno, text = pbs.error() 
+    print errno, text
+
+main()
Index: /tags/4.6.0/pbs_python.spec
===================================================================
--- /tags/4.6.0/pbs_python.spec	(revision 342)
+++ /tags/4.6.0/pbs_python.spec	(revision 342)
@@ -0,0 +1,60 @@
+%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+
+### Abstract ###
+
+Name: pbs_python
+Version: 4.6.0
+Release: 1%{?dist}
+License: See LICENSE
+Group: Development/Libraries
+Summary: This package contains the PBS python module.
+URL: https://oss.trac.surfsara.nl/pbs_python
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+Source: ftp://ftp.sara.nl/pub/outgoing/pbs_python.tar.gz 
+
+### Dependencies ###
+# None
+
+### Build Dependencies ###
+
+BuildRequires: libtorque-devel >= %{libtorque_version}
+BuildRequires: python2-devel >= %{python_version}
+
+%description
+This package contains the pbs python module.
+
+%prep
+%setup -q -n pbs_python-%{version}
+
+%build
+%configure
+%{__python} setup.py build
+
+%install
+%{__python} ./setup.py install --prefix $RPM_BUILD_ROOT%{_prefix} ;
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,0755)
+%doc README TODO examples
+%{python_sitearch}/pbs.pth
+%{python_sitearch}/pbs/*
+
+%changelog
+* Tue Mar 24 2010 Ramon Bastiaans <ramon.bastiaans@sara.nl>
+- Updates for new version
+* Tue Oct 06 2009 Ramon Bastiaans <ramon.bastiaans@sara.nl>
+- Fixed tmppath, %setup sourcedir
+* Tue Mar 24 2009 David Chin <chindw@wfu.edu>
+- Fedora-ize
+* Sun Mar  9 2008 Michael Sternberg <sternberg@anl.gov>
+- libdir and python defines
+* Wed Nov 23 2005 Ramon Bastiaans <bastiaans@sara.nl>
+- Fixed missing prep setup and added configure
+* Tue Nov 22 2005 Martin Pels <pels@sara.nl>
+- Changed default directory permissions
+* Tue Nov 01 2005 Martin Pels <pels@sara.nl> 
+- Initial version
+
Index: /tags/4.6.0/release.json
===================================================================
--- /tags/4.6.0/release.json	(revision 342)
+++ /tags/4.6.0/release.json	(revision 342)
@@ -0,0 +1,7 @@
+{
+  "version": "4.6.0",
+  "changes": "Support added for torque 5.X (rm interface does not work), PBSQuery had been update to new cpuid range for torque 5 and  new_rack_pbsmon.py has an new option -j/--job. It will show the nodes that are used by the specified job ",
+  "state": "stable",
+  "scope": "bug fixes",
+  "download": "ftp://ftp.surfsara.nl/pub/outgoing/pbs_python-4.6.0.tar.gz"
+}
Index: /tags/4.6.0/setup.py.in
===================================================================
--- /tags/4.6.0/setup.py.in	(revision 342)
+++ /tags/4.6.0/setup.py.in	(revision 342)
@@ -0,0 +1,110 @@
+#!/usr/bin/env python
+#
+# $Id: setup.py 434 2005-11-04 15:02:07Z bas $
+#
+# set ts=4
+#
+
+import sys
+import os
+import glob
+
+from distutils.core import setup, Extension 
+from distutils.version import LooseVersion
+
+# Strip off the -L it is also added by the python setup tools
+#
+PBS_LIB_COMPILE_LINE='@pbs_library_compile_line@'
+PBS_LIB_DIR='@pbs_library_dir@'
+
+if not PBS_LIB_DIR:
+    print 'Please specify where the PBS libraries are!!'
+    print 'edit setup.py and fill in the PBS_LIB_DIR variable'
+    sys.exit(1)
+
+LIBS = ['torque']
+
+VERSION = "@pbs_version@"
+SOURCE_DIR='src'
+
+os.chdir(SOURCE_DIR)
+
+try:
+    os.unlink('pbs.py')
+except OSError:
+    pass
+
+if LooseVersion(VERSION) >= LooseVersion('5.0'):
+
+    inc=os.environ.get('PBS_PYTHON_INCLUDEDIR','/usr/include/torque')
+    os.environ['CC']='g++'
+    os.environ['CFLAGS']=' '.join(os.environ.get('CFLAGS','').split(' ')+['-I%s'%inc]) 
+    
+    if not os.path.exists(os.path.join(inc,'log.h')):
+        print 'Failed to find log.h in include dir %s. (Set include dir via PBS_PYTHON_INCLUDEDIR variable)'%inc
+        sys.exit(2)
+  
+    for fn in glob.glob('*.h'):
+        os.remove(fn)
+     
+    TORQUE_VERSION='TORQUE_5'
+    SOURCE_FILE='src/5.x/pbs_wrap.cxx'
+
+    os.symlink('5.x/pbs.py', 'pbs.py')
+
+elif LooseVersion(VERSION) >= LooseVersion('4.2'):
+
+    inc=os.environ.get('PBS_PYTHON_INCLUDEDIR','/usr/include/torque')
+    os.environ['CC']='g++'
+    os.environ['CFLAGS']=' '.join(os.environ.get('CFLAGS','').split(' ')+['-I%s'%inc]) 
+    
+    if not os.path.exists(os.path.join(inc,'log.h')):
+        print 'Failed to find log.h in include dir %s. (Set include dir via PBS_PYTHON_INCLUDEDIR variable)'%inc
+        sys.exit(2)
+  
+    for fn in glob.glob('*.h'):
+        os.remove(fn)
+     
+    TORQUE_VERSION='TORQUE_4'
+    SOURCE_FILE='src/C++/pbs_wrap.cxx'
+
+    os.symlink('C++/pbs.py', 'pbs.py')
+
+elif LooseVersion(VERSION) >= LooseVersion('2.4'):
+
+    TORQUE_VERSION='TORQUE_2'
+    SOURCE_FILE='src/C/pbs_wrap.c'
+
+    os.symlink('C/pbs.py', 'pbs.py')
+
+else:
+
+    print "Version: %s is not supported" %(VERSION)
+    sys.exit(1)
+
+
+os.chdir('..')
+
+setup ( 
+    name = 'pbs_python',
+    version = '4.4.1',
+    description = 'openpbs/torque python interface',
+    license = 'LGPLV3',
+    author = 'Bas van der Vlies',
+    author_email = 'bas.vandervlies@surfsara.nl',
+    url = 'http://oss.trac.surfsara.nl/pbs_python',
+
+
+    extra_path = 'pbs',
+        package_dir = { '' : SOURCE_DIR }, 
+        py_modules = [ 'pbs',  'PBSQuery'], 
+
+    ext_modules = [ 
+        Extension( '_pbs', [SOURCE_FILE],
+        library_dirs = [ PBS_LIB_DIR ],
+        extra_link_args = [ PBS_LIB_COMPILE_LINE ],
+        define_macros =  [ (TORQUE_VERSION, None) ],
+        libraries = LIBS,
+        ) 
+    ]
+)
Index: /tags/4.6.0/src/5.x/log.h
===================================================================
--- /tags/4.6.0/src/5.x/log.h	(revision 342)
+++ /tags/4.6.0/src/5.x/log.h	(revision 342)
@@ -0,0 +1,227 @@
+/*
+*         OpenPBS (Portable Batch System) v2.3 Software License
+*
+* Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+* All rights reserved.
+*
+* ---------------------------------------------------------------------------
+* For a license to use or redistribute the OpenPBS software under conditions
+* other than those described below, or to purchase support for this software,
+* please contact Veridian Systems, PBS Products Department ("Licensor") at:
+*
+*    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+*                        877 902-4PBS (US toll-free)
+* ---------------------------------------------------------------------------
+*
+* This license covers use of the OpenPBS v2.3 software (the "Software") at
+* your site or location, and, for certain users, redistribution of the
+* Software to other sites and locations.  Use and redistribution of
+* OpenPBS v2.3 in source and binary forms, with or without modification,
+* are permitted provided that all of the following conditions are met.
+* After December 31, 2001, only conditions 3-6 must be met:
+*
+* 1. Commercial and/or non-commercial use of the Software is permitted
+*    provided a current software registration is on file at www.OpenPBS.org.
+*    If use of this software contributes to a publication, product, or
+*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
+*
+* 2. Redistribution in any form is only permitted for non-commercial,
+*    non-profit purposes.  There can be no charge for the Software or any
+*    software incorporating the Software.  Further, there can be no
+*    expectation of revenue generated as a consequence of redistributing
+*    the Software.
+*
+* 3. Any Redistribution of source code must retain the above copyright notice
+*    and the acknowledgment contained in paragraph 6, this list of conditions
+*    and the disclaimer contained in paragraph 7.
+*
+* 4. Any Redistribution in binary form must reproduce the above copyright
+*    notice and the acknowledgment contained in paragraph 6, this list of
+*    conditions and the disclaimer contained in paragraph 7 in the
+*    documentation and/or other materials provided with the distribution.
+*
+* 5. Redistributions in any form must be accompanied by information on how to
+*    obtain complete source code for the OpenPBS software and any
+*    modifications and/or additions to the OpenPBS software.  The source code
+*    must either be included in the distribution or be available for no more
+*    than the cost of distribution plus a nominal fee, and all modifications
+*    and additions to the Software must be freely redistributable by any party
+*    (including Licensor) without restriction.
+*
+* 6. All advertising materials mentioning features or use of the Software must
+*    display the following acknowledgment:
+*
+*     "This product includes software developed by NASA Ames Research Center,
+*     Lawrence Livermore National Laboratory, and Veridian Information
+*     Solutions, Inc.
+*     Visit www.OpenPBS.org for OpenPBS software support,
+*     products, and information."
+*
+* 7. DISCLAIMER OF WARRANTY
+*
+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+* ARE EXPRESSLY DISCLAIMED.
+*
+* IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+* U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* This license will be governed by the laws of the Commonwealth of Virginia,
+* without reference to its choice of law rules.
+*/
+
+/*
+ * include file for error/event logging
+ */
+
+#ifndef LOG_H
+#define LOG_H
+
+#include <pthread.h>
+#define LOG_BUF_SIZE        16384
+#define LOCAL_LOG_BUF_SIZE  5096
+
+/* The following macro assist in sharing code between the Server and Mom */
+#define LOG_EVENT log_event
+
+/*
+** Set up a debug print macro.
+*/
+#ifdef NDEBUG
+#define DBPRT(x)
+#else
+#define DBPRT(x) printf x;
+#endif  /* END NDEBUG */
+
+#if SYSLOG
+#include <syslog.h>
+#endif /* SYSLOG */
+
+#if !SYSLOG
+/* define syslog constants that can be used in code regardless of whether we
+ * are using syslog or not! */
+
+#ifndef LOG_EMERG
+#define LOG_EMERG 1
+#endif
+
+#ifndef LOG_ALERT
+#define LOG_ALERT 2
+#endif
+
+#ifndef LOG_CRIT
+#define LOG_CRIT 3
+#endif
+
+#ifndef LOG_ERR
+#define LOG_ERR 4 
+#endif
+
+#ifndef LOG_ERR
+#define LOG_ERR 5 
+#endif
+
+#ifndef LOG_WARNING
+#define LOG_WARNING 6
+#endif
+
+#ifndef LOG_NOTICE
+#define LOG_NOTICE 7
+#endif
+
+#ifndef LOG_INFO
+#define LOG_INFO 8
+#endif
+
+#ifndef LOG_DEBUG
+#define LOG_DEBUG 9
+#endif
+#endif /* SYSLOG */
+
+#define MAXLINE 1024
+
+enum getter_setter { GETV, SETV };
+typedef enum getter_setter SGetter;
+
+// extern int LOGLEVEL;
+
+extern long *log_event_mask;
+extern pthread_mutex_t log_mutex;
+extern pthread_mutex_t job_log_mutex;
+
+/* set this to non-zero in calling app if errors go to stderr */
+extern int   chk_file_sec_stderr;
+
+/* extern void log_close (int); */
+/* extern void job_log_close (int); */
+void log_err (int, const char *, const char *);
+void log_ext (int, const char *, const char *,int);
+void log_event (int, int, const char *, const char *);
+/* extern int  log_open (char *, char *); */
+/* extern int  job_log_open (char *, char *); */
+void log_record (int, int, const char *, const char *);
+bool log_available(int eventtype);
+/* extern void log_roll (int); */
+/* extern long log_size (void); */
+/* extern long job_log_size (void); */
+/* extern int  log_remove_old (char *,unsigned long); */
+extern char log_buffer[LOG_BUF_SIZE];
+int log_init(const char *suffix, const char *hostname);
+
+/* extern int  IamRoot (void); */
+/* #ifdef __CYGWIN__ */
+/* extern int  IamAdminByName (char *); */
+/* extern int  IamUser (void); */
+/* extern int  IamUserByName (char *); */
+/* #endif  __CYGWIN__ */
+
+int chk_file_sec( const char *path, int isdir, int sticky, int disallow, int fullpath, char *SEMsg);
+/* extern int  setup_env (char *); */
+
+/* Event types */
+
+#define PBSEVENT_ERROR  0x0001  /* internal errors       */
+#define PBSEVENT_SYSTEM  0x0002  /* system (server) & (trqauthd) events     */
+#define PBSEVENT_ADMIN  0x0004  /* admin events        */
+#define PBSEVENT_JOB  0x0008  /* job related events       */
+#define PBSEVENT_JOB_USAGE 0x0010  /* End of Job accounting      */
+#define PBSEVENT_SECURITY 0x0020  /* security violation events  */
+#define PBSEVENT_SCHED  0x0040  /* scheduler events       */
+#define PBSEVENT_DEBUG  0x0080  /* common debug messages      */
+#define PBSEVENT_DEBUG2  0x0100  /* less needed debug messages */
+#define PBSEVENT_CLIENTAUTH 0X0200 /* TRQAUTHD login events */
+#define PBSEVENT_SYSLOG 0x0400   /* pass this event to the syslog as well (if defined) */
+#define PBSEVENT_FORCE  0x8000  /* set to force a message     */
+
+/* Event Object Classes, see array class_names[] in ../lib/Liblog/pbs_log.c   */
+
+#define PBS_EVENTCLASS_SERVER 1 /* The server itself */
+#define PBS_EVENTCLASS_QUEUE 2 /* Queues  */
+#define PBS_EVENTCLASS_JOB 3 /* Jobs   */
+#define PBS_EVENTCLASS_REQUEST 4 /* Batch Requests */
+#define PBS_EVENTCLASS_FILE 5 /* A Job related File */
+#define PBS_EVENTCLASS_ACCT 6 /* Accounting info */
+#define PBS_EVENTCLASS_NODE 7 /* Nodes           */
+#define PBS_EVENTCLASS_TRQAUTHD 8 /* trqauthd */
+
+/* Logging Masks */
+
+#define PBSEVENT_MASK  0x01ff
+
+/* definition's for pbs_log.c's log_remove_old() function */
+#define MAX_PATH_LEN    1024  /* maximum possible length of any path */
+#define SECS_PER_DAY     86400
+
+#if !defined(TRUE) || !defined(FALSE)
+#define TRUE 1
+#define FALSE 0
+#endif /* !defined(TRUE) || !defined(FALSE) */
+
+#endif /* ifndef LOG_H */
Index: /tags/4.6.0/src/5.x/pbs.py
===================================================================
--- /tags/4.6.0/src/5.x/pbs.py	(revision 342)
+++ /tags/4.6.0/src/5.x/pbs.py	(revision 342)
@@ -0,0 +1,1014 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 2.0.7
+#
+# Do not make changes to this file unless you know what you are doing--modify
+# the SWIG interface file instead.
+
+
+
+from sys import version_info
+if version_info >= (2,6,0):
+    def swig_import_helper():
+        from os.path import dirname
+        import imp
+        fp = None
+        try:
+            fp, pathname, description = imp.find_module('_pbs', [dirname(__file__)])
+        except ImportError:
+            import _pbs
+            return _pbs
+        if fp is not None:
+            try:
+                _mod = imp.load_module('_pbs', fp, pathname, description)
+            finally:
+                fp.close()
+            return _mod
+    _pbs = swig_import_helper()
+    del swig_import_helper
+else:
+    import _pbs
+del version_info
+try:
+    _swig_property = property
+except NameError:
+    pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+    if (name == "thisown"): return self.this.own(value)
+    if (name == "this"):
+        if type(value).__name__ == 'SwigPyObject':
+            self.__dict__[name] = value
+            return
+    method = class_type.__swig_setmethods__.get(name,None)
+    if method: return method(self,value)
+    if (not static):
+        self.__dict__[name] = value
+    else:
+        raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+    return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+    if (name == "thisown"): return self.this.own()
+    method = class_type.__swig_getmethods__.get(name,None)
+    if method: return method(self)
+    raise AttributeError(name)
+
+def _swig_repr(self):
+    try: strthis = "proxy of " + self.this.__repr__()
+    except: strthis = ""
+    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+try:
+    _object = object
+    _newclass = 1
+except AttributeError:
+    class _object : pass
+    _newclass = 0
+
+
+
+def new_attrl(*args):
+  return _pbs.new_attrl(*args)
+new_attrl = _pbs.new_attrl
+
+def new_attropl(*args):
+  return _pbs.new_attropl(*args)
+new_attropl = _pbs.new_attropl
+
+def new_batch_status():
+  return _pbs.new_batch_status()
+new_batch_status = _pbs.new_batch_status
+
+def get_error():
+  return _pbs.get_error()
+get_error = _pbs.get_error
+class attrlArray(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, attrlArray, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, attrlArray, name)
+    __repr__ = _swig_repr
+    def __init__(self, *args): 
+        this = _pbs.new_attrlArray(*args)
+        try: self.this.append(this)
+        except: self.this = this
+    __swig_destroy__ = _pbs.delete_attrlArray
+    __del__ = lambda self : None;
+    def __getitem__(self, *args): return _pbs.attrlArray___getitem__(self, *args)
+    def __setitem__(self, *args): return _pbs.attrlArray___setitem__(self, *args)
+    def cast(self): return _pbs.attrlArray_cast(self)
+    __swig_getmethods__["frompointer"] = lambda x: _pbs.attrlArray_frompointer
+    if _newclass:frompointer = staticmethod(_pbs.attrlArray_frompointer)
+attrlArray_swigregister = _pbs.attrlArray_swigregister
+attrlArray_swigregister(attrlArray)
+
+def attrlArray_frompointer(*args):
+  return _pbs.attrlArray_frompointer(*args)
+attrlArray_frompointer = _pbs.attrlArray_frompointer
+
+ATTR_a = _pbs.ATTR_a
+ATTR_c = _pbs.ATTR_c
+ATTR_e = _pbs.ATTR_e
+ATTR_f = _pbs.ATTR_f
+ATTR_g = _pbs.ATTR_g
+ATTR_h = _pbs.ATTR_h
+ATTR_j = _pbs.ATTR_j
+ATTR_k = _pbs.ATTR_k
+ATTR_l = _pbs.ATTR_l
+ATTR_m = _pbs.ATTR_m
+ATTR_o = _pbs.ATTR_o
+ATTR_p = _pbs.ATTR_p
+ATTR_q = _pbs.ATTR_q
+ATTR_r = _pbs.ATTR_r
+ATTR_t = _pbs.ATTR_t
+ATTR_array_id = _pbs.ATTR_array_id
+ATTR_u = _pbs.ATTR_u
+ATTR_v = _pbs.ATTR_v
+ATTR_A = _pbs.ATTR_A
+ATTR_args = _pbs.ATTR_args
+ATTR_reservation_id = _pbs.ATTR_reservation_id
+ATTR_login_node_id = _pbs.ATTR_login_node_id
+ATTR_login_prop = _pbs.ATTR_login_prop
+ATTR_external_nodes = _pbs.ATTR_external_nodes
+ATTR_multi_req_alps = _pbs.ATTR_multi_req_alps
+ATTR_M = _pbs.ATTR_M
+ATTR_N = _pbs.ATTR_N
+ATTR_S = _pbs.ATTR_S
+ATTR_depend = _pbs.ATTR_depend
+ATTR_inter = _pbs.ATTR_inter
+ATTR_stagein = _pbs.ATTR_stagein
+ATTR_stageout = _pbs.ATTR_stageout
+ATTR_jobtype = _pbs.ATTR_jobtype
+ATTR_submit_host = _pbs.ATTR_submit_host
+ATTR_init_work_dir = _pbs.ATTR_init_work_dir
+ATTR_pbs_o_initdir = _pbs.ATTR_pbs_o_initdir
+ATTR_pbs_o_rootdir = _pbs.ATTR_pbs_o_rootdir
+ATTR_pbs_o_workdir = _pbs.ATTR_pbs_o_workdir
+ATTR_pbs_o_host = _pbs.ATTR_pbs_o_host
+ATTR_pbs_o_server = _pbs.ATTR_pbs_o_server
+ATTR_pbs_o_home = _pbs.ATTR_pbs_o_home
+ATTR_pbs_o_logname = _pbs.ATTR_pbs_o_logname
+ATTR_pbs_o_path = _pbs.ATTR_pbs_o_path
+ATTR_pbs_o_mail = _pbs.ATTR_pbs_o_mail
+ATTR_pbs_o_shell = _pbs.ATTR_pbs_o_shell
+ATTR_pbs_o_tz = _pbs.ATTR_pbs_o_tz
+ATTR_pbs_o_lang = _pbs.ATTR_pbs_o_lang
+ATTR_pbs_o_uid = _pbs.ATTR_pbs_o_uid
+ATTR_pbs_o_submit_filter = _pbs.ATTR_pbs_o_submit_filter
+ATTR_ctime = _pbs.ATTR_ctime
+ATTR_exechost = _pbs.ATTR_exechost
+ATTR_execport = _pbs.ATTR_execport
+ATTR_mtime = _pbs.ATTR_mtime
+ATTR_qtime = _pbs.ATTR_qtime
+ATTR_session = _pbs.ATTR_session
+ATTR_euser = _pbs.ATTR_euser
+ATTR_egroup = _pbs.ATTR_egroup
+ATTR_hashname = _pbs.ATTR_hashname
+ATTR_hopcount = _pbs.ATTR_hopcount
+ATTR_security = _pbs.ATTR_security
+ATTR_sched_hint = _pbs.ATTR_sched_hint
+ATTR_substate = _pbs.ATTR_substate
+ATTR_name = _pbs.ATTR_name
+ATTR_owner = _pbs.ATTR_owner
+ATTR_used = _pbs.ATTR_used
+ATTR_state = _pbs.ATTR_state
+ATTR_queue = _pbs.ATTR_queue
+ATTR_server = _pbs.ATTR_server
+ATTR_maxrun = _pbs.ATTR_maxrun
+ATTR_maxreport = _pbs.ATTR_maxreport
+ATTR_total = _pbs.ATTR_total
+ATTR_comment = _pbs.ATTR_comment
+ATTR_cookie = _pbs.ATTR_cookie
+ATTR_qrank = _pbs.ATTR_qrank
+ATTR_altid = _pbs.ATTR_altid
+ATTR_etime = _pbs.ATTR_etime
+ATTR_exitstat = _pbs.ATTR_exitstat
+ATTR_forwardx11 = _pbs.ATTR_forwardx11
+ATTR_submit_args = _pbs.ATTR_submit_args
+ATTR_tokens = _pbs.ATTR_tokens
+ATTR_netcounter = _pbs.ATTR_netcounter
+ATTR_umask = _pbs.ATTR_umask
+ATTR_start_time = _pbs.ATTR_start_time
+ATTR_start_count = _pbs.ATTR_start_count
+ATTR_checkpoint_dir = _pbs.ATTR_checkpoint_dir
+ATTR_checkpoint_name = _pbs.ATTR_checkpoint_name
+ATTR_checkpoint_time = _pbs.ATTR_checkpoint_time
+ATTR_checkpoint_restart_status = _pbs.ATTR_checkpoint_restart_status
+ATTR_restart_name = _pbs.ATTR_restart_name
+ATTR_comp_time = _pbs.ATTR_comp_time
+ATTR_reported = _pbs.ATTR_reported
+ATTR_intcmd = _pbs.ATTR_intcmd
+ATTR_job_radix = _pbs.ATTR_job_radix
+ATTR_sister_list = _pbs.ATTR_sister_list
+ATTR_total_runtime = _pbs.ATTR_total_runtime
+ATTR_P = _pbs.ATTR_P
+ATTR_node_exclusive = _pbs.ATTR_node_exclusive
+ATTR_exec_gpus = _pbs.ATTR_exec_gpus
+ATTR_exec_mics = _pbs.ATTR_exec_mics
+ATTR_J = _pbs.ATTR_J
+ATTR_pagg = _pbs.ATTR_pagg
+ATTR_system_start_time = _pbs.ATTR_system_start_time
+ATTR_gpu_flags = _pbs.ATTR_gpu_flags
+ATTR_aclgren = _pbs.ATTR_aclgren
+ATTR_aclgroup = _pbs.ATTR_aclgroup
+ATTR_aclhten = _pbs.ATTR_aclhten
+ATTR_aclhost = _pbs.ATTR_aclhost
+ATTR_acluren = _pbs.ATTR_acluren
+ATTR_acluser = _pbs.ATTR_acluser
+ATTR_altrouter = _pbs.ATTR_altrouter
+ATTR_checkpoint_min = _pbs.ATTR_checkpoint_min
+ATTR_checkpoint_defaults = _pbs.ATTR_checkpoint_defaults
+ATTR_enable = _pbs.ATTR_enable
+ATTR_fromroute = _pbs.ATTR_fromroute
+ATTR_hostlist = _pbs.ATTR_hostlist
+ATTR_killdelay = _pbs.ATTR_killdelay
+ATTR_maxgrprun = _pbs.ATTR_maxgrprun
+ATTR_maxque = _pbs.ATTR_maxque
+ATTR_maxuserque = _pbs.ATTR_maxuserque
+ATTR_maxuserrun = _pbs.ATTR_maxuserrun
+ATTR_qtype = _pbs.ATTR_qtype
+ATTR_rescassn = _pbs.ATTR_rescassn
+ATTR_rescdflt = _pbs.ATTR_rescdflt
+ATTR_rescmax = _pbs.ATTR_rescmax
+ATTR_rescmin = _pbs.ATTR_rescmin
+ATTR_featreqd = _pbs.ATTR_featreqd
+ATTR_req_login_property = _pbs.ATTR_req_login_property
+ATTR_rerunnable = _pbs.ATTR_rerunnable
+ATTR_rndzretry = _pbs.ATTR_rndzretry
+ATTR_routedest = _pbs.ATTR_routedest
+ATTR_routeheld = _pbs.ATTR_routeheld
+ATTR_routewait = _pbs.ATTR_routewait
+ATTR_routeretry = _pbs.ATTR_routeretry
+ATTR_routelife = _pbs.ATTR_routelife
+ATTR_rsvexpdt = _pbs.ATTR_rsvexpdt
+ATTR_rsvsync = _pbs.ATTR_rsvsync
+ATTR_start = _pbs.ATTR_start
+ATTR_count = _pbs.ATTR_count
+ATTR_number = _pbs.ATTR_number
+ATTR_acllogic = _pbs.ATTR_acllogic
+ATTR_aclgrpslpy = _pbs.ATTR_aclgrpslpy
+ATTR_keepcompleted = _pbs.ATTR_keepcompleted
+ATTR_disallowedtypes = _pbs.ATTR_disallowedtypes
+ATTR_is_transit = _pbs.ATTR_is_transit
+ATTR_aclroot = _pbs.ATTR_aclroot
+ATTR_managers = _pbs.ATTR_managers
+ATTR_dfltque = _pbs.ATTR_dfltque
+ATTR_dispsvrsuffix = _pbs.ATTR_dispsvrsuffix
+ATTR_jobsuffixalias = _pbs.ATTR_jobsuffixalias
+ATTR_defnode = _pbs.ATTR_defnode
+ATTR_locsvrs = _pbs.ATTR_locsvrs
+ATTR_logevents = _pbs.ATTR_logevents
+ATTR_logfile = _pbs.ATTR_logfile
+ATTR_loglevel = _pbs.ATTR_loglevel
+ATTR_mailfrom = _pbs.ATTR_mailfrom
+ATTR_nodepack = _pbs.ATTR_nodepack
+ATTR_nodesuffix = _pbs.ATTR_nodesuffix
+ATTR_operators = _pbs.ATTR_operators
+ATTR_queryother = _pbs.ATTR_queryother
+ATTR_resccost = _pbs.ATTR_resccost
+ATTR_rescavail = _pbs.ATTR_rescavail
+ATTR_schedit = _pbs.ATTR_schedit
+ATTR_scheduling = _pbs.ATTR_scheduling
+ATTR_status = _pbs.ATTR_status
+ATTR_syscost = _pbs.ATTR_syscost
+ATTR_pingrate = _pbs.ATTR_pingrate
+ATTR_ndchkrate = _pbs.ATTR_ndchkrate
+ATTR_tcptimeout = _pbs.ATTR_tcptimeout
+ATTR_jobstatrate = _pbs.ATTR_jobstatrate
+ATTR_polljobs = _pbs.ATTR_polljobs
+ATTR_downonerror = _pbs.ATTR_downonerror
+ATTR_disableserveridcheck = _pbs.ATTR_disableserveridcheck
+ATTR_jobnanny = _pbs.ATTR_jobnanny
+ATTR_ownerpurge = _pbs.ATTR_ownerpurge
+ATTR_qcqlimits = _pbs.ATTR_qcqlimits
+ATTR_momjobsync = _pbs.ATTR_momjobsync
+ATTR_maildomain = _pbs.ATTR_maildomain
+ATTR_pbsversion = _pbs.ATTR_pbsversion
+ATTR_submithosts = _pbs.ATTR_submithosts
+ATTR_allownodesubmit = _pbs.ATTR_allownodesubmit
+ATTR_allowproxyuser = _pbs.ATTR_allowproxyuser
+ATTR_autonodenp = _pbs.ATTR_autonodenp
+ATTR_servername = _pbs.ATTR_servername
+ATTR_logfilemaxsize = _pbs.ATTR_logfilemaxsize
+ATTR_logfilerolldepth = _pbs.ATTR_logfilerolldepth
+ATTR_logkeepdays = _pbs.ATTR_logkeepdays
+ATTR_nextjobnum = _pbs.ATTR_nextjobnum
+ATTR_extraresc = _pbs.ATTR_extraresc
+ATTR_schedversion = _pbs.ATTR_schedversion
+ATTR_acctkeepdays = _pbs.ATTR_acctkeepdays
+ATTR_lockfile = _pbs.ATTR_lockfile
+ATTR_credentiallifetime = _pbs.ATTR_credentiallifetime
+ATTR_jobmustreport = _pbs.ATTR_jobmustreport
+ATTR_LockfileUpdateTime = _pbs.ATTR_LockfileUpdateTime
+ATTR_LockfileCheckTime = _pbs.ATTR_LockfileCheckTime
+ATTR_npdefault = _pbs.ATTR_npdefault
+ATTR_clonebatchsize = _pbs.ATTR_clonebatchsize
+ATTR_clonebatchdelay = _pbs.ATTR_clonebatchdelay
+ATTR_jobstarttimeout = _pbs.ATTR_jobstarttimeout
+ATTR_jobforcecanceltime = _pbs.ATTR_jobforcecanceltime
+ATTR_maxarraysize = _pbs.ATTR_maxarraysize
+ATTR_maxslotlimit = _pbs.ATTR_maxslotlimit
+ATTR_recordjobinfo = _pbs.ATTR_recordjobinfo
+ATTR_recordjobscript = _pbs.ATTR_recordjobscript
+ATTR_joblogfilemaxsize = _pbs.ATTR_joblogfilemaxsize
+ATTR_joblogfilerolldepth = _pbs.ATTR_joblogfilerolldepth
+ATTR_joblogkeepdays = _pbs.ATTR_joblogkeepdays
+ATTR_minthreads = _pbs.ATTR_minthreads
+ATTR_maxthreads = _pbs.ATTR_maxthreads
+ATTR_threadidleseconds = _pbs.ATTR_threadidleseconds
+ATTR_moabarraycompatible = _pbs.ATTR_moabarraycompatible
+ATTR_nomailforce = _pbs.ATTR_nomailforce
+ATTR_interactivejobscanroam = _pbs.ATTR_interactivejobscanroam
+ATTR_crayenabled = _pbs.ATTR_crayenabled
+ATTR_nppcu = _pbs.ATTR_nppcu
+ATTR_login_node_key = _pbs.ATTR_login_node_key
+ATTR_maxuserqueuable = _pbs.ATTR_maxuserqueuable
+ATTR_automaticrequeueexitcode = _pbs.ATTR_automaticrequeueexitcode
+ATTR_jobsynctimeout = _pbs.ATTR_jobsynctimeout
+ATTR_pass_cpu_clock = _pbs.ATTR_pass_cpu_clock
+ATTR_NODE_state = _pbs.ATTR_NODE_state
+ATTR_NODE_power_state = _pbs.ATTR_NODE_power_state
+ATTR_NODE_np = _pbs.ATTR_NODE_np
+ATTR_NODE_properties = _pbs.ATTR_NODE_properties
+ATTR_NODE_ntype = _pbs.ATTR_NODE_ntype
+ATTR_NODE_jobs = _pbs.ATTR_NODE_jobs
+ATTR_NODE_status = _pbs.ATTR_NODE_status
+ATTR_NODE_note = _pbs.ATTR_NODE_note
+ATTR_NODE_mom_port = _pbs.ATTR_NODE_mom_port
+ATTR_NODE_mom_rm_port = _pbs.ATTR_NODE_mom_rm_port
+ATTR_NODE_num_node_boards = _pbs.ATTR_NODE_num_node_boards
+ATTR_NODE_numa_str = _pbs.ATTR_NODE_numa_str
+ATTR_NODE_gpus = _pbs.ATTR_NODE_gpus
+ATTR_NODE_gpustatus = _pbs.ATTR_NODE_gpustatus
+ATTR_NODE_gpus_str = _pbs.ATTR_NODE_gpus_str
+ATTR_NODE_mics = _pbs.ATTR_NODE_mics
+ATTR_NODE_micstatus = _pbs.ATTR_NODE_micstatus
+ATTR_copy_on_rerun = _pbs.ATTR_copy_on_rerun
+ATTR_job_exclusive_on_use = _pbs.ATTR_job_exclusive_on_use
+ATTR_mailsubjectfmt = _pbs.ATTR_mailsubjectfmt
+ATTR_mailbodyfmt = _pbs.ATTR_mailbodyfmt
+CHECKPOINT_UNSPECIFIED = _pbs.CHECKPOINT_UNSPECIFIED
+NO_HOLD = _pbs.NO_HOLD
+NO_JOIN = _pbs.NO_JOIN
+NO_KEEP = _pbs.NO_KEEP
+MAIL_AT_ABORT = _pbs.MAIL_AT_ABORT
+DEFAULT_PRIORITY = _pbs.DEFAULT_PRIORITY
+ARRAY_RANGE = _pbs.ARRAY_RANGE
+DELDELAY = _pbs.DELDELAY
+DELPURGE = _pbs.DELPURGE
+DELASYNC = _pbs.DELASYNC
+PURGECOMP = _pbs.PURGECOMP
+EXECQUEONLY = _pbs.EXECQUEONLY
+RERUNFORCE = _pbs.RERUNFORCE
+USER_HOLD = _pbs.USER_HOLD
+OTHER_HOLD = _pbs.OTHER_HOLD
+SYSTEM_HOLD = _pbs.SYSTEM_HOLD
+ND_free = _pbs.ND_free
+ND_offline = _pbs.ND_offline
+ND_down = _pbs.ND_down
+ND_reserve = _pbs.ND_reserve
+ND_job_exclusive = _pbs.ND_job_exclusive
+ND_job_sharing = _pbs.ND_job_sharing
+ND_busy = _pbs.ND_busy
+ND_state_unknown = _pbs.ND_state_unknown
+ND_running = _pbs.ND_running
+ND_standby = _pbs.ND_standby
+ND_suspend = _pbs.ND_suspend
+ND_sleep = _pbs.ND_sleep
+ND_hibernate = _pbs.ND_hibernate
+ND_shutdown = _pbs.ND_shutdown
+ND_active = _pbs.ND_active
+ND_all = _pbs.ND_all
+ND_up = _pbs.ND_up
+ND_timeshared = _pbs.ND_timeshared
+ND_cluster = _pbs.ND_cluster
+Q_DT_batch = _pbs.Q_DT_batch
+Q_DT_interactive = _pbs.Q_DT_interactive
+Q_DT_rerunable = _pbs.Q_DT_rerunable
+Q_DT_nonrerunable = _pbs.Q_DT_nonrerunable
+Q_DT_fault_tolerant = _pbs.Q_DT_fault_tolerant
+Q_DT_fault_intolerant = _pbs.Q_DT_fault_intolerant
+Q_DT_job_array = _pbs.Q_DT_job_array
+MAX_ENCODE_BFR = _pbs.MAX_ENCODE_BFR
+MGR_CMD_CREATE = _pbs.MGR_CMD_CREATE
+MGR_CMD_DELETE = _pbs.MGR_CMD_DELETE
+MGR_CMD_SET = _pbs.MGR_CMD_SET
+MGR_CMD_UNSET = _pbs.MGR_CMD_UNSET
+MGR_CMD_LIST = _pbs.MGR_CMD_LIST
+MGR_CMD_PRINT = _pbs.MGR_CMD_PRINT
+MGR_CMD_ACTIVE = _pbs.MGR_CMD_ACTIVE
+MGR_OBJ_NONE = _pbs.MGR_OBJ_NONE
+MGR_OBJ_SERVER = _pbs.MGR_OBJ_SERVER
+MGR_OBJ_QUEUE = _pbs.MGR_OBJ_QUEUE
+MGR_OBJ_JOB = _pbs.MGR_OBJ_JOB
+MGR_OBJ_NODE = _pbs.MGR_OBJ_NODE
+MSG_OUT = _pbs.MSG_OUT
+MSG_ERR = _pbs.MSG_ERR
+SHUT_SIG = _pbs.SHUT_SIG
+SHUT_IMMEDIATE = _pbs.SHUT_IMMEDIATE
+SHUT_DELAY = _pbs.SHUT_DELAY
+SHUT_QUICK = _pbs.SHUT_QUICK
+SIG_RESUME = _pbs.SIG_RESUME
+SIG_SUSPEND = _pbs.SIG_SUSPEND
+PBS_MAXHOSTNAME = _pbs.PBS_MAXHOSTNAME
+MAXPATHLEN = _pbs.MAXPATHLEN
+MAXPORTLEN = _pbs.MAXPORTLEN
+MAXNAMLEN = _pbs.MAXNAMLEN
+MAX_NOTE = _pbs.MAX_NOTE
+MAX_NOTE_STR = _pbs.MAX_NOTE_STR
+PBS_MAXUSER = _pbs.PBS_MAXUSER
+PBS_MAXGRPN = _pbs.PBS_MAXGRPN
+PBS_MAXGPUID = _pbs.PBS_MAXGPUID
+PBS_MAXQUEUENAME = _pbs.PBS_MAXQUEUENAME
+PBS_MAXSERVERNAME = _pbs.PBS_MAXSERVERNAME
+PBS_MAXJOBARRAYLEN = _pbs.PBS_MAXJOBARRAYLEN
+PBS_MAXSEQNUM = _pbs.PBS_MAXSEQNUM
+PBS_MAXPORTNUM = _pbs.PBS_MAXPORTNUM
+PBS_MAXJOBARRAY = _pbs.PBS_MAXJOBARRAY
+PBS_MAXSVRJOBID = _pbs.PBS_MAXSVRJOBID
+PBS_MAXCLTJOBID = _pbs.PBS_MAXCLTJOBID
+PBS_MAXDEST = _pbs.PBS_MAXDEST
+PBS_MAXROUTEDEST = _pbs.PBS_MAXROUTEDEST
+PBS_USE_IFF = _pbs.PBS_USE_IFF
+PBS_INTERACTIVE = _pbs.PBS_INTERACTIVE
+PBS_TERM_BUF_SZ = _pbs.PBS_TERM_BUF_SZ
+PBS_TERM_CCA = _pbs.PBS_TERM_CCA
+PBS_MAXCREDENTIAL_LEN = _pbs.PBS_MAXCREDENTIAL_LEN
+PBS_QS_VERSION_BASE = _pbs.PBS_QS_VERSION_BASE
+PBS_QS_VERSION_INT = _pbs.PBS_QS_VERSION_INT
+PBS_QS_VERSION = _pbs.PBS_QS_VERSION
+PBS_BATCH_SERVICE_NAME = _pbs.PBS_BATCH_SERVICE_NAME
+PBS_BATCH_SERVICE_PORT = _pbs.PBS_BATCH_SERVICE_PORT
+PBS_BATCH_SERVICE_NAME_DIS = _pbs.PBS_BATCH_SERVICE_NAME_DIS
+PBS_MOM_SERVICE_NAME = _pbs.PBS_MOM_SERVICE_NAME
+PBS_MOM_SERVICE_PORT = _pbs.PBS_MOM_SERVICE_PORT
+PBS_MANAGER_SERVICE_NAME = _pbs.PBS_MANAGER_SERVICE_NAME
+PBS_MANAGER_SERVICE_PORT = _pbs.PBS_MANAGER_SERVICE_PORT
+PBS_SCHEDULER_SERVICE_NAME = _pbs.PBS_SCHEDULER_SERVICE_NAME
+PBS_SCHEDULER_SERVICE_PORT = _pbs.PBS_SCHEDULER_SERVICE_PORT
+TRQ_AUTHD_SERVICE_PORT = _pbs.TRQ_AUTHD_SERVICE_PORT
+CHECKPOINTHOLD = _pbs.CHECKPOINTHOLD
+CHECKPOINTCONT = _pbs.CHECKPOINTCONT
+MOM_DEFAULT_CHECKPOINT_DIR = _pbs.MOM_DEFAULT_CHECKPOINT_DIR
+NO_MOM_RELAY = _pbs.NO_MOM_RELAY
+SET = _pbs.SET
+UNSET = _pbs.UNSET
+INCR = _pbs.INCR
+DECR = _pbs.DECR
+EQ = _pbs.EQ
+NE = _pbs.NE
+GE = _pbs.GE
+GT = _pbs.GT
+LE = _pbs.LE
+LT = _pbs.LT
+DFLT = _pbs.DFLT
+MERGE = _pbs.MERGE
+INCR_OLD = _pbs.INCR_OLD
+NPPCU_ALPS_CHOOSES = _pbs.NPPCU_ALPS_CHOOSES
+NPPCU_NO_USE_HT = _pbs.NPPCU_NO_USE_HT
+NPPCU_USE_HT = _pbs.NPPCU_USE_HT
+class attrl(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, attrl, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, attrl, name)
+    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
+    __repr__ = _swig_repr
+    __swig_setmethods__["next"] = _pbs.attrl_next_set
+    __swig_getmethods__["next"] = _pbs.attrl_next_get
+    if _newclass:next = _swig_property(_pbs.attrl_next_get, _pbs.attrl_next_set)
+    __swig_setmethods__["name"] = _pbs.attrl_name_set
+    __swig_getmethods__["name"] = _pbs.attrl_name_get
+    if _newclass:name = _swig_property(_pbs.attrl_name_get, _pbs.attrl_name_set)
+    __swig_setmethods__["resource"] = _pbs.attrl_resource_set
+    __swig_getmethods__["resource"] = _pbs.attrl_resource_get
+    if _newclass:resource = _swig_property(_pbs.attrl_resource_get, _pbs.attrl_resource_set)
+    __swig_setmethods__["value"] = _pbs.attrl_value_set
+    __swig_getmethods__["value"] = _pbs.attrl_value_get
+    if _newclass:value = _swig_property(_pbs.attrl_value_get, _pbs.attrl_value_set)
+    __swig_setmethods__["op"] = _pbs.attrl_op_set
+    __swig_getmethods__["op"] = _pbs.attrl_op_get
+    if _newclass:op = _swig_property(_pbs.attrl_op_get, _pbs.attrl_op_set)
+    def __str__(self): return _pbs.attrl___str__(self)
+    __swig_destroy__ = _pbs.delete_attrl
+    __del__ = lambda self : None;
+attrl_swigregister = _pbs.attrl_swigregister
+attrl_swigregister(attrl)
+
+class attropl(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, attropl, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, attropl, name)
+    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
+    __repr__ = _swig_repr
+    __swig_setmethods__["next"] = _pbs.attropl_next_set
+    __swig_getmethods__["next"] = _pbs.attropl_next_get
+    if _newclass:next = _swig_property(_pbs.attropl_next_get, _pbs.attropl_next_set)
+    __swig_setmethods__["name"] = _pbs.attropl_name_set
+    __swig_getmethods__["name"] = _pbs.attropl_name_get
+    if _newclass:name = _swig_property(_pbs.attropl_name_get, _pbs.attropl_name_set)
+    __swig_setmethods__["resource"] = _pbs.attropl_resource_set
+    __swig_getmethods__["resource"] = _pbs.attropl_resource_get
+    if _newclass:resource = _swig_property(_pbs.attropl_resource_get, _pbs.attropl_resource_set)
+    __swig_setmethods__["value"] = _pbs.attropl_value_set
+    __swig_getmethods__["value"] = _pbs.attropl_value_get
+    if _newclass:value = _swig_property(_pbs.attropl_value_get, _pbs.attropl_value_set)
+    __swig_setmethods__["op"] = _pbs.attropl_op_set
+    __swig_getmethods__["op"] = _pbs.attropl_op_get
+    if _newclass:op = _swig_property(_pbs.attropl_op_get, _pbs.attropl_op_set)
+    def __str__(self): return _pbs.attropl___str__(self)
+    __swig_destroy__ = _pbs.delete_attropl
+    __del__ = lambda self : None;
+attropl_swigregister = _pbs.attropl_swigregister
+attropl_swigregister(attropl)
+
+class batch_status(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, batch_status, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, batch_status, name)
+    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
+    __repr__ = _swig_repr
+    __swig_setmethods__["next"] = _pbs.batch_status_next_set
+    __swig_getmethods__["next"] = _pbs.batch_status_next_get
+    if _newclass:next = _swig_property(_pbs.batch_status_next_get, _pbs.batch_status_next_set)
+    __swig_setmethods__["name"] = _pbs.batch_status_name_set
+    __swig_getmethods__["name"] = _pbs.batch_status_name_get
+    if _newclass:name = _swig_property(_pbs.batch_status_name_get, _pbs.batch_status_name_set)
+    __swig_setmethods__["attribs"] = _pbs.batch_status_attribs_set
+    __swig_getmethods__["attribs"] = _pbs.batch_status_attribs_get
+    if _newclass:attribs = _swig_property(_pbs.batch_status_attribs_get, _pbs.batch_status_attribs_set)
+    __swig_setmethods__["text"] = _pbs.batch_status_text_set
+    __swig_getmethods__["text"] = _pbs.batch_status_text_get
+    if _newclass:text = _swig_property(_pbs.batch_status_text_get, _pbs.batch_status_text_set)
+batch_status_swigregister = _pbs.batch_status_swigregister
+batch_status_swigregister(batch_status)
+
+
+def avail(*args):
+  return _pbs.avail(*args)
+avail = _pbs.avail
+
+def pbs_asyrunjob(*args):
+  return _pbs.pbs_asyrunjob(*args)
+pbs_asyrunjob = _pbs.pbs_asyrunjob
+
+def pbs_alterjob_async(*args):
+  return _pbs.pbs_alterjob_async(*args)
+pbs_alterjob_async = _pbs.pbs_alterjob_async
+
+def pbs_alterjob(*args):
+  return _pbs.pbs_alterjob(*args)
+pbs_alterjob = _pbs.pbs_alterjob
+
+def pbs_connect(*args):
+  return _pbs.pbs_connect(*args)
+pbs_connect = _pbs.pbs_connect
+
+def pbs_query_max_connections():
+  return _pbs.pbs_query_max_connections()
+pbs_query_max_connections = _pbs.pbs_query_max_connections
+
+def pbs_default():
+  return _pbs.pbs_default()
+pbs_default = _pbs.pbs_default
+
+def pbs_fbserver():
+  return _pbs.pbs_fbserver()
+pbs_fbserver = _pbs.pbs_fbserver
+
+def pbs_get_server_list():
+  return _pbs.pbs_get_server_list()
+pbs_get_server_list = _pbs.pbs_get_server_list
+
+def pbs_deljob(*args):
+  return _pbs.pbs_deljob(*args)
+pbs_deljob = _pbs.pbs_deljob
+
+def pbs_disconnect(*args):
+  return _pbs.pbs_disconnect(*args)
+pbs_disconnect = _pbs.pbs_disconnect
+
+def pbs_geterrmsg(*args):
+  return _pbs.pbs_geterrmsg(*args)
+pbs_geterrmsg = _pbs.pbs_geterrmsg
+
+def pbs_holdjob(*args):
+  return _pbs.pbs_holdjob(*args)
+pbs_holdjob = _pbs.pbs_holdjob
+
+def pbs_checkpointjob(*args):
+  return _pbs.pbs_checkpointjob(*args)
+pbs_checkpointjob = _pbs.pbs_checkpointjob
+
+def pbs_locjob(*args):
+  return _pbs.pbs_locjob(*args)
+pbs_locjob = _pbs.pbs_locjob
+
+def pbs_manager(*args):
+  return _pbs.pbs_manager(*args)
+pbs_manager = _pbs.pbs_manager
+
+def pbs_movejob(*args):
+  return _pbs.pbs_movejob(*args)
+pbs_movejob = _pbs.pbs_movejob
+
+def pbs_msgjob(*args):
+  return _pbs.pbs_msgjob(*args)
+pbs_msgjob = _pbs.pbs_msgjob
+
+def pbs_orderjob(*args):
+  return _pbs.pbs_orderjob(*args)
+pbs_orderjob = _pbs.pbs_orderjob
+
+def pbs_rescquery(*args):
+  return _pbs.pbs_rescquery(*args)
+pbs_rescquery = _pbs.pbs_rescquery
+
+def pbs_rescreserve(*args):
+  return _pbs.pbs_rescreserve(*args)
+pbs_rescreserve = _pbs.pbs_rescreserve
+
+def pbs_rescrelease(*args):
+  return _pbs.pbs_rescrelease(*args)
+pbs_rescrelease = _pbs.pbs_rescrelease
+
+def pbs_rerunjob(*args):
+  return _pbs.pbs_rerunjob(*args)
+pbs_rerunjob = _pbs.pbs_rerunjob
+
+def pbs_rlsjob(*args):
+  return _pbs.pbs_rlsjob(*args)
+pbs_rlsjob = _pbs.pbs_rlsjob
+
+def pbs_runjob(*args):
+  return _pbs.pbs_runjob(*args)
+pbs_runjob = _pbs.pbs_runjob
+
+def pbs_selectjob(*args):
+  return _pbs.pbs_selectjob(*args)
+pbs_selectjob = _pbs.pbs_selectjob
+
+def pbs_sigjob(*args):
+  return _pbs.pbs_sigjob(*args)
+pbs_sigjob = _pbs.pbs_sigjob
+
+def pbs_sigjobasync(*args):
+  return _pbs.pbs_sigjobasync(*args)
+pbs_sigjobasync = _pbs.pbs_sigjobasync
+
+def pbs_statfree(*args):
+  return _pbs.pbs_statfree(*args)
+pbs_statfree = _pbs.pbs_statfree
+
+def pbs_statjob(*args):
+  return _pbs.pbs_statjob(*args)
+pbs_statjob = _pbs.pbs_statjob
+
+def pbs_selstat(*args):
+  return _pbs.pbs_selstat(*args)
+pbs_selstat = _pbs.pbs_selstat
+
+def pbs_statque(*args):
+  return _pbs.pbs_statque(*args)
+pbs_statque = _pbs.pbs_statque
+
+def pbs_statserver(*args):
+  return _pbs.pbs_statserver(*args)
+pbs_statserver = _pbs.pbs_statserver
+
+def pbs_statnode(*args):
+  return _pbs.pbs_statnode(*args)
+pbs_statnode = _pbs.pbs_statnode
+
+def pbs_submit(*args):
+  return _pbs.pbs_submit(*args)
+pbs_submit = _pbs.pbs_submit
+
+def pbs_submit_hash_ext(*args):
+  return _pbs.pbs_submit_hash_ext(*args)
+pbs_submit_hash_ext = _pbs.pbs_submit_hash_ext
+
+def pbs_terminate(*args):
+  return _pbs.pbs_terminate(*args)
+pbs_terminate = _pbs.pbs_terminate
+
+def totpool(*args):
+  return _pbs.totpool(*args)
+totpool = _pbs.totpool
+
+def usepool(*args):
+  return _pbs.usepool(*args)
+usepool = _pbs.usepool
+
+def pbs_gpumode(*args):
+  return _pbs.pbs_gpumode(*args)
+pbs_gpumode = _pbs.pbs_gpumode
+
+def trq_set_preferred_network_interface(*args):
+  return _pbs.trq_set_preferred_network_interface(*args)
+trq_set_preferred_network_interface = _pbs.trq_set_preferred_network_interface
+
+def trq_get_if_name():
+  return _pbs.trq_get_if_name()
+trq_get_if_name = _pbs.trq_get_if_name
+
+def pbs_stagein(*args):
+  return _pbs.pbs_stagein(*args)
+pbs_stagein = _pbs.pbs_stagein
+
+def openrm(*args):
+  return _pbs.openrm(*args)
+openrm = _pbs.openrm
+
+def closerm_err(*args):
+  return _pbs.closerm_err(*args)
+closerm_err = _pbs.closerm_err
+
+def closerm(*args):
+  return _pbs.closerm(*args)
+closerm = _pbs.closerm
+
+def downrm(*args):
+  return _pbs.downrm(*args)
+downrm = _pbs.downrm
+
+def configrm(*args):
+  return _pbs.configrm(*args)
+configrm = _pbs.configrm
+
+def addreq_err(*args):
+  return _pbs.addreq_err(*args)
+addreq_err = _pbs.addreq_err
+
+def begin_rm_req(*args):
+  return _pbs.begin_rm_req(*args)
+begin_rm_req = _pbs.begin_rm_req
+
+def addreq(*args):
+  return _pbs.addreq(*args)
+addreq = _pbs.addreq
+
+def allreq(*args):
+  return _pbs.allreq(*args)
+allreq = _pbs.allreq
+
+def getreq_err(*args):
+  return _pbs.getreq_err(*args)
+getreq_err = _pbs.getreq_err
+
+def getreq(*args):
+  return _pbs.getreq(*args)
+getreq = _pbs.getreq
+
+def flushreq():
+  return _pbs.flushreq()
+flushreq = _pbs.flushreq
+
+def activereq():
+  return _pbs.activereq()
+activereq = _pbs.activereq
+
+def fullresp(*args):
+  return _pbs.fullresp(*args)
+fullresp = _pbs.fullresp
+LOG_BUF_SIZE = _pbs.LOG_BUF_SIZE
+LOCAL_LOG_BUF_SIZE = _pbs.LOCAL_LOG_BUF_SIZE
+LOG_EMERG = _pbs.LOG_EMERG
+LOG_ALERT = _pbs.LOG_ALERT
+LOG_CRIT = _pbs.LOG_CRIT
+LOG_ERR = _pbs.LOG_ERR
+LOG_WARNING = _pbs.LOG_WARNING
+LOG_NOTICE = _pbs.LOG_NOTICE
+LOG_INFO = _pbs.LOG_INFO
+LOG_DEBUG = _pbs.LOG_DEBUG
+MAXLINE = _pbs.MAXLINE
+GETV = _pbs.GETV
+SETV = _pbs.SETV
+
+def log_err(*args):
+  return _pbs.log_err(*args)
+log_err = _pbs.log_err
+
+def log_ext(*args):
+  return _pbs.log_ext(*args)
+log_ext = _pbs.log_ext
+
+def log_event(*args):
+  return _pbs.log_event(*args)
+log_event = _pbs.log_event
+
+def log_record(*args):
+  return _pbs.log_record(*args)
+log_record = _pbs.log_record
+
+def log_available(*args):
+  return _pbs.log_available(*args)
+log_available = _pbs.log_available
+
+def log_init(*args):
+  return _pbs.log_init(*args)
+log_init = _pbs.log_init
+
+def chk_file_sec(*args):
+  return _pbs.chk_file_sec(*args)
+chk_file_sec = _pbs.chk_file_sec
+PBSEVENT_ERROR = _pbs.PBSEVENT_ERROR
+PBSEVENT_SYSTEM = _pbs.PBSEVENT_SYSTEM
+PBSEVENT_ADMIN = _pbs.PBSEVENT_ADMIN
+PBSEVENT_JOB = _pbs.PBSEVENT_JOB
+PBSEVENT_JOB_USAGE = _pbs.PBSEVENT_JOB_USAGE
+PBSEVENT_SECURITY = _pbs.PBSEVENT_SECURITY
+PBSEVENT_SCHED = _pbs.PBSEVENT_SCHED
+PBSEVENT_DEBUG = _pbs.PBSEVENT_DEBUG
+PBSEVENT_DEBUG2 = _pbs.PBSEVENT_DEBUG2
+PBSEVENT_CLIENTAUTH = _pbs.PBSEVENT_CLIENTAUTH
+PBSEVENT_SYSLOG = _pbs.PBSEVENT_SYSLOG
+PBSEVENT_FORCE = _pbs.PBSEVENT_FORCE
+PBS_EVENTCLASS_SERVER = _pbs.PBS_EVENTCLASS_SERVER
+PBS_EVENTCLASS_QUEUE = _pbs.PBS_EVENTCLASS_QUEUE
+PBS_EVENTCLASS_JOB = _pbs.PBS_EVENTCLASS_JOB
+PBS_EVENTCLASS_REQUEST = _pbs.PBS_EVENTCLASS_REQUEST
+PBS_EVENTCLASS_FILE = _pbs.PBS_EVENTCLASS_FILE
+PBS_EVENTCLASS_ACCT = _pbs.PBS_EVENTCLASS_ACCT
+PBS_EVENTCLASS_NODE = _pbs.PBS_EVENTCLASS_NODE
+PBS_EVENTCLASS_TRQAUTHD = _pbs.PBS_EVENTCLASS_TRQAUTHD
+PBSEVENT_MASK = _pbs.PBSEVENT_MASK
+MAX_PATH_LEN = _pbs.MAX_PATH_LEN
+SECS_PER_DAY = _pbs.SECS_PER_DAY
+TRUE = _pbs.TRUE
+FALSE = _pbs.FALSE
+PBSE_TOTAL_CEILING = _pbs.PBSE_TOTAL_CEILING
+PBSE_ = _pbs.PBSE_
+PBSE_NONE = _pbs.PBSE_NONE
+
+def pbse_to_txt(*args):
+  return _pbs.pbse_to_txt(*args)
+pbse_to_txt = _pbs.pbse_to_txt
+
+def pbs_strerror(*args):
+  return _pbs.pbs_strerror(*args)
+pbs_strerror = _pbs.pbs_strerror
+#  PBS python interface
+#  Author: Bas van der Vlies <bas.vandervlies@surfsara.nl>
+#  Date  : 27 Feb 2002
+#  Desc. : This is python wrapper class for getting the resource
+#          mom values.
+#
+# CVS info
+# $Id: resmom.py,v 1.6 2002/10/21 14:14:47 sscpbas Exp $
+# $Date: 2002/10/21 14:14:47 $
+# $Revision: 1.6 $
+#
+import string
+import types
+
+# Default linux resources to get from the mom
+#
+default_linux_res = [   
+    "availmem",	    # available memory size in KB
+    "ideal_load",	# static ideal_load value
+    "loadave",      # the current load average
+    "max_load",	    # static max_load value
+    "ncpus",        # number of cpus 
+    "physmem",      # physical memory size in KB
+    "resi",		    # resident memory size for a pid or session in KB
+    "totmem",	    # total memory size in KB
+    "walltime",	    # wall clock time for a pid
+]
+
+# Default irix6 resources to get from the mom
+#
+default_irix6_res = [   
+    "availmem",	# available memory size in KB
+    "loadave",      # the current load average
+    "ncpus",        # number of cpus
+    "physmem",      # physical memory size in KB
+    "resi",		# resident memory size for a pid or session in KB
+    "walltime",	# wall clock time for a pid
+    "quota",	# quota information (sizes in KB)
+]
+
+default_mom_res = [   
+    "arch",		# the architecture of the machine
+    "uname",	# the architecture of the machine
+    "cput",		# cpu time for a pid or session
+    "idletime",	# seconds of idle time
+    "mem",		# memory size for a pid or session in KB
+    "sessions",	# list of sessions in the system
+    "pids",         # list of pids in a session
+    "nsessions",	# number of sessions in the system
+    "nusers",	# number of users in the system
+    "size",		# size of a file or filesystem
+    "host",		# Name  of host on which job should be run 
+    "nodes",	# Number and/or type of nodes to be reserved for exclusive use by the job
+    "other",	# Allows a  user  to  specify  site  specific  information
+    "software",	# Allows a user to specify software required by the job
+]
+
+def check_resp(dict, str):
+  """
+  Check the daemon response. If we have no permission to
+  query the values then we got a 'None' response. Else
+  if we supplied a keyword that does not exits we get a
+  '?' response
+  """
+  if not str:
+    return
+  
+  ## Value can contain the '=' char :-(
+  #  
+  l =  string.split(str, '=')
+  key = string.strip(l[0])
+  if len(l) > 2:
+    val = string.strip( '='.join(l[1:]) )
+  else:
+    val = string.strip(l[1])
+
+  key = string.strip(key)
+  val = string.strip(val)
+
+  # Did we got a valid response
+  #
+  if not val[0] == '?':
+    dict[key] = val
+
+def use_default_keywords(id, d):
+  """
+  Get the default values from the mom daemon
+  """
+  err = 0
+  for res in default_mom_res:
+    addreq(id, res)
+    resp = getreq(id)
+    check_resp(d, resp)
+
+  # Do not proceed if we have an empty dictionary
+  #
+  if not d:
+    return
+
+  if d['arch' ] == 'linux':
+    for res in default_linux_res:
+      addreq(id, res)
+      resp = getreq(id)
+      check_resp(d, resp)
+
+def use_user_keywords(id, d, l):
+  for res in l:
+    if type(res) is types.StringType:
+      addreq(id, res)
+      resp = getreq(id)
+      check_resp(d, resp)
+    else:
+      raise TypeError, 'Expected a string got %s :%s' %(type(res), res) 
+
+def get_mom_values(id, list = None):
+  """
+  This function will query the mom with a default resmon keywords
+  and 'arch' depended keywords. Supported archs are:
+    linux
+    irix6
+  User can also supply their own list of keywords as second parameter.
+  arguments:
+    id   : connection number with mom daemon on a node
+    list : optional parameter. If supplied then use this. A list
+           of mom keywords.
+  """
+
+  d = {}
+  if not list:
+    use_default_keywords(id, d)
+  else:
+    use_user_keywords(id, d , list)
+     
+  return d
+
+version_info = ( 4, 4, 0 )
+version = 'SARA pbs_python version 4.4.0'
+
+## A useful dict with error codes to text
+#
+# Author: Bas van der Vlies <bas.vandervlies@surfsara.nl>
+#
+# SVN Info:
+#	$Id: errors.py 429 2005-11-04 13:59:06Z bas $
+#
+
+def error():
+  """
+  Check if there is an error, if so fetch the error message string. 
+  It says more then a number!
+  """
+  e = get_error()
+  return (e, pbs_strerror(e))
+#     return (e, errors_txt[e])
+#  else:
+#     return (e, "Could not find a text for this error, uhhh")
+
+# This file is compatible with both classic and new-style classes.
+
+cvar = _pbs.cvar
+
Index: /tags/4.6.0/src/5.x/pbs_error.h
===================================================================
--- /tags/4.6.0/src/5.x/pbs_error.h	(revision 342)
+++ /tags/4.6.0/src/5.x/pbs_error.h	(revision 342)
@@ -0,0 +1,136 @@
+/*
+*         OpenPBS (Portable Batch System) v2.3 Software License
+*
+* Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+* All rights reserved.
+*
+* ---------------------------------------------------------------------------
+* For a license to use or redistribute the OpenPBS software under conditions
+* other than those described below, or to purchase support for this software,
+* please contact Veridian Systems, PBS Products Department ("Licensor") at:
+*
+*    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+*                        877 902-4PBS (US toll-free)
+* ---------------------------------------------------------------------------
+*
+* This license covers use of the OpenPBS v2.3 software (the "Software") at
+* your site or location, and, for certain users, redistribution of the
+* Software to other sites and locations.  Use and redistribution of
+* OpenPBS v2.3 in source and binary forms, with or without modification,
+* are permitted provided that all of the following conditions are met.
+* After December 31, 2001, only conditions 3-6 must be met:
+*
+* 1. Commercial and/or non-commercial use of the Software is permitted
+*    provided a current software registration is on file at www.OpenPBS.org.
+*    If use of this software contributes to a publication, product, or
+*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
+*
+* 2. Redistribution in any form is only permitted for non-commercial,
+*    non-profit purposes.  There can be no charge for the Software or any
+*    software incorporating the Software.  Further, there can be no
+*    expectation of revenue generated as a consequence of redistributing
+*    the Software.
+*
+* 3. Any Redistribution of source code must retain the above copyright notice
+*    and the acknowledgment contained in paragraph 6, this list of conditions
+*    and the disclaimer contained in paragraph 7.
+*
+* 4. Any Redistribution in binary form must reproduce the above copyright
+*    notice and the acknowledgment contained in paragraph 6, this list of
+*    conditions and the disclaimer contained in paragraph 7 in the
+*    documentation and/or other materials provided with the distribution.
+*
+* 5. Redistributions in any form must be accompanied by information on how to
+*    obtain complete source code for the OpenPBS software and any
+*    modifications and/or additions to the OpenPBS software.  The source code
+*    must either be included in the distribution or be available for no more
+*    than the cost of distribution plus a nominal fee, and all modifications
+*    and additions to the Software must be freely redistributable by any party
+*    (including Licensor) without restriction.
+*
+* 6. All advertising materials mentioning features or use of the Software must
+*    display the following acknowledgment:
+*
+*     "This product includes software developed by NASA Ames Research Center,
+*     Lawrence Livermore National Laboratory, and Veridian Information
+*     Solutions, Inc.
+*     Visit www.OpenPBS.org for OpenPBS software support,
+*     products, and information."
+*
+* 7. DISCLAIMER OF WARRANTY
+*
+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+* ARE EXPRESSLY DISCLAIMED.
+*
+* IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+* U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* This license will be governed by the laws of the Commonwealth of Virginia,
+* without reference to its choice of law rules.
+*/
+
+/*
+ * The error returns possible to a Batch Request
+ *
+ * Each error is prefixed with the string PBSE_ for Portable (Posix)
+ * Batch System Error.  The numeric values start with 15000 since the
+ * POSIX Batch Extensions Working group is 1003.15
+ */
+#ifndef PBSE_
+
+#define FALSE 0
+#define TRUE 1
+
+/* pbs error constants generator */
+/** @see pbs_error_db.h */
+enum PBSE_Constants {
+
+#define PbsErrClient(id, txt) id,
+#include "pbs_error_db.h"
+#undef PbsErrClient
+
+#define PbsErrRm(id, txt) id,
+#include "pbs_error_db.h"
+#undef PbsErrRm
+
+PBSE_TOTAL_CEILING
+};
+/* END: pbs error constants generator */
+
+
+#define PBSE_ 15000
+#define PBSE_NONE       0  /* no error */
+#define RM_ERR_UNKNOWN PBSE_RMUNKNOWN
+#define RM_ERR_BADPARAM PBSE_RMBADPARAM
+#define RM_ERR_NOPARAM PBSE_RMNOPARAM
+#define RM_ERR_EXIST PBSE_RMEXIST
+#define RM_ERR_SYSTEM PBSE_RMSYSTEM
+
+#ifndef NULL
+#define NULL (char *)0
+#endif /* NULL */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+extern char *pbse_to_txt(int);
+
+extern char *pbs_strerror(int);
+#ifdef __cplusplus
+}
+#endif
+
+extern int pbs_errno;
+
+#endif  /* END PBSE_ */
+
+
Index: /tags/4.6.0/src/5.x/pbs_error_db.h
===================================================================
--- /tags/4.6.0/src/5.x/pbs_error_db.h	(revision 342)
+++ /tags/4.6.0/src/5.x/pbs_error_db.h	(revision 342)
@@ -0,0 +1,302 @@
+/** @file This file contains the database of PBS error ids and messages
+*
+* HOWTO USE THIS
+*
+* Add new error:
+*  - choose the appropriate section (client errors, rm errors)
+*  - add new line before the ceiling, the error will be automatically numbered
+*
+* Remove error:
+*  - rewrite the error into a gap (PBSE_GAPxxx or PBSE_RMGAPxxx) with (char*)0
+*    as text part (see PBSE_GAP017 for example)
+*
+* Add new category:
+*  - use the same structure for the new category
+*  - create new name PbsErrSomething
+*  - don't forget the ceiling and floor (and don't forget to give floor a value)
+*  - create respective generators in pbs_error.h and pbs_messages.c
+*
+* @see pbs_error.h and pbs_messages.c for additional info
+*
+* @note NULL strings should be (const char*)0, but that is not possible right now
+*/
+
+#ifdef PbsErrClient
+/* 15000 */
+/* pbs client errors floor (min_client_err - 1) */
+PbsErrClient(PBSE_FLOOR = 15000,     (char *)"no error") /* also works as no error */
+/* Unknown Job Identifier */
+PbsErrClient(PBSE_UNKJOBID,          (char *)"Unknown Job Id Error")
+/* Undefined Attribute */
+PbsErrClient(PBSE_NOATTR,            (char *)"Undefined attribute ")
+/* attempt to set READ ONLY attribute */
+PbsErrClient(PBSE_ATTRRO,            (char *)"Cannot set attribute, read only or insufficient permission ")
+/* Invalid request */
+PbsErrClient(PBSE_IVALREQ,           (char *)"Invalid request")
+/* Unknown batch request */
+PbsErrClient(PBSE_UNKREQ,            (char *)"Unknown request")
+/* Too many submit retries */
+PbsErrClient(PBSE_TOOMANY,           (char *)"Too many submit retries")
+/* No permission */
+PbsErrClient(PBSE_PERM,              (char *)"Unauthorized Request ")
+/* pbs_iff not found */
+PbsErrClient(PBSE_IFF_NOT_FOUND,     (char *)"trqauthd unable to authenticate. User or PID of calling process not found or does not match")
+/* munge not found */
+PbsErrClient(PBSE_MUNGE_NOT_FOUND,   (char *)"munge executable not found, unable to authenticate")
+/* 15010 */
+/* access from host not allowed */
+PbsErrClient(PBSE_BADHOST,           (char *)"Access from host not allowed, or unknown host")
+/* job already exists */
+PbsErrClient(PBSE_JOBEXIST,          (char *)"Job with requested ID already exists")
+/* system error occurred */
+PbsErrClient(PBSE_SYSTEM,            (char *)" System error: ")
+/* internal server error occurred */
+PbsErrClient(PBSE_INTERNAL,          (char *)"PBS server internal error")
+/* parent job of dependent in rte que */
+PbsErrClient(PBSE_REGROUTE,          (char *)"Dependent parent job currently in routing queue")
+/* unknown signal name */
+PbsErrClient(PBSE_UNKSIG,            (char *)"Unknown/illegal signal name")
+/* bad attribute value */
+PbsErrClient(PBSE_BADATVAL,          (char *)"Illegal attribute or resource value for ")
+/* Cannot modify attrib in run state */
+PbsErrClient(PBSE_MODATRRUN,         (char *)"Cannot modify attribute while job running ")
+/* request invalid for job state */
+PbsErrClient(PBSE_BADSTATE,          (char *)"Request invalid for state of job")
+/* gap filler */
+PbsErrClient(PBSE_GAP017,            (char*)0)
+/* 15020 */
+/* Unknown queue name */
+PbsErrClient(PBSE_UNKQUE,            (char *)"Unknown queue")
+/* Invalid Credential in request */
+PbsErrClient(PBSE_BADCRED,           (char *)"Invalid credential")
+/* Expired Credential in request */
+PbsErrClient(PBSE_EXPIRED,           (char *)"Expired credential")
+/* Queue not enabled */
+PbsErrClient(PBSE_QUNOENB,           (char *)"Queue is not enabled")
+/* No access permission for queue */
+PbsErrClient(PBSE_QACESS,            (char *)"Access to queue is denied")
+/* Bad user - no password entry */
+PbsErrClient(PBSE_BADUSER,           (char *)"Bad UID for job execution")
+/* Max hop count exceeded */
+PbsErrClient(PBSE_HOPCOUNT,          (char *)"Job routing over too many hops")
+/* Queue already exists */
+PbsErrClient(PBSE_QUEEXIST,          (char *)"Queue already exists")
+/* incompatable queue attribute type */
+PbsErrClient(PBSE_ATTRTYPE,          (char *)"Incompatible type")
+/* Queue Busy (not empty) */
+PbsErrClient(PBSE_QUEBUSY,           (char *)"Cannot delete busy queue")
+/* 15030 */
+/* Queue name too long */
+PbsErrClient(PBSE_QUENBIG,           (char *)"Queue name too long")
+/* Feature/function not supported */
+PbsErrClient(PBSE_NOSUP,             (char *)"No support for requested service")
+/* Cannot enable queue,needs add def */
+PbsErrClient(PBSE_QUENOEN,           (char *)"Cannot enable queue, incomplete definition")
+/* Protocol error */
+PbsErrClient(PBSE_PROTOCOL,          (char *)"Batch protocol error")
+/* Bad attribute list structure */
+PbsErrClient(PBSE_BADATLST,          (char *)"Bad attribute list structure")
+/* No free connections */
+PbsErrClient(PBSE_NOCONNECTS,        (char *)"No free connections")
+/* No server to connect to */
+PbsErrClient(PBSE_NOSERVER,          (char *)"No server specified")
+/* Unknown resource */
+PbsErrClient(PBSE_UNKRESC,           (char *)"Unknown resource type ")
+/* Job exceeds Queue resource limits */
+PbsErrClient(PBSE_EXCQRESC,          (char *)"Job exceeds queue resource limits")
+/* No Default Queue Defined */
+PbsErrClient(PBSE_QUENODFLT,         (char *)"No default queue specified")
+/* 15040 */
+/* Job Not Rerunnable */
+PbsErrClient(PBSE_NORERUN,           (char *)"job is not rerunnable")
+/* Route rejected by all destinations */
+PbsErrClient(PBSE_ROUTEREJ,          (char *)"Job rejected by all possible destinations (check syntax, queue resources, ...)")
+/* Time in Route Queue Expired */
+PbsErrClient(PBSE_ROUTEEXPD,         (char *)"Time in Route Queue Expired")
+/* Request to MOM failed */
+PbsErrClient(PBSE_MOMREJECT,         (char *)"Execution server rejected request")
+/* (qsub) cannot access script file */
+PbsErrClient(PBSE_BADSCRIPT,         (char *)"(qsub) cannot access script file")
+/* Stage In of files failed */
+PbsErrClient(PBSE_STAGEIN,           (char *)"Stage In of files failed")
+/* Resources temporarily unavailable */
+PbsErrClient(PBSE_RESCUNAV,          (char *)"Resource temporarily unavailable")
+/* Bad Group specified */
+PbsErrClient(PBSE_BADGRP,            (char *)"Bad GID for job execution")
+/* Max number of jobs in queue */
+PbsErrClient(PBSE_MAXQUED,           (char *)"Maximum number of jobs already in queue")
+/* Checkpoint Busy, may be retries */
+PbsErrClient(PBSE_CKPBSY,            (char *)"Checkpoint busy, may retry")
+/* 15050 */
+/* Limit exceeds allowable */
+PbsErrClient(PBSE_EXLIMIT,           (char *)"Resource limit exceeds allowable")
+/* Bad Account attribute value */
+PbsErrClient(PBSE_BADACCT,           (char *)"Invalid Account")
+/* Job already in exit state */
+PbsErrClient(PBSE_ALRDYEXIT,         (char *)"Job already in exit state")
+/* Job files not copied */
+PbsErrClient(PBSE_NOCOPYFILE,        (char *)"Job files not copied")
+/* unknown job id after clean init */
+PbsErrClient(PBSE_CLEANEDOUT,        (char *)"unknown job id after clean init")
+/* No Master in Sync Set */
+PbsErrClient(PBSE_NOSYNCMSTR,        (char *)"No master found for sync job set")
+/* Invalid dependency */
+PbsErrClient(PBSE_BADDEPEND,         (char *)"Invalid Job Dependency")
+/* Duplicate entry in List */
+PbsErrClient(PBSE_DUPLIST,           (char *)"Duplicate entry in list ")
+/* Bad DIS based Request Protocol */
+PbsErrClient(PBSE_DISPROTO,          (char *)"Bad DIS based Request Protocol")
+/* cannot execute there */
+PbsErrClient(PBSE_EXECTHERE,         (char *)"Cannot execute at specified host because of checkpoint or stagein files")
+/* 15060 */
+/* sister rejected */
+PbsErrClient(PBSE_SISREJECT,         (char *)"sister rejected")
+/* sister could not communicate */
+PbsErrClient(PBSE_SISCOMM,           (char *)"sister could not communicate")
+/* req rejected -server shutting down */
+PbsErrClient(PBSE_SVRDOWN,           (char *)"Request not allowed: Server shutting down")
+/* not all tasks could checkpoint */
+PbsErrClient(PBSE_CKPSHORT,          (char *)"not all tasks could checkpoint")
+/* Named node is not in the list */
+PbsErrClient(PBSE_UNKNODE,           (char *)"Unknown node ")
+/* node-attribute not recognized */
+PbsErrClient(PBSE_UNKNODEATR,        (char *)"Unknown node-attribute ")
+/* Server has no node list */
+PbsErrClient(PBSE_NONODES,           (char *)"Server has no node list")
+/* Node name is too big */
+PbsErrClient(PBSE_NODENBIG,          (char *)"Node name is too big")
+/* Node name already exists */
+PbsErrClient(PBSE_NODEEXIST,         (char *)"Node name already exists")
+/* Bad node-attribute value */
+PbsErrClient(PBSE_BADNDATVAL,        (char *)"Illegal value for ")
+/* 15070 */
+/* State values are mutually exclusive */
+PbsErrClient(PBSE_MUTUALEX,          (char *)"Mutually exclusive values for ")
+/* Error(s) during global modification of nodes */
+PbsErrClient(PBSE_GMODERR,           (char *)"Modification failed for ")
+/* could not contact Mom */
+PbsErrClient(PBSE_NORELYMOM,         (char *)"Server could not connect to MOM")
+/* no time-shared nodes */
+PbsErrClient(PBSE_NOTSNODE,          (char *)"No time-share node available")
+/* wrong job type (batch or interactive) */
+PbsErrClient(PBSE_JOBTYPE,           (char *)"Wrong job type")
+/* bad entry in ACL host list */
+PbsErrClient(PBSE_BADACLHOST,        (char *)"Bad ACL entry in host list")
+/* max number of jobs queued for user */
+PbsErrClient(PBSE_MAXUSERQUED,       (char *)"Maximum number of jobs already in queue for user")
+/* bad type in disallowed_types queue attribute */
+PbsErrClient(PBSE_BADDISALLOWTYPE,   (char *)"Bad type in disallowed_types list")
+/* interactive jobs not allowed in queue */
+PbsErrClient(PBSE_NOINTERACTIVE,     (char *)"Queue does not allow interactive jobs")
+/* batch jobs not allowed in queue */
+PbsErrClient(PBSE_NOBATCH,           (char *)"Queue does not allow batch jobs")
+/* 15080 */
+/* rerunable jobs not allowed in queue */
+PbsErrClient(PBSE_NORERUNABLE,       (char *)"Queue does not allow rerunable jobs")
+/* nonrerunable jobs not allowed in queue */
+PbsErrClient(PBSE_NONONRERUNABLE,    (char *)"Queue does not allow nonrerunable jobs")
+/* unknown array id */
+PbsErrClient(PBSE_UNKARRAYID,        (char *)"Unknown Array ID")
+/* bad array request */
+PbsErrClient(PBSE_BAD_ARRAY_REQ,     (char *)"Bad Job Array Request")
+/* Bad file format for array */
+PbsErrClient(PBSE_BAD_ARRAY_DATA,    (char *)"Bad data reading job array from file ")
+/* Time out */
+PbsErrClient(PBSE_TIMEOUT,           (char *)"Time out")
+PbsErrClient(PBSE_JOBNOTFOUND,		 (char *)"Job not found")
+/* fault tolerant jobs not allowed in queue */
+PbsErrClient(PBSE_NOFAULTTOLERANT,   (char *)"Queue does not allow fault tolerant jobs")
+/* only fault tolerant jobs allowed in queue */
+PbsErrClient(PBSE_NOFAULTINTOLERANT, (char *)"Queue does not allow fault intolerant jobs")
+PbsErrClient(PBSE_NOJOBARRAYS, (char *)"Queue does not allow job arrays")
+/* 15090 */
+PbsErrClient(PBSE_RELAYED_TO_MOM, (char *)"request was relayed to a MOM") /* */
+PbsErrClient(PBSE_MEM_MALLOC, (char *)"Error allocating memory - out of memory")
+PbsErrClient(PBSE_MUTEX, (char *)"Error allocating controling mutex (lock/unlock)")
+PbsErrClient(PBSE_THREADATTR, (char *)"Error setting thread attributes")
+PbsErrClient(PBSE_THREAD, (char *)"Error creating thread")
+PbsErrClient(PBSE_SELECT, (char *)"Error in socket select")
+PbsErrClient(PBSE_SOCKET_FAULT, (char *)"Unable to get connection to socket")
+PbsErrClient(PBSE_SOCKET_WRITE, (char *)"Error writing data to socket")
+PbsErrClient(PBSE_SOCKET_READ, (char *)"Error reading data from socket")
+PbsErrClient(PBSE_SOCKET_CLOSE, (char *)"Socket close detected")
+/* 15100 */
+PbsErrClient(PBSE_SOCKET_LISTEN, (char *)"Error listening on socket")
+PbsErrClient(PBSE_AUTH_INVALID, (char *)"Invalid auth type in request")
+PbsErrClient(PBSE_NOT_IMPLEMENTED, (char *)"This functionality is not yet implemented")
+PbsErrClient(PBSE_QUENOTAVAILABLE, (char *)"Queue is currently not available")
+PbsErrClient(PBSE_TMPDIFFOWNER, (char *)"tmpdir owned by another user")
+PbsErrClient(PBSE_TMPNOTDIR, (char *)"tmpdir exists but is not a directory")
+PbsErrClient(PBSE_TMPNONAME, (char *)"tmpdir cannot be named for job")
+PbsErrClient(PBSE_CANTOPENSOCKET, (char *)"cannot open demux sockets")
+PbsErrClient(PBSE_CANTCONTACTSISTERS, (char *)"cannot send join job to all sisters")
+PbsErrClient(PBSE_CANTCREATETMPDIR, (char *)"cannot create tmpdir for job")
+/* 15110 */
+PbsErrClient(PBSE_BADMOMSTATE, (char *)"Mom is down, cannot run job")
+PbsErrClient(PBSE_SOCKET_INFORMATION, (char *)"socket information is not accessible")
+PbsErrClient(PBSE_SOCKET_DATA, (char *)"data on socket does not process correctly")
+PbsErrClient(PBSE_CLIENT_INVALID, (char *)"client is not allowed/trusted")
+PbsErrClient(PBSE_PREMATURE_EOF, (char *)"Premature End of File")
+PbsErrClient(PBSE_CAN_NOT_SAVE_FILE, (char *)"Error saving file")
+PbsErrClient(PBSE_CAN_NOT_OPEN_FILE, (char *)"Error opening file")
+PbsErrClient(PBSE_CAN_NOT_WRITE_FILE, (char *)"Error writing file")
+PbsErrClient(PBSE_JOB_FILE_CORRUPT, (char *)"Job file corrupt")
+PbsErrClient(PBSE_JOB_RERUN, (char *)"Job can not be rerun")
+/* 15120 */
+PbsErrClient(PBSE_CONNECT, (char *)"Can not establish connection")
+PbsErrClient(PBSE_JOBWORKDELAY, (char *)"Job function must be temporarily delayed")
+PbsErrClient(PBSE_BAD_PARAMETER, (char *)"Parameter of function was invalid")
+PbsErrClient(PBSE_CONTINUE, (char *)"Continue processing on job. (Not an error)")
+PbsErrClient(PBSE_JOBSUBSTATE, (char *)"Current sub state does not allow trasaction.")
+PbsErrClient(PBSE_CAN_NOT_MOVE_FILE, (char *)"Error moving file")
+PbsErrClient(PBSE_JOB_RECYCLED,      (char *)"Job is being recycled")
+PbsErrClient(PBSE_JOB_ALREADY_IN_QUEUE, (char *)"Job is already in destination queue.")
+PbsErrClient(PBSE_INVALID_MUTEX, (char *)"Mutex is NULL or otherwise invalid")
+PbsErrClient(PBSE_MUTEX_ALREADY_LOCKED, (char *)"The mutex is already locked by this object")
+/* 15130 */
+PbsErrClient(PBSE_MUTEX_ALREADY_UNLOCKED, (char *)"The mutex has already been unlocked by this object")
+PbsErrClient(PBSE_INVALID_SYNTAX, (char *)"Command syntax invalid")
+PbsErrClient(PBSE_NODE_DOWN, (char *)"A node is down. Check the MOM and host")
+PbsErrClient(PBSE_SERVER_NOT_FOUND, (char *)"Could not connect to batch server")
+PbsErrClient(PBSE_SERVER_BUSY, (char *)"Pbs Server is currently too busy to service this request. Please retry this request.")
+PbsErrClient(PBSE_CLIENT_CONN_NOT_FOUND, (char *)"Client connection not found. trqauthd unable to authorize user. Possible transient failure. Please try again")
+PbsErrClient(PBSE_CANNOT_RESOLVE, (char *)"Could not resolve host name")
+PbsErrClient(PBSE_DOMAIN_SOCKET_FAULT, (char *)"could not connect to trqauthd")
+PbsErrClient(PBSE_JOB_NOT_IN_QUEUE, (char *)"Job not found in queue.")
+PbsErrClient(PBSE_LOGIN_BUSY, (char *)"Login node is currently too busy to run a job")
+PbsErrClient(PBSE_NODE_CANT_MANAGE_FREQUENCY, (char *)"The cpu frequency for this node can not be modified.")
+PbsErrClient(PBSE_FREQUENCY_NOT_AVAILABLE, (char *)"Requested governor or frequency is not available.")
+PbsErrClient(PBSE_UNEXPECTED_DATA_IN_FILE, (char *)"File contains unexpected data.")
+PbsErrClient(PBSE_CAN_NOT_READ_FILE, (char *)"Error reading file")
+PbsErrClient(PBSE_NO_MATCHING_FREQUENCY, (char *)"No matching frequency available.")
+PbsErrClient(PBSE_INVALID_FREQUENCY_FILE, (char *)"Unable to read base frequency file.")
+PbsErrClient(PBSE_CHANGED_CPU_FREQUENCY, (char *)"Changed cpu clock frequency.")
+PbsErrClient(PBSE_INVALID_POWER_STATE_TRANSISTION, (char *)"Nodes can not be changed from one low power state directly to another.")
+PbsErrClient(PBSE_POWER_STATE_UNSUPPORTED, (char *)"The node does not support changing the power state.")
+PbsErrClient(PBSE_POWER_STATE_UNAVAILABLE, (char *)"The node does not support the requested power state.")
+PbsErrClient(PBSE_CANT_CHANGE_POWER_STATE_WITH_JOBS_RUNNING, (char *)"Can't change power state on a node which has running jobs.")
+PbsErrClient(PBSE_CANT_WAKE_OFF_MACHINE, (char *)"Unable to wake a node in hibernate or shutdown state.")
+
+/* pbs client errors ceiling (max_client_err + 1) */
+PbsErrClient(PBSE_CEILING,           (char*)0)
+#endif
+
+#ifdef PbsErrRm
+/* pbs rm errors floor (min_rm_err - 1) */
+PbsErrRm(PBSE_RMFLOOR = 15200,       (char*)0)
+/* resource unknown */
+PbsErrRm(PBSE_RMUNKNOWN,             (char *)"resource unknown")
+/* parameter could not be used */
+PbsErrRm(PBSE_RMBADPARAM,            (char *)"parameter could not be used")
+/* a parameter needed did not exist */
+PbsErrRm(PBSE_RMNOPARAM,             (char *)"a parameter needed did not exist")
+/* something specified didn't exist */
+PbsErrRm(PBSE_RMEXIST,               (char *)"something specified didn't exist")
+/* a system error occured */
+PbsErrRm(PBSE_RMSYSTEM,              (char *)"a system error occured")
+/* only part of reservation made */
+PbsErrRm(PBSE_RMPART,                (char *)"only part of reservation made")
+/* pbs rm errors ceiling (max_rm_err + 1) */
+PbsErrRm(PBSE_RMCEILING,             (char*)0)
+#endif
+
Index: /tags/4.6.0/src/5.x/pbs_ifl.h
===================================================================
--- /tags/4.6.0/src/5.x/pbs_ifl.h	(revision 342)
+++ /tags/4.6.0/src/5.x/pbs_ifl.h	(revision 342)
@@ -0,0 +1,689 @@
+/*
+*         OpenPBS (Portable Batch System) v2.3 Software License
+*
+* Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+* All rights reserved.
+*
+* ---------------------------------------------------------------------------
+* For a license to use or redistribute the OpenPBS software under conditions
+* other than those described below, or to purchase support for this software,
+* please contact Veridian Systems, PBS Products Department ("Licensor") at:
+*
+*    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+*                        877 902-4PBS (US toll-free)
+* ---------------------------------------------------------------------------
+*
+* This license covers use of the OpenPBS v2.3 software (the "Software") at
+* your site or location, and, for certain users, redistribution of the
+* Software to other sites and locations.  Use and redistribution of
+* OpenPBS v2.3 in source and binary forms, with or without modification,
+* are permitted provided that all of the following conditions are met.
+* After December 31, 2001, only conditions 3-6 must be met:
+*
+* 1. Commercial and/or non-commercial use of the Software is permitted
+*    provided a current software registration is on file at www.OpenPBS.org.
+*    If use of this software contributes to a publication, product, or
+*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
+*
+* 2. Redistribution in any form is only permitted for non-commercial,
+*    non-profit purposes.  There can be no charge for the Software or any
+*    software incorporating the Software.  Further, there can be no
+*    expectation of revenue generated as a consequence of redistributing
+*    the Software.
+*
+* 3. Any Redistribution of source code must retain the above copyright notice
+*    and the acknowledgment contained in paragraph 6, this list of conditions
+*    and the disclaimer contained in paragraph 7.
+*
+* 4. Any Redistribution in binary form must reproduce the above copyright
+*    notice and the acknowledgment contained in paragraph 6, this list of
+*    conditions and the disclaimer contained in paragraph 7 in the
+*    documentation and/or other materials provided with the distribution.
+*
+* 5. Redistributions in any form must be accompanied by information on how to
+*    obtain complete source code for the OpenPBS software and any
+*    modifications and/or additions to the OpenPBS software.  The source code
+*    must either be included in the distribution or be available for no more
+*    than the cost of distribution plus a nominal fee, and all modifications
+*    and additions to the Software must be freely redistributable by any party
+*    (including Licensor) without restriction.
+*
+* 6. All advertising materials mentioning features or use of the Software must
+*    display the following acknowledgment:
+*
+*     "This product includes software developed by NASA Ames Research Center,
+*     Lawrence Livermore National Laboratory, and Veridian Information
+*     Solutions, Inc.
+*     Visit www.OpenPBS.org for OpenPBS software support,
+*     products, and information."
+*
+* 7. DISCLAIMER OF WARRANTY
+*
+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+* ARE EXPRESSLY DISCLAIMED.
+*
+* IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+* U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* This license will be governed by the laws of the Commonwealth of Virginia,
+* without reference to its choice of law rules.
+*/
+
+/*
+ *
+ *  pbs_ifl.h
+ *
+ */
+
+#ifndef _PBS_IFL_DEF
+#define _PBS_IFL_DEF
+#include <sys/socket.h>
+
+/* Attribute Names used by user commands */
+
+#define ATTR_a "Execution_Time"
+#define ATTR_c "Checkpoint"
+#define ATTR_e "Error_Path"
+#define ATTR_f "fault_tolerant"
+#define ATTR_g "group_list"
+#define ATTR_h "Hold_Types"
+#define ATTR_j "Join_Path"
+#define ATTR_k "Keep_Files"
+#define ATTR_l "Resource_List"
+#define ATTR_m "Mail_Points"
+#define ATTR_o "Output_Path"
+#define ATTR_p "Priority"
+#define ATTR_q "destination"
+#define ATTR_r "Rerunable"
+#define ATTR_t "job_array_request"
+#define ATTR_array_id "job_array_id"
+#define ATTR_u "User_List"
+#define ATTR_v "Variable_List"
+#define ATTR_A "Account_Name"
+#define ATTR_args "job_arguments"
+#define ATTR_reservation_id "reservation_id"
+#define ATTR_login_node_id "login_node_id"
+#define ATTR_login_prop "login_property"
+#define ATTR_external_nodes "external_nodes"
+#define ATTR_multi_req_alps "multi_req_alps"
+#define ATTR_M "Mail_Users"
+#define ATTR_N "Job_Name"
+#define ATTR_S "Shell_Path_List"
+#define ATTR_depend   "depend"
+#define ATTR_inter    "interactive"
+#define ATTR_stagein  "stagein"
+#define ATTR_stageout "stageout"
+#define ATTR_jobtype  "jobtype"
+#define ATTR_submit_host "submit_host"
+#define ATTR_init_work_dir "init_work_dir"
+/* The following were part of the variable_list */
+#define ATTR_pbs_o_initdir          "PBS_O_INITDIR"
+#define ATTR_pbs_o_rootdir          "PBS_O_ROOTDIR"
+#define ATTR_pbs_o_workdir          "PBS_O_WORKDIR" /* same as init_work_dir */
+#define ATTR_pbs_o_host             "PBS_O_HOST" /* same as submit_host */
+#define ATTR_pbs_o_server           "PBS_O_SERVER"
+#define ATTR_pbs_o_home             "PBS_O_HOME"
+#define ATTR_pbs_o_logname          "PBS_O_LOGNAME"
+#define ATTR_pbs_o_path             "PBS_O_PATH"
+#define ATTR_pbs_o_mail             "PBS_O_MAIL"
+#define ATTR_pbs_o_shell            "PBS_O_SHELL"
+#define ATTR_pbs_o_tz               "PBS_O_TZ"
+#define ATTR_pbs_o_lang             "PBS_O_LANG"
+#define ATTR_pbs_o_uid              "PBS_O_UID"
+#define ATTR_pbs_o_submit_filter    "PBS_O_SUBMIT_FILTER"
+
+/* additional job and general attribute names */
+
+#define ATTR_ctime      "ctime"
+#define ATTR_exechost   "exec_host"
+#define ATTR_execport	"exec_port"
+#define ATTR_mtime      "mtime"
+#define ATTR_qtime      "qtime"
+#define ATTR_session    "session_id"
+#define ATTR_euser      "euser"
+#define ATTR_egroup     "egroup"
+#define ATTR_hashname   "hashname"
+#define ATTR_hopcount   "hop_count"
+#define ATTR_security   "security"
+#define ATTR_sched_hint "sched_hint"
+#define ATTR_substate   "substate"
+#define ATTR_name       "Job_Name"
+#define ATTR_owner      "Job_Owner"
+#define ATTR_used       "resources_used"
+#define ATTR_state      "job_state"
+#define ATTR_queue      "queue"
+#define ATTR_server     "server"
+#define ATTR_maxrun     "max_running"
+#define ATTR_maxreport  "max_report"
+#define ATTR_total      "total_jobs"
+#define ATTR_comment    "comment"
+#define ATTR_cookie     "cookie"
+#define ATTR_qrank      "queue_rank"
+#define ATTR_altid      "alt_id"
+#define ATTR_etime      "etime"
+#define ATTR_exitstat   "exit_status"
+#define ATTR_forwardx11 "forward_x11"
+#define ATTR_submit_args "submit_args"
+#define ATTR_tokens     "tokens"
+#define ATTR_netcounter "net_counter"
+#define ATTR_umask      "umask"
+#define ATTR_start_time "start_time"
+#define ATTR_start_count "start_count"
+#define ATTR_checkpoint_dir  "checkpoint_dir"    /* user specified directory for checkpoint files */
+#define ATTR_checkpoint_name  "checkpoint_name"   /* user specified name of checkpoint file */
+#define ATTR_checkpoint_time  "checkpoint_time"   /* timestamp of start of last checkpoint */
+#define ATTR_checkpoint_restart_status  "checkpoint_restart_status"   /* checkpoint restart status */
+#define ATTR_restart_name	"restart_name"   /* saved name of checkpoint restart file */
+#define ATTR_comp_time   	"comp_time"
+#define ATTR_reported    	"reported"
+#define ATTR_intcmd      	"inter_cmd"
+#define ATTR_job_radix		"job_radix"
+#define ATTR_sister_list	"sister_list"
+#define ATTR_total_runtime  "total_runtime"
+#define ATTR_P           "proxy_user"
+#define ATTR_node_exclusive "node_exclusive"
+#define ATTR_exec_gpus   "exec_gpus"
+#define ATTR_exec_mics   "exec_mics"
+#define ATTR_J           "job_id"
+#define ATTR_pagg         "pagg_id"
+#define ATTR_system_start_time "system_start_time"
+  /* JOB_ATR_gpu_flags */
+#define ATTR_gpu_flags		"gpu_flags"
+
+/* additional queue attributes names */
+
+#define ATTR_aclgren    "acl_group_enable"
+#define ATTR_aclgroup   "acl_groups"
+#define ATTR_aclhten    "acl_host_enable"
+#define ATTR_aclhost    "acl_hosts"
+#define ATTR_acluren    "acl_user_enable"
+#define ATTR_acluser    "acl_users"
+#define ATTR_altrouter  "alt_router"
+#define ATTR_checkpoint_min  "checkpoint_min"
+#define ATTR_checkpoint_defaults  "checkpoint_defaults"
+#define ATTR_enable     "enabled"
+#define ATTR_fromroute  "from_route_only"
+#define ATTR_hostlist    "hostlist"         /* TORQUE only */
+#define ATTR_killdelay   "kill_delay"
+#define ATTR_maxgrprun   "max_group_run"
+#define ATTR_maxque      "max_queuable"
+#define ATTR_maxuserque  "max_user_queuable"
+#define ATTR_maxuserrun  "max_user_run"
+#define ATTR_qtype       "queue_type"
+#define ATTR_rescassn    "resources_assigned"
+#define ATTR_rescdflt    "resources_default"
+#define ATTR_rescmax     "resources_max"
+#define ATTR_rescmin     "resources_min"
+#define ATTR_featreqd    "features_required"
+#define ATTR_req_login_property "required_login_property"
+#define ATTR_rerunnable  "restartable"      /* TORQUE only */
+#define ATTR_rndzretry   "rendezvous_retry"
+#define ATTR_routedest   "route_destinations"
+#define ATTR_routeheld   "route_held_jobs"
+#define ATTR_routewait   "route_waiting_jobs"
+#define ATTR_routeretry  "route_retry_time"
+#define ATTR_routelife   "route_lifetime"
+#define ATTR_rsvexpdt    "reserved_expedite"
+#define ATTR_rsvsync     "reserved_sync"
+#define ATTR_start       "started"
+#define ATTR_count       "state_count"
+#define ATTR_number      "number_jobs"
+#define ATTR_acllogic    "acl_logic_or"
+#define ATTR_aclgrpslpy  "acl_group_sloppy"
+#define ATTR_keepcompleted "keep_completed"
+#define ATTR_disallowedtypes "disallowed_types"
+#define ATTR_is_transit  "is_transit"
+
+/* additional server attributes names */
+
+/* NOTE: steps for adding new attribute described in ??? */
+/*  - create #define ATTR_* in include/pbs_ifl.h
+    - insert SRV_ATR_* in include/server.h
+    - add ATTR_* in include/qmgr_svr_public.h
+    - insert structure in server/svr_attr_def.c
+        NOTE:  structure must be in same relative position as SRV_ATR_*
+    - insert usage code in proper location
+*/
+
+#define ATTR_aclroot     "acl_roots"
+#define ATTR_managers    "managers"
+#define ATTR_dfltque     "default_queue"
+#define ATTR_dispsvrsuffix "display_job_server_suffix"
+#define ATTR_jobsuffixalias "job_suffix_alias"
+#define ATTR_defnode     "default_node"
+#define ATTR_locsvrs     "location_servers"
+#define ATTR_logevents   "log_events"
+#define ATTR_logfile     "log_file"
+#define ATTR_loglevel    "log_level"
+#define ATTR_mailfrom    "mail_from"
+#define ATTR_nodepack    "node_pack"
+#define ATTR_nodesuffix  "node_suffix"
+#define ATTR_operators   "operators"
+#define ATTR_queryother  "query_other_jobs"
+#define ATTR_resccost    "resources_cost"
+#define ATTR_rescavail   "resources_available"
+#define ATTR_schedit     "scheduler_iteration"
+#define ATTR_scheduling  "scheduling"
+#define ATTR_status      "server_state"
+#define ATTR_syscost     "system_cost"
+#define ATTR_pingrate    "node_ping_rate"
+#define ATTR_ndchkrate   "node_check_rate"
+#define ATTR_tcptimeout  "tcp_timeout"
+#define ATTR_jobstatrate "job_stat_rate"
+#define ATTR_polljobs    "poll_jobs"
+#define ATTR_downonerror "down_on_error"
+#define ATTR_disableserveridcheck "disable_server_id_check"
+#define ATTR_jobnanny    "job_nanny"
+#define ATTR_ownerpurge  "owner_purge"
+#define ATTR_qcqlimits   "queue_centric_limits"
+#define ATTR_momjobsync  "mom_job_sync"
+#define ATTR_maildomain  "mail_domain"
+#define ATTR_pbsversion  "pbs_version"
+#define ATTR_submithosts "submit_hosts"
+#define ATTR_allownodesubmit  "allow_node_submit"
+#define ATTR_allowproxyuser   "allow_proxy_user"
+#define ATTR_autonodenp  "auto_node_np"
+#define ATTR_servername  "server_name"
+#define ATTR_logfilemaxsize "log_file_max_size"
+#define ATTR_logfilerolldepth "log_file_roll_depth"
+#define ATTR_logkeepdays  "log_keep_days"
+#define ATTR_nextjobnum   "next_job_number"
+#define ATTR_extraresc    "extra_resc"
+#define ATTR_schedversion "sched_version"
+#define ATTR_acctkeepdays "accounting_keep_days"
+#define ATTR_lockfile "lock_file"
+#define ATTR_credentiallifetime "credential_lifetime"
+#define ATTR_jobmustreport "job_must_report"
+#define ATTR_LockfileUpdateTime "lock_file_update_time"
+#define ATTR_LockfileCheckTime "lock_file_check_time"
+#define ATTR_npdefault  "np_default"
+#define ATTR_clonebatchsize "clone_batch_size"
+#define ATTR_clonebatchdelay "clone_batch_delay"
+#define ATTR_jobstarttimeout "job_start_timeout"
+#define ATTR_jobforcecanceltime "job_force_cancel_time"
+#define ATTR_maxarraysize    "max_job_array_size"
+#define ATTR_maxslotlimit    "max_slot_limit"
+#define ATTR_recordjobinfo   "record_job_info"
+#define ATTR_recordjobscript   "record_job_script"
+#define ATTR_joblogfilemaxsize "job_log_file_max_size"
+#define ATTR_joblogfilerolldepth "job_log_file_roll_depth"
+#define ATTR_joblogkeepdays  "job_log_keep_days"
+#ifdef MUNGE_AUTH
+  #define ATTR_authusers       "authorized_users"
+#endif
+#define ATTR_minthreads          "min_threads"
+#define ATTR_maxthreads          "max_threads"
+#define ATTR_threadidleseconds   "thread_idle_seconds"
+#define ATTR_moabarraycompatible "moab_array_compatible"
+#define ATTR_nomailforce             "no_mail_force"
+#define ATTR_interactivejobscanroam  "interactive_jobs_can_roam" 
+#define ATTR_crayenabled             "cray_enabled"
+#define ATTR_nppcu                   "nppcu"
+#define ATTR_login_node_key          "login_node_key"
+#define ATTR_maxuserqueuable         "max_user_queuable"
+#define ATTR_automaticrequeueexitcode "automatic_requeue_exit_code"
+#define ATTR_jobsynctimeout           "job_sync_timeout"
+#define ATTR_pass_cpu_clock           "pass_cpu_clock"
+/* additional node "attributes" names */
+
+#define ATTR_NODE_state            "state"
+#define ATTR_NODE_power_state      "power_state"
+#define ATTR_NODE_np               "np"
+#define ATTR_NODE_properties       "properties"
+#define ATTR_NODE_ntype            "ntype"
+#define ATTR_NODE_jobs             "jobs"
+#define ATTR_NODE_status           "status"
+#define ATTR_NODE_note             "note"
+#define ATTR_NODE_mom_port	       "mom_service_port"
+#define ATTR_NODE_mom_rm_port      "mom_manager_port" 
+#define ATTR_NODE_num_node_boards  "num_node_boards"
+#define ATTR_NODE_numa_str         "numa_board_str"
+#define ATTR_NODE_gpus             "gpus"
+#define ATTR_NODE_gpustatus        "gpu_status"
+#define ATTR_NODE_gpus_str         "numa_gpu_node_str"
+#define ATTR_NODE_mics             "mics"
+#define ATTR_NODE_micstatus        "mic_status"
+
+#define ATTR_copy_on_rerun         "copy_on_rerun"
+#define ATTR_job_exclusive_on_use   "job_exclusive_on_use"
+
+/* notification email formating */
+#define ATTR_mailsubjectfmt "mail_subject_fmt"
+#define ATTR_mailbodyfmt    "mail_body_fmt"
+
+
+/* various attribute values */
+
+#define CHECKPOINT_UNSPECIFIED "u"
+#define NO_HOLD "n"
+#define NO_JOIN "n"
+#define NO_KEEP "n"
+#define MAIL_AT_ABORT "a"
+#define DEFAULT_PRIORITY "0"
+
+
+
+#define ARRAY_RANGE  "array_range=" /* see qdel.c */
+#define DELDELAY     "deldelay=" /* see qdel.c */
+#define DELPURGE     "delpurge="   /* see qdel.c */
+#define DELASYNC     "delasync"   /* see req_delete.c */
+#define PURGECOMP    "purgecomplete="   /* see req_delete.c */
+#define EXECQUEONLY  "exec_queue_only"   /* see req_stat.c */
+#define RERUNFORCE   "force"
+
+#define USER_HOLD   "u"
+#define OTHER_HOLD  "o"
+#define SYSTEM_HOLD "s"
+
+/* node-attribute values (state,ntype) */
+
+#define ND_free          "free"
+#define ND_offline       "offline"
+#define ND_down          "down"
+#define ND_reserve       "reserve"
+#define ND_job_exclusive "job-exclusive"
+#define ND_job_sharing   "job-sharing"
+#define ND_busy          "busy"
+#define ND_state_unknown "state-unknown"
+
+/* node power state values */
+
+#define ND_running       "Running"
+#define ND_standby       "Standby"
+#define ND_suspend       "Suspend"
+#define ND_sleep         "Sleep"
+#define ND_hibernate     "Hibernate"
+#define ND_shutdown      "Shutdown"
+
+/* these are not state values, they describe states and are used in pbsnodes */
+/* active = job-exclusive, job-sharing, or busy */
+#define ND_active        "active"
+/* all = all */
+#define ND_all           "all"
+/* up = job-execlusive, job-sharing, reserve, free, busy and time-shared */
+#define ND_up            "up"
+
+/* this specifies the type of node */
+#define ND_timeshared    "time-shared"
+#define ND_cluster       "cluster"
+
+/* queue disallowed types */
+#define Q_DT_batch              "batch"
+#define Q_DT_interactive        "interactive"
+#define Q_DT_rerunable          "rerunable"
+#define Q_DT_nonrerunable       "nonrerunable"
+#define Q_DT_fault_tolerant     "fault_tolerant"
+#define Q_DT_fault_intolerant   "fault_intolerant"
+#define Q_DT_job_array          "job_array"
+
+/*constant related to sum of string lengths for above strings*/
+#define MAX_ENCODE_BFR  150
+
+#define MGR_CMD_CREATE 0
+#define MGR_CMD_DELETE 1
+#define MGR_CMD_SET 2
+#define MGR_CMD_UNSET 3
+#define MGR_CMD_LIST 4
+#define MGR_CMD_PRINT 5
+#define MGR_CMD_ACTIVE 6
+
+#define MGR_OBJ_NONE -1
+#define MGR_OBJ_SERVER  0
+#define MGR_OBJ_QUEUE   1
+#define MGR_OBJ_JOB 2
+#define MGR_OBJ_NODE 3
+
+/* Misc defines for various requests */
+
+#define MSG_OUT 1
+#define MSG_ERR 2
+
+#define SHUT_SIG -1
+#define SHUT_IMMEDIATE 0
+#define SHUT_DELAY 1
+#define SHUT_QUICK 2
+
+#define SIG_RESUME "resume"
+#define SIG_SUSPEND "suspend"
+
+
+/* WARNING: be careful changing these PBS_MAX* values.  They can result in a
+   change in the structure of the .JB file, and binary incompatibilities between
+   versions of TORQUE.  Do not change in a -fixes branch, avoid changing in
+   a minor release if possible */
+
+
+
+#define PBS_MAXHOSTNAME  1024 /* max host name length */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN  1024 /* max path name length */
+#endif
+
+#ifndef MAXPORTLEN
+#define MAXPORTLEN  5
+#endif
+
+#ifndef MAXNAMLEN
+#define MAXNAMLEN  255
+#endif
+#define MAX_NOTE  256 /* max node note length */
+#define MAX_NOTE_STR  "256" /* max node note length as a string literal (this MUST match MAX_NOTE) */
+
+#define PBS_MAXUSER  32 /* max user name length */
+#define PBS_MAXGRPN  16 /* max group name length */
+#define PBS_MAXGPUID 16 /* max gpu id length */
+#define PBS_MAXQUEUENAME 15 /* max queue name length */
+#define PBS_MAXSERVERNAME PBS_MAXHOSTNAME /* max server name length */
+#define PBS_MAXJOBARRAYLEN      7       /* number of characters allowed in jobarray portion of job id, including '[]' */
+#ifdef USE_MAXINT_JOBIDS
+#define PBS_MAXSEQNUM  12 /* max sequence number length */
+#else
+#define PBS_MAXSEQNUM  8 /* max sequence number length */
+#endif
+#define PBS_MAXPORTNUM  5 /* udp/tcp port numbers max=16 bits */
+#define PBS_MAXJOBARRAY  99999
+#define PBS_MAXSVRJOBID  (PBS_MAXSEQNUM + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + PBS_MAXJOBARRAYLEN + 2 ) /* server job id size */
+#define PBS_MAXCLTJOBID  (PBS_MAXSVRJOBID + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + PBS_MAXJOBARRAYLEN + 2) /* client job id size */
+#define PBS_MAXDEST  1024  /* destination size -- increased from 256 */
+#define PBS_MAXROUTEDEST (PBS_MAXQUEUENAME + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* destination size */
+#define PBS_USE_IFF  1 /* pbs_connect() to call pbs_iff */
+#define PBS_INTERACTIVE  1 /* Support of Interactive jobs */
+#define PBS_TERM_BUF_SZ  80 /* Interactive term buffer size */
+#define PBS_TERM_CCA  6 /* Interactive term cntl char array */
+
+#define PBS_MAXCREDENTIAL_LEN 2048 /* Maximum authentication credential length. */
+/* constants used to indicate version of job ji_qs struct written to disk.
+   starting with 2.4.0 we stopped encoding the torque version number into the
+   hex value e.g. 0x00020300 for torque v2.3.0. Now we just increment a value
+   which is added to the last version encoded that way */
+#define PBS_QS_VERSION_BASE 0x00020300 /* magic number do not change */
+#define PBS_QS_VERSION_INT 2 /* increment this version number with every change to the ji_qs struct */
+#define PBS_QS_VERSION  (PBS_QS_VERSION_BASE + PBS_QS_VERSION_INT) /* version number saved in the ji_qs struct */
+
+/* someday the PBS_*_PORT definition will go away and only the */
+/* PBS_*_SERVICE_NAME form will be used, maybe   */
+
+#define PBS_BATCH_SERVICE_NAME  "pbs"
+
+#ifndef PBS_BATCH_SERVICE_PORT
+#define PBS_BATCH_SERVICE_PORT  15001
+#endif /* PBS_BATCH_SERVICE_PORT */
+
+#define PBS_BATCH_SERVICE_NAME_DIS "pbs_dis" /* new DIS port   */
+
+#define PBS_MOM_SERVICE_NAME  "pbs_mom"
+
+#ifndef PBS_MOM_SERVICE_PORT
+#define PBS_MOM_SERVICE_PORT  15002
+#endif /* PBS_MOM_SERVICE_PORT */
+
+#define PBS_MANAGER_SERVICE_NAME "pbs_resmon"
+
+#ifndef PBS_MANAGER_SERVICE_PORT
+#define PBS_MANAGER_SERVICE_PORT 15003
+#endif /* PBS_MANAGER_SERVICE_PORT */
+
+#define PBS_SCHEDULER_SERVICE_NAME "pbs_sched"
+
+#ifndef PBS_SCHEDULER_SERVICE_PORT
+#define PBS_SCHEDULER_SERVICE_PORT 15004
+#endif /* PBS_SCHEDULER_SERVICE_PORT */
+
+#ifndef TRQ_AUTHD_SERVICE_PORT
+#define TRQ_AUTHD_SERVICE_PORT 15005
+#endif /* TRQ_AUTHD_SERVICE_PORT */
+
+/*
+ * Other misc checkpoint defines
+ */
+#define CHECKPOINTHOLD "checkpoint_hold"
+#define CHECKPOINTCONT "checkpoint_cont"
+#define MOM_DEFAULT_CHECKPOINT_DIR "$MOMDEFAULTCHECKPOINTDIR$"
+
+#define NO_MOM_RELAY 1
+
+enum batch_op { SET, UNSET, INCR, DECR, EQ, NE, GE, GT, LE, LT, DFLT, MERGE, INCR_OLD };
+
+/* ALPS nppcu values */
+enum nppcu_values { NPPCU_ALPS_CHOOSES = 0, NPPCU_NO_USE_HT, NPPCU_USE_HT };
+
+/*
+** This structure is identical to attropl so they can be used
+** interchangably.  The op field is not used.
+*/
+
+struct attrl
+  {
+
+  struct attrl  *next;
+  char          *name;
+  char          *resource;
+  char          *value;
+  enum batch_op  op; /* not used */
+  };
+
+struct attropl
+  {
+
+  struct attropl *next;
+  char   *name;
+  char   *resource;
+  char   *value;
+  enum batch_op   op;
+  };
+
+struct batch_status
+  {
+
+  struct batch_status *next;
+  char                *name;
+
+  struct attrl        *attribs;
+  char                *text;
+  };
+
+
+
+
+/* Resource Reservation Information */
+typedef int resource_t;  /* resource reservation handle */
+
+#define RESOURCE_T_NULL  (resource_t)0
+#define RESOURCE_T_ALL  (resource_t)-1
+
+extern char *pbs_server; /* server attempted to connect | connected to */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* see pbs_connect(3B)         */
+
+char *avail(int connect, char *resc);
+int pbs_asyrunjob(int c, char *jobid, char *location, char *extend);
+int pbs_alterjob_async(int connect, char *job_id, struct attrl *attrib, char *extend);
+int pbs_alterjob(int connect, char *job_id, struct attrl *attrib, char *extend);
+int pbs_connect(char *server);
+int pbs_query_max_connections();
+char *pbs_default(void);
+char *pbs_fbserver(void);
+char *pbs_get_server_list(void);
+
+int pbs_deljob(int connect, char *job_id, char *extend);
+int pbs_disconnect(int connect);
+char *pbs_geterrmsg(int connect);
+int pbs_holdjob(int connect, char *job_id, char *hold_type, char *extend);
+int pbs_checkpointjob(int connect, char *job_id, char *extend);
+char *pbs_locjob(int connect, char *job_id, char *extend);
+
+int pbs_manager(int connect, int command, int obj_type, char *obj_name, struct attropl *attrib, char *extend);
+
+int pbs_movejob(int connect, char *job_id, char *destination, char *extend);
+
+int pbs_msgjob(int connect, char *job_id, int file, char *message, char *extend);
+
+int pbs_orderjob(int connect, char *job1, char *job2, char *extend);
+
+int pbs_rescquery(int connect, char **rlist, int nresc, int *avail,
+                    int *alloc, int *resv, int *down);
+
+int pbs_rescreserve(int connect, char **rlist, int nresc, resource_t *phandle);
+
+int pbs_rescrelease(int connect, resource_t rhandle);
+
+int pbs_rerunjob(int connect, char *job_id, char *extend);
+
+int pbs_rlsjob(int connect, char *job_id, char *hold_type, char *extend);
+
+int pbs_runjob(int connect, char *jobid, char *loc, char *extend);
+
+char **pbs_selectjob(int connect, struct attropl *select_list, char *extend);
+
+int pbs_sigjob(int connect, char *job_id, char *signal, char *extend);
+
+int pbs_sigjobasync(int connect, char *job_id, char *signal, char *extend);
+
+void pbs_statfree(struct batch_status *stat);
+
+struct batch_status *pbs_statjob(int connect, char *id, struct attrl *attrib, char *extend);
+
+struct batch_status *pbs_selstat(int connect, struct attropl *select_list, char *extend);
+
+struct batch_status *pbs_statque(int connect, char *id, struct attrl *attrib, char *extend);
+
+struct batch_status *pbs_statserver(int connect, struct attrl *attrib, char *extend);
+
+struct batch_status *pbs_statnode(int connect, char *id, struct attrl *attrib, char *extend);
+
+char *pbs_submit(int connect, struct attropl *attrib, char *script, char *destination, char *extend);
+
+int pbs_submit_hash_ext(int connect, void *job_attr, void *res_attr, char *script, char *destination, char *extend, char **job_id, char **msg);
+
+int pbs_terminate(int connect, int manner, char *extend);
+
+int totpool(int connect, int update);
+
+int usepool(int connect, int update);
+
+int pbs_gpumode(int connect, char *node, char *gpuid, int gpumode);
+
+int trq_set_preferred_network_interface(char *if_name, struct sockaddr *preferred_addr);
+char *trq_get_if_name(void);
+
+/* used by Moab */
+int pbs_stagein(int, char *, char *, char *);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _PBS_IFL_DEF */
+
+/*  end of pbs_ifl.h  */
Index: /tags/4.6.0/src/5.x/pbs_wrap.cxx
===================================================================
--- /tags/4.6.0/src/5.x/pbs_wrap.cxx	(revision 342)
+++ /tags/4.6.0/src/5.x/pbs_wrap.cxx	(revision 342)
@@ -0,0 +1,9676 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.7
+ * 
+ * This file is not intended to be easily readable and contains a number of 
+ * coding conventions designed to improve portability and efficiency. Do not make
+ * changes to this file unless you know what you are doing--modify the SWIG 
+ * interface file instead. 
+ * ----------------------------------------------------------------------------- */
+
+#define SWIGPYTHON
+#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+
+/* -----------------------------------------------------------------------------
+ *  This section contains generic SWIG labels for method/variable
+ *  declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+#  define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+#   define SWIGINLINE inline
+# else
+#   define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define SWIGUNUSED __attribute__ ((__unused__)) 
+#   else
+#     define SWIGUNUSED
+#   endif
+# elif defined(__ICC)
+#   define SWIGUNUSED __attribute__ ((__unused__)) 
+# else
+#   define SWIGUNUSED 
+# endif
+#endif
+
+#ifndef SWIG_MSC_UNSUPPRESS_4505
+# if defined(_MSC_VER)
+#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
+# endif 
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+#   define SWIGUNUSEDPARM(p)
+# else
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#  ifndef GCC_HASCLASSVISIBILITY
+#    define GCC_HASCLASSVISIBILITY
+#  endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define SWIGEXPORT
+#   else
+#     define SWIGEXPORT __declspec(dllexport)
+#   endif
+# else
+#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+#     define SWIGEXPORT __attribute__ ((visibility("default")))
+#   else
+#     define SWIGEXPORT
+#   endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   define SWIGSTDCALL __stdcall
+# else
+#   define SWIGSTDCALL
+# endif 
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
+
+/* Python.h has to appear first */
+#include <Python.h>
+
+/* -----------------------------------------------------------------------------
+ * swigrun.swg
+ *
+ * This file contains generic C API SWIG runtime support for pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* This should only be incremented when either the layout of swig_type_info changes,
+   or for whatever reason, the runtime changes incompatibly */
+#define SWIG_RUNTIME_VERSION "4"
+
+/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
+#ifdef SWIG_TYPE_TABLE
+# define SWIG_QUOTE_STRING(x) #x
+# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
+# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
+#else
+# define SWIG_TYPE_TABLE_NAME
+#endif
+
+/*
+  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
+  creating a static or dynamic library from the SWIG runtime code.
+  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
+  
+  But only do this if strictly necessary, ie, if you have problems
+  with your compiler or suchlike.
+*/
+
+#ifndef SWIGRUNTIME
+# define SWIGRUNTIME SWIGINTERN
+#endif
+
+#ifndef SWIGRUNTIMEINLINE
+# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
+#endif
+
+/*  Generic buffer size */
+#ifndef SWIG_BUFFER_SIZE
+# define SWIG_BUFFER_SIZE 1024
+#endif
+
+/* Flags for pointer conversions */
+#define SWIG_POINTER_DISOWN        0x1
+#define SWIG_CAST_NEW_MEMORY       0x2
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_OWN           0x1
+
+
+/* 
+   Flags/methods for returning states.
+   
+   The SWIG conversion methods, as ConvertPtr, return an integer 
+   that tells if the conversion was successful or not. And if not,
+   an error code can be returned (see swigerrors.swg for the codes).
+   
+   Use the following macros/flags to set or process the returning
+   states.
+   
+   In old versions of SWIG, code such as the following was usually written:
+
+     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
+       // success code
+     } else {
+       //fail code
+     }
+
+   Now you can be more explicit:
+
+    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+    } else {
+      // fail code
+    }
+
+   which is the same really, but now you can also do
+
+    Type *ptr;
+    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+      if (SWIG_IsNewObj(res) {
+        ...
+	delete *ptr;
+      } else {
+        ...
+      }
+    } else {
+      // fail code
+    }
+    
+   I.e., now SWIG_ConvertPtr can return new objects and you can
+   identify the case and take care of the deallocation. Of course that
+   also requires SWIG_ConvertPtr to return new result values, such as
+
+      int SWIG_ConvertPtr(obj, ptr,...) {         
+        if (<obj is ok>) {			       
+          if (<need new object>) {		       
+            *ptr = <ptr to new allocated object>; 
+            return SWIG_NEWOBJ;		       
+          } else {				       
+            *ptr = <ptr to old object>;	       
+            return SWIG_OLDOBJ;		       
+          } 				       
+        } else {				       
+          return SWIG_BADOBJ;		       
+        }					       
+      }
+
+   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
+   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
+   SWIG errors code.
+
+   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
+   allows to return the 'cast rank', for example, if you have this
+
+       int food(double)
+       int fooi(int);
+
+   and you call
+ 
+      food(1)   // cast rank '1'  (1 -> 1.0)
+      fooi(1)   // cast rank '0'
+
+   just use the SWIG_AddCast()/SWIG_CheckState()
+*/
+
+#define SWIG_OK                    (0) 
+#define SWIG_ERROR                 (-1)
+#define SWIG_IsOK(r)               (r >= 0)
+#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
+
+/* The CastRankLimit says how many bits are used for the cast rank */
+#define SWIG_CASTRANKLIMIT         (1 << 8)
+/* The NewMask denotes the object was created (using new/malloc) */
+#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
+/* The TmpMask is for in/out typemaps that use temporal objects */
+#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
+/* Simple returning values */
+#define SWIG_BADOBJ                (SWIG_ERROR)
+#define SWIG_OLDOBJ                (SWIG_OK)
+#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
+#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
+/* Check, add and del mask methods */
+#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
+#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
+#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
+#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
+#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
+#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
+
+/* Cast-Rank Mode */
+#if defined(SWIG_CASTRANK_MODE)
+#  ifndef SWIG_TypeRank
+#    define SWIG_TypeRank             unsigned long
+#  endif
+#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
+#    define SWIG_MAXCASTRANK          (2)
+#  endif
+#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
+#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
+SWIGINTERNINLINE int SWIG_AddCast(int r) { 
+  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
+}
+SWIGINTERNINLINE int SWIG_CheckState(int r) { 
+  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
+}
+#else /* no cast-rank mode */
+#  define SWIG_AddCast
+#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
+#endif
+
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *(*swig_converter_func)(void *, int *);
+typedef struct swig_type_info *(*swig_dycast_func)(void **);
+
+/* Structure to store information on one type */
+typedef struct swig_type_info {
+  const char             *name;			/* mangled name of this type */
+  const char             *str;			/* human readable name of this type */
+  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
+  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
+  void                   *clientdata;		/* language specific type data */
+  int                    owndata;		/* flag if the structure owns the clientdata */
+} swig_type_info;
+
+/* Structure to store a type and conversion function used for casting */
+typedef struct swig_cast_info {
+  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
+  swig_converter_func     converter;		/* function to cast the void pointers */
+  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
+  struct swig_cast_info  *prev;			/* pointer to the previous cast */
+} swig_cast_info;
+
+/* Structure used to store module information
+ * Each module generates one structure like this, and the runtime collects
+ * all of these structures and stores them in a circularly linked list.*/
+typedef struct swig_module_info {
+  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
+  size_t                 size;		        /* Number of types in this module */
+  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
+  swig_type_info         **type_initial;	/* Array of initially generated type structures */
+  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
+  void                    *clientdata;		/* Language specific module data */
+} swig_module_info;
+
+/* 
+  Compare two type names skipping the space characters, therefore
+  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
+
+  Return 0 when the two name types are equivalent, as in
+  strncmp, but skipping ' '.
+*/
+SWIGRUNTIME int
+SWIG_TypeNameComp(const char *f1, const char *l1,
+		  const char *f2, const char *l2) {
+  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
+    while ((*f1 == ' ') && (f1 != l1)) ++f1;
+    while ((*f2 == ' ') && (f2 != l2)) ++f2;
+    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
+  }
+  return (int)((l1 - f1) - (l2 - f2));
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if not equal, 1 if equal
+*/
+SWIGRUNTIME int
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
+*/
+SWIGRUNTIME int
+SWIG_TypeCompare(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+
+/*
+  Check the typename
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheck(const char *c, swig_type_info *ty) {
+  if (ty) {
+    swig_cast_info *iter = ty->cast;
+    while (iter) {
+      if (strcmp(iter->type->name, c) == 0) {
+        if (iter == ty->cast)
+          return iter;
+        /* Move iter to the top of the linked list */
+        iter->prev->next = iter->next;
+        if (iter->next)
+          iter->next->prev = iter->prev;
+        iter->next = ty->cast;
+        iter->prev = 0;
+        if (ty->cast) ty->cast->prev = iter;
+        ty->cast = iter;
+        return iter;
+      }
+      iter = iter->next;
+    }
+  }
+  return 0;
+}
+
+/* 
+  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
+  if (ty) {
+    swig_cast_info *iter = ty->cast;
+    while (iter) {
+      if (iter->type == from) {
+        if (iter == ty->cast)
+          return iter;
+        /* Move iter to the top of the linked list */
+        iter->prev->next = iter->next;
+        if (iter->next)
+          iter->next->prev = iter->prev;
+        iter->next = ty->cast;
+        iter->prev = 0;
+        if (ty->cast) ty->cast->prev = iter;
+        ty->cast = iter;
+        return iter;
+      }
+      iter = iter->next;
+    }
+  }
+  return 0;
+}
+
+/*
+  Cast a pointer up an inheritance hierarchy
+*/
+SWIGRUNTIMEINLINE void *
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
+}
+
+/* 
+   Dynamic pointer casting. Down an inheritance hierarchy
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
+  swig_type_info *lastty = ty;
+  if (!ty || !ty->dcast) return ty;
+  while (ty && (ty->dcast)) {
+    ty = (*ty->dcast)(ptr);
+    if (ty) lastty = ty;
+  }
+  return lastty;
+}
+
+/*
+  Return the name associated with this type
+*/
+SWIGRUNTIMEINLINE const char *
+SWIG_TypeName(const swig_type_info *ty) {
+  return ty->name;
+}
+
+/*
+  Return the pretty name associated with this type,
+  that is an unmangled type name in a form presentable to the user.
+*/
+SWIGRUNTIME const char *
+SWIG_TypePrettyName(const swig_type_info *type) {
+  /* The "str" field contains the equivalent pretty names of the
+     type, separated by vertical-bar characters.  We choose
+     to print the last name, as it is often (?) the most
+     specific. */
+  if (!type) return NULL;
+  if (type->str != NULL) {
+    const char *last_name = type->str;
+    const char *s;
+    for (s = type->str; *s; s++)
+      if (*s == '|') last_name = s+1;
+    return last_name;
+  }
+  else
+    return type->name;
+}
+
+/* 
+   Set the clientdata field for a type
+*/
+SWIGRUNTIME void
+SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+  swig_cast_info *cast = ti->cast;
+  /* if (ti->clientdata == clientdata) return; */
+  ti->clientdata = clientdata;
+  
+  while (cast) {
+    if (!cast->converter) {
+      swig_type_info *tc = cast->type;
+      if (!tc->clientdata) {
+	SWIG_TypeClientData(tc, clientdata);
+      }
+    }    
+    cast = cast->next;
+  }
+}
+SWIGRUNTIME void
+SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
+  SWIG_TypeClientData(ti, clientdata);
+  ti->owndata = 1;
+}
+  
+/*
+  Search for a swig_type_info structure only by mangled name
+  Search is a O(log #types)
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_MangledTypeQueryModule(swig_module_info *start, 
+                            swig_module_info *end, 
+		            const char *name) {
+  swig_module_info *iter = start;
+  do {
+    if (iter->size) {
+      register size_t l = 0;
+      register size_t r = iter->size - 1;
+      do {
+	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
+	register size_t i = (l + r) >> 1; 
+	const char *iname = iter->types[i]->name;
+	if (iname) {
+	  register int compare = strcmp(name, iname);
+	  if (compare == 0) {	    
+	    return iter->types[i];
+	  } else if (compare < 0) {
+	    if (i) {
+	      r = i - 1;
+	    } else {
+	      break;
+	    }
+	  } else if (compare > 0) {
+	    l = i + 1;
+	  }
+	} else {
+	  break; /* should never happen */
+	}
+      } while (l <= r);
+    }
+    iter = iter->next;
+  } while (iter != end);
+  return 0;
+}
+
+/*
+  Search for a swig_type_info structure for either a mangled name or a human readable name.
+  It first searches the mangled names of the types, which is a O(log #types)
+  If a type is not found it then searches the human readable names, which is O(#types).
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeQueryModule(swig_module_info *start, 
+                     swig_module_info *end, 
+		     const char *name) {
+  /* STEP 1: Search the name field using binary search */
+  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
+  if (ret) {
+    return ret;
+  } else {
+    /* STEP 2: If the type hasn't been found, do a complete search
+       of the str field (the human readable name) */
+    swig_module_info *iter = start;
+    do {
+      register size_t i = 0;
+      for (; i < iter->size; ++i) {
+	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
+	  return iter->types[i];
+      }
+      iter = iter->next;
+    } while (iter != end);
+  }
+  
+  /* neither found a match */
+  return 0;
+}
+
+/* 
+   Pack binary data into a string
+*/
+SWIGRUNTIME char *
+SWIG_PackData(char *c, void *ptr, size_t sz) {
+  static const char hex[17] = "0123456789abcdef";
+  register const unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu =  u + sz;
+  for (; u != eu; ++u) {
+    register unsigned char uu = *u;
+    *(c++) = hex[(uu & 0xf0) >> 4];
+    *(c++) = hex[uu & 0xf];
+  }
+  return c;
+}
+
+/* 
+   Unpack binary data from a string
+*/
+SWIGRUNTIME const char *
+SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
+  register unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu = u + sz;
+  for (; u != eu; ++u) {
+    register char d = *(c++);
+    register unsigned char uu;
+    if ((d >= '0') && (d <= '9'))
+      uu = ((d - '0') << 4);
+    else if ((d >= 'a') && (d <= 'f'))
+      uu = ((d - ('a'-10)) << 4);
+    else 
+      return (char *) 0;
+    d = *(c++);
+    if ((d >= '0') && (d <= '9'))
+      uu |= (d - '0');
+    else if ((d >= 'a') && (d <= 'f'))
+      uu |= (d - ('a'-10));
+    else 
+      return (char *) 0;
+    *u = uu;
+  }
+  return c;
+}
+
+/* 
+   Pack 'void *' into a string buffer.
+*/
+SWIGRUNTIME char *
+SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
+  char *r = buff;
+  if ((2*sizeof(void *) + 2) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,&ptr,sizeof(void *));
+  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
+  strcpy(r,name);
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      *ptr = (void *) 0;
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sizeof(void *));
+}
+
+SWIGRUNTIME char *
+SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
+  char *r = buff;
+  size_t lname = (name ? strlen(name) : 0);
+  if ((2*sz + 2 + lname) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,ptr,sz);
+  if (lname) {
+    strncpy(r,name,lname+1);
+  } else {
+    *r = 0;
+  }
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      memset(ptr,0,sz);
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sz);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/*  Errors in SWIG */
+#define  SWIG_UnknownError    	   -1 
+#define  SWIG_IOError        	   -2 
+#define  SWIG_RuntimeError   	   -3 
+#define  SWIG_IndexError     	   -4 
+#define  SWIG_TypeError      	   -5 
+#define  SWIG_DivisionByZero 	   -6 
+#define  SWIG_OverflowError  	   -7 
+#define  SWIG_SyntaxError    	   -8 
+#define  SWIG_ValueError     	   -9 
+#define  SWIG_SystemError    	   -10
+#define  SWIG_AttributeError 	   -11
+#define  SWIG_MemoryError    	   -12 
+#define  SWIG_NullReferenceError   -13
+
+
+
+/* Compatibility macros for Python 3 */
+#if PY_VERSION_HEX >= 0x03000000
+
+#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
+#define PyInt_Check(x) PyLong_Check(x)
+#define PyInt_AsLong(x) PyLong_AsLong(x)
+#define PyInt_FromLong(x) PyLong_FromLong(x)
+#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
+#define PyString_Check(name) PyBytes_Check(name)
+#define PyString_FromString(x) PyUnicode_FromString(x)
+#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
+#define PyString_AsString(str) PyBytes_AsString(str)
+#define PyString_Size(str) PyBytes_Size(str)	
+#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
+#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
+#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
+#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
+
+#endif
+
+#ifndef Py_TYPE
+#  define Py_TYPE(op) ((op)->ob_type)
+#endif
+
+/* SWIG APIs for compatibility of both Python 2 & 3 */
+
+#if PY_VERSION_HEX >= 0x03000000
+#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
+#else
+#  define SWIG_Python_str_FromFormat PyString_FromFormat
+#endif
+
+
+/* Warning: This function will allocate a new string in Python 3,
+ * so please call SWIG_Python_str_DelForPy3(x) to free the space.
+ */
+SWIGINTERN char*
+SWIG_Python_str_AsChar(PyObject *str)
+{
+#if PY_VERSION_HEX >= 0x03000000
+  char *cstr;
+  char *newstr;
+  Py_ssize_t len;
+  str = PyUnicode_AsUTF8String(str);
+  PyBytes_AsStringAndSize(str, &cstr, &len);
+  newstr = (char *) malloc(len+1);
+  memcpy(newstr, cstr, len+1);
+  Py_XDECREF(str);
+  return newstr;
+#else
+  return PyString_AsString(str);
+#endif
+}
+
+#if PY_VERSION_HEX >= 0x03000000
+#  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
+#else
+#  define SWIG_Python_str_DelForPy3(x) 
+#endif
+
+
+SWIGINTERN PyObject*
+SWIG_Python_str_FromChar(const char *c)
+{
+#if PY_VERSION_HEX >= 0x03000000
+  return PyUnicode_FromString(c); 
+#else
+  return PyString_FromString(c);
+#endif
+}
+
+/* Add PyOS_snprintf for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
+#  define PyOS_snprintf _snprintf
+# else
+#  define PyOS_snprintf snprintf
+# endif
+#endif
+
+/* A crude PyString_FromFormat implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+
+#ifndef SWIG_PYBUFFER_SIZE
+# define SWIG_PYBUFFER_SIZE 1024
+#endif
+
+static PyObject *
+PyString_FromFormat(const char *fmt, ...) {
+  va_list ap;
+  char buf[SWIG_PYBUFFER_SIZE * 2];
+  int res;
+  va_start(ap, fmt);
+  res = vsnprintf(buf, sizeof(buf), fmt, ap);
+  va_end(ap);
+  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
+}
+#endif
+
+/* Add PyObject_Del for old Pythons */
+#if PY_VERSION_HEX < 0x01060000
+# define PyObject_Del(op) PyMem_DEL((op))
+#endif
+#ifndef PyObject_DEL
+# define PyObject_DEL PyObject_Del
+#endif
+
+/* A crude PyExc_StopIteration exception for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# ifndef PyExc_StopIteration
+#  define PyExc_StopIteration PyExc_RuntimeError
+# endif
+# ifndef PyObject_GenericGetAttr
+#  define PyObject_GenericGetAttr 0
+# endif
+#endif
+
+/* Py_NotImplemented is defined in 2.1 and up. */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef Py_NotImplemented
+#  define Py_NotImplemented PyExc_RuntimeError
+# endif
+#endif
+
+/* A crude PyString_AsStringAndSize implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef PyString_AsStringAndSize
+#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
+# endif
+#endif
+
+/* PySequence_Size for old Pythons */
+#if PY_VERSION_HEX < 0x02000000
+# ifndef PySequence_Size
+#  define PySequence_Size PySequence_Length
+# endif
+#endif
+
+/* PyBool_FromLong for old Pythons */
+#if PY_VERSION_HEX < 0x02030000
+static
+PyObject *PyBool_FromLong(long ok)
+{
+  PyObject *result = ok ? Py_True : Py_False;
+  Py_INCREF(result);
+  return result;
+}
+#endif
+
+/* Py_ssize_t for old Pythons */
+/* This code is as recommended by: */
+/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+# define PY_SSIZE_T_MAX INT_MAX
+# define PY_SSIZE_T_MIN INT_MIN
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+typedef intintargfunc ssizessizeargfunc;
+typedef intobjargproc ssizeobjargproc;
+typedef intintobjargproc ssizessizeobjargproc;
+typedef getreadbufferproc readbufferproc;
+typedef getwritebufferproc writebufferproc;
+typedef getsegcountproc segcountproc;
+typedef getcharbufferproc charbufferproc;
+static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
+{
+  long result = 0;
+  PyObject *i = PyNumber_Int(x);
+  if (i) {
+    result = PyInt_AsLong(i);
+    Py_DECREF(i);
+  }
+  return result;
+}
+#endif
+
+#if PY_VERSION_HEX < 0x02040000
+#define Py_VISIT(op)				\
+  do { 						\
+    if (op) {					\
+      int vret = visit((op), arg);		\
+      if (vret)					\
+        return vret;				\
+    }						\
+  } while (0)
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef struct {
+  PyTypeObject type;
+  PyNumberMethods as_number;
+  PyMappingMethods as_mapping;
+  PySequenceMethods as_sequence;
+  PyBufferProcs as_buffer;
+  PyObject *name, *slots;
+} PyHeapTypeObject;
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef destructor freefunc;
+#endif
+
+#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
+     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
+     (PY_MAJOR_VERSION > 3))
+# define SWIGPY_USE_CAPSULE
+# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
+#endif
+
+#if PY_VERSION_HEX < 0x03020000
+#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
+#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
+#endif
+
+/* -----------------------------------------------------------------------------
+ * error manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIME PyObject*
+SWIG_Python_ErrorType(int code) {
+  PyObject* type = 0;
+  switch(code) {
+  case SWIG_MemoryError:
+    type = PyExc_MemoryError;
+    break;
+  case SWIG_IOError:
+    type = PyExc_IOError;
+    break;
+  case SWIG_RuntimeError:
+    type = PyExc_RuntimeError;
+    break;
+  case SWIG_IndexError:
+    type = PyExc_IndexError;
+    break;
+  case SWIG_TypeError:
+    type = PyExc_TypeError;
+    break;
+  case SWIG_DivisionByZero:
+    type = PyExc_ZeroDivisionError;
+    break;
+  case SWIG_OverflowError:
+    type = PyExc_OverflowError;
+    break;
+  case SWIG_SyntaxError:
+    type = PyExc_SyntaxError;
+    break;
+  case SWIG_ValueError:
+    type = PyExc_ValueError;
+    break;
+  case SWIG_SystemError:
+    type = PyExc_SystemError;
+    break;
+  case SWIG_AttributeError:
+    type = PyExc_AttributeError;
+    break;
+  default:
+    type = PyExc_RuntimeError;
+  }
+  return type;
+}
+
+
+SWIGRUNTIME void
+SWIG_Python_AddErrorMsg(const char* mesg)
+{
+  PyObject *type = 0;
+  PyObject *value = 0;
+  PyObject *traceback = 0;
+
+  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
+  if (value) {
+    char *tmp;
+    PyObject *old_str = PyObject_Str(value);
+    PyErr_Clear();
+    Py_XINCREF(type);
+
+    PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
+    SWIG_Python_str_DelForPy3(tmp);
+    Py_DECREF(old_str);
+    Py_DECREF(value);
+  } else {
+    PyErr_SetString(PyExc_RuntimeError, mesg);
+  }
+}
+
+#if defined(SWIG_PYTHON_NO_THREADS)
+#  if defined(SWIG_PYTHON_THREADS)
+#    undef SWIG_PYTHON_THREADS
+#  endif
+#endif
+#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
+#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
+#    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
+#      define SWIG_PYTHON_USE_GIL
+#    endif
+#  endif
+#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
+#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
+#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
+#    endif
+#    ifdef __cplusplus /* C++ code */
+       class SWIG_Python_Thread_Block {
+         bool status;
+         PyGILState_STATE state;
+       public:
+         void end() { if (status) { PyGILState_Release(state); status = false;} }
+         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
+         ~SWIG_Python_Thread_Block() { end(); }
+       };
+       class SWIG_Python_Thread_Allow {
+         bool status;
+         PyThreadState *save;
+       public:
+         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
+         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
+         ~SWIG_Python_Thread_Allow() { end(); }
+       };
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
+#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
+#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
+#    else /* C code */
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
+#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
+#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
+#    endif
+#  else /* Old thread way, not implemented, user must provide it */
+#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
+#      define SWIG_PYTHON_INITIALIZE_THREADS
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
+#      define SWIG_PYTHON_THREAD_END_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
+#      define SWIG_PYTHON_THREAD_END_ALLOW
+#    endif
+#  endif
+#else /* No thread support */
+#  define SWIG_PYTHON_INITIALIZE_THREADS
+#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#  define SWIG_PYTHON_THREAD_END_BLOCK
+#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#  define SWIG_PYTHON_THREAD_END_ALLOW
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Python API portion that goes into the runtime
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Constant declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Constant Types */
+#define SWIG_PY_POINTER 4
+#define SWIG_PY_BINARY  5
+
+/* Constant information structure */
+typedef struct swig_const_info {
+  int type;
+  char *name;
+  long lvalue;
+  double dvalue;
+  void   *pvalue;
+  swig_type_info **ptype;
+} swig_const_info;
+
+
+/* -----------------------------------------------------------------------------
+ * Wrapper of PyInstanceMethod_New() used in Python 3
+ * It is exported to the generated module, used for -fastproxy
+ * ----------------------------------------------------------------------------- */
+#if PY_VERSION_HEX >= 0x03000000
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
+{
+  return PyInstanceMethod_New(func);
+}
+#else
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
+{
+  return NULL;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/* -----------------------------------------------------------------------------
+ * pyrun.swg
+ *
+ * This file contains the runtime support for Python modules
+ * and includes code for managing global variables and pointer
+ * type checking.
+ *
+ * ----------------------------------------------------------------------------- */
+
+/* Common SWIG API */
+
+/* for raw pointers */
+#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
+#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
+
+#ifdef SWIGPYTHON_BUILTIN
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
+#else
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+#endif
+
+#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+
+#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
+#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
+#define swig_owntype                                    int
+
+/* for raw packed data */
+#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+/* for class or struct pointers */
+#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
+
+/* for C or C++ function pointers */
+#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
+
+/* for C++ member pointers, ie, member methods */
+#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+
+/* Runtime API */
+
+#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
+#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
+#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
+
+#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
+#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
+#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
+#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
+#define SWIG_fail                        		goto fail					   
+
+
+/* Runtime API implementation */
+
+/* Error manipulation */
+
+SWIGINTERN void 
+SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
+  PyErr_SetObject(errtype, obj);
+  Py_DECREF(obj);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+SWIGINTERN void 
+SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
+  PyErr_SetString(errtype, msg);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
+
+/* Set a constant value */
+
+#if defined(SWIGPYTHON_BUILTIN)
+
+SWIGINTERN void
+SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
+  PyObject *s = PyString_InternFromString(key);
+  PyList_Append(seq, s);
+  Py_DECREF(s);
+}
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
+  Py_DECREF(obj);
+  if (public_interface)
+    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
+}
+
+#else
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
+  Py_DECREF(obj);                            
+}
+
+#endif
+
+/* Append a value to the result obj */
+
+SWIGINTERN PyObject*
+SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
+#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyList_Check(result)) {
+      PyObject *o2 = result;
+      result = PyList_New(1);
+      PyList_SetItem(result, 0, o2);
+    }
+    PyList_Append(result,obj);
+    Py_DECREF(obj);
+  }
+  return result;
+#else
+  PyObject*   o2;
+  PyObject*   o3;
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyTuple_Check(result)) {
+      o2 = result;
+      result = PyTuple_New(1);
+      PyTuple_SET_ITEM(result, 0, o2);
+    }
+    o3 = PyTuple_New(1);
+    PyTuple_SET_ITEM(o3, 0, obj);
+    o2 = result;
+    result = PySequence_Concat(o2, o3);
+    Py_DECREF(o2);
+    Py_DECREF(o3);
+  }
+  return result;
+#endif
+}
+
+/* Unpack the argument tuple */
+
+SWIGINTERN int
+SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
+{
+  if (!args) {
+    if (!min && !max) {
+      return 1;
+    } else {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
+		   name, (min == max ? "" : "at least "), (int)min);
+      return 0;
+    }
+  }  
+  if (!PyTuple_Check(args)) {
+    if (min <= 1 && max >= 1) {
+      register int i;
+      objs[0] = args;
+      for (i = 1; i < max; ++i) {
+	objs[i] = 0;
+      }
+      return 2;
+    }
+    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
+    return 0;
+  } else {
+    register Py_ssize_t l = PyTuple_GET_SIZE(args);
+    if (l < min) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at least "), (int)min, (int)l);
+      return 0;
+    } else if (l > max) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at most "), (int)max, (int)l);
+      return 0;
+    } else {
+      register int i;
+      for (i = 0; i < l; ++i) {
+	objs[i] = PyTuple_GET_ITEM(args, i);
+      }
+      for (; l < max; ++l) {
+	objs[l] = 0;
+      }
+      return i + 1;
+    }    
+  }
+}
+
+/* A functor is a function object with one single object argument */
+#if PY_VERSION_HEX >= 0x02020000
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);
+#else
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunction(functor, "O", obj);
+#endif
+
+/*
+  Helper for static pointer initialization for both C and C++ code, for example
+  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
+*/
+#ifdef __cplusplus
+#define SWIG_STATIC_POINTER(var)  var
+#else
+#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Pointer declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
+#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
+
+#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
+
+#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
+#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*  How to access Py_None */
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#  ifndef SWIG_PYTHON_NO_BUILD_NONE
+#    ifndef SWIG_PYTHON_BUILD_NONE
+#      define SWIG_PYTHON_BUILD_NONE
+#    endif
+#  endif
+#endif
+
+#ifdef SWIG_PYTHON_BUILD_NONE
+#  ifdef Py_None
+#   undef Py_None
+#   define Py_None SWIG_Py_None()
+#  endif
+SWIGRUNTIMEINLINE PyObject * 
+_SWIG_Py_None(void)
+{
+  PyObject *none = Py_BuildValue((char*)"");
+  Py_DECREF(none);
+  return none;
+}
+SWIGRUNTIME PyObject * 
+SWIG_Py_None(void)
+{
+  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
+  return none;
+}
+#endif
+
+/* The python void return value */
+
+SWIGRUNTIMEINLINE PyObject * 
+SWIG_Py_Void(void)
+{
+  PyObject *none = Py_None;
+  Py_INCREF(none);
+  return none;
+}
+
+/* SwigPyClientData */
+
+typedef struct {
+  PyObject *klass;
+  PyObject *newraw;
+  PyObject *newargs;
+  PyObject *destroy;
+  int delargs;
+  int implicitconv;
+  PyTypeObject *pytype;
+} SwigPyClientData;
+
+SWIGRUNTIMEINLINE int 
+SWIG_Python_CheckImplicit(swig_type_info *ty)
+{
+  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
+  return data ? data->implicitconv : 0;
+}
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_ExceptionType(swig_type_info *desc) {
+  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
+  PyObject *klass = data ? data->klass : 0;
+  return (klass ? klass : PyExc_RuntimeError);
+}
+
+
+SWIGRUNTIME SwigPyClientData * 
+SwigPyClientData_New(PyObject* obj)
+{
+  if (!obj) {
+    return 0;
+  } else {
+    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
+    /* the klass element */
+    data->klass = obj;
+    Py_INCREF(data->klass);
+    /* the newraw method and newargs arguments used to create a new raw instance */
+    if (PyClass_Check(obj)) {
+      data->newraw = 0;
+      data->newargs = obj;
+      Py_INCREF(obj);
+    } else {
+#if (PY_VERSION_HEX < 0x02020000)
+      data->newraw = 0;
+#else
+      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
+#endif
+      if (data->newraw) {
+	Py_INCREF(data->newraw);
+	data->newargs = PyTuple_New(1);
+	PyTuple_SetItem(data->newargs, 0, obj);
+      } else {
+	data->newargs = obj;
+      }
+      Py_INCREF(data->newargs);
+    }
+    /* the destroy method, aka as the C++ delete method */
+    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      data->destroy = 0;
+    }
+    if (data->destroy) {
+      int flags;
+      Py_INCREF(data->destroy);
+      flags = PyCFunction_GET_FLAGS(data->destroy);
+#ifdef METH_O
+      data->delargs = !(flags & (METH_O));
+#else
+      data->delargs = 0;
+#endif
+    } else {
+      data->delargs = 0;
+    }
+    data->implicitconv = 0;
+    data->pytype = 0;
+    return data;
+  }
+}
+
+SWIGRUNTIME void 
+SwigPyClientData_Del(SwigPyClientData *data) {
+  Py_XDECREF(data->newraw);
+  Py_XDECREF(data->newargs);
+  Py_XDECREF(data->destroy);
+}
+
+/* =============== SwigPyObject =====================*/
+
+typedef struct {
+  PyObject_HEAD
+  void *ptr;
+  swig_type_info *ty;
+  int own;
+  PyObject *next;
+#ifdef SWIGPYTHON_BUILTIN
+  PyObject *dict;
+#endif
+} SwigPyObject;
+
+SWIGRUNTIME PyObject *
+SwigPyObject_long(SwigPyObject *v)
+{
+  return PyLong_FromVoidPtr(v->ptr);
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_format(const char* fmt, SwigPyObject *v)
+{
+  PyObject *res = NULL;
+  PyObject *args = PyTuple_New(1);
+  if (args) {
+    if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
+      PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
+      if (ofmt) {
+#if PY_VERSION_HEX >= 0x03000000
+	res = PyUnicode_Format(ofmt,args);
+#else
+	res = PyString_Format(ofmt,args);
+#endif
+	Py_DECREF(ofmt);
+      }
+      Py_DECREF(args);
+    }
+  }
+  return res;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_oct(SwigPyObject *v)
+{
+  return SwigPyObject_format("%o",v);
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_hex(SwigPyObject *v)
+{
+  return SwigPyObject_format("%x",v);
+}
+
+SWIGRUNTIME PyObject *
+#ifdef METH_NOARGS
+SwigPyObject_repr(SwigPyObject *v)
+#else
+SwigPyObject_repr(SwigPyObject *v, PyObject *args)
+#endif
+{
+  const char *name = SWIG_TypePrettyName(v->ty);
+  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
+  if (v->next) {
+# ifdef METH_NOARGS
+    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
+# else
+    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
+# endif
+# if PY_VERSION_HEX >= 0x03000000
+    PyObject *joined = PyUnicode_Concat(repr, nrep);
+    Py_DecRef(repr);
+    Py_DecRef(nrep);
+    repr = joined;
+# else
+    PyString_ConcatAndDel(&repr,nrep);
+# endif
+  }
+  return repr;  
+}
+
+SWIGRUNTIME int
+SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+  char *str;
+#ifdef METH_NOARGS
+  PyObject *repr = SwigPyObject_repr(v);
+#else
+  PyObject *repr = SwigPyObject_repr(v, NULL);
+#endif
+  if (repr) {
+    str = SWIG_Python_str_AsChar(repr); 
+    fputs(str, fp);
+    SWIG_Python_str_DelForPy3(str);
+    Py_DECREF(repr);
+    return 0; 
+  } else {
+    return 1; 
+  }
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_str(SwigPyObject *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
+    SWIG_Python_str_FromChar(result) : 0;
+}
+
+SWIGRUNTIME int
+SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
+{
+  void *i = v->ptr;
+  void *j = w->ptr;
+  return (i < j) ? -1 : ((i > j) ? 1 : 0);
+}
+
+/* Added for Python 3.x, would it also be useful for Python 2.x? */
+SWIGRUNTIME PyObject*
+SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
+{
+  PyObject* res;
+  if( op != Py_EQ && op != Py_NE ) {
+    Py_INCREF(Py_NotImplemented);
+    return Py_NotImplemented;
+  }
+  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
+  return res;  
+}
+
+
+SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
+
+#ifdef SWIGPYTHON_BUILTIN
+static swig_type_info *SwigPyObject_stype = 0;
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_type(void) {
+    SwigPyClientData *cd;
+    assert(SwigPyObject_stype);
+    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+    assert(cd);
+    assert(cd->pytype);
+    return cd->pytype;
+}
+#else
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
+  return type;
+}
+#endif
+
+SWIGRUNTIMEINLINE int
+SwigPyObject_Check(PyObject *op) {
+#ifdef SWIGPYTHON_BUILTIN
+  PyTypeObject *target_tp = SwigPyObject_type();
+  if (PyType_IsSubtype(op->ob_type, target_tp))
+    return 1;
+  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
+#else
+  return (Py_TYPE(op) == SwigPyObject_type())
+    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
+#endif
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
+
+SWIGRUNTIME void
+SwigPyObject_dealloc(PyObject *v)
+{
+  SwigPyObject *sobj = (SwigPyObject *) v;
+  PyObject *next = sobj->next;
+  if (sobj->own == SWIG_POINTER_OWN) {
+    swig_type_info *ty = sobj->ty;
+    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+    PyObject *destroy = data ? data->destroy : 0;
+    if (destroy) {
+      /* destroy is always a VARARGS method */
+      PyObject *res;
+      if (data->delargs) {
+	/* we need to create a temporary object to carry the destroy operation */
+	PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
+	res = SWIG_Python_CallFunctor(destroy, tmp);
+	Py_DECREF(tmp);
+      } else {
+	PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
+	PyObject *mself = PyCFunction_GET_SELF(destroy);
+	res = ((*meth)(mself, v));
+      }
+      Py_XDECREF(res);
+    } 
+#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
+    else {
+      const char *name = SWIG_TypePrettyName(ty);
+      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
+    }
+#endif
+  } 
+  Py_XDECREF(next);
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyObject* 
+SwigPyObject_append(PyObject* v, PyObject* next)
+{
+  SwigPyObject *sobj = (SwigPyObject *) v;
+#ifndef METH_O
+  PyObject *tmp = 0;
+  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
+  next = tmp;
+#endif
+  if (!SwigPyObject_Check(next)) {
+    return NULL;
+  }
+  sobj->next = next;
+  Py_INCREF(next);
+  return SWIG_Py_Void();
+}
+
+SWIGRUNTIME PyObject* 
+#ifdef METH_NOARGS
+SwigPyObject_next(PyObject* v)
+#else
+SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  SwigPyObject *sobj = (SwigPyObject *) v;
+  if (sobj->next) {    
+    Py_INCREF(sobj->next);
+    return sobj->next;
+  } else {
+    return SWIG_Py_Void();
+  }
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+SwigPyObject_disown(PyObject *v)
+#else
+SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  SwigPyObject *sobj = (SwigPyObject *)v;
+  sobj->own = 0;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+SwigPyObject_acquire(PyObject *v)
+#else
+SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  SwigPyObject *sobj = (SwigPyObject *)v;
+  sobj->own = SWIG_POINTER_OWN;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+SwigPyObject_own(PyObject *v, PyObject *args)
+{
+  PyObject *val = 0;
+#if (PY_VERSION_HEX < 0x02020000)
+  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
+#elif (PY_VERSION_HEX < 0x02050000)
+  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#else
+  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
+#endif
+    {
+      return NULL;
+    } 
+  else
+    {
+      SwigPyObject *sobj = (SwigPyObject *)v;
+      PyObject *obj = PyBool_FromLong(sobj->own);
+      if (val) {
+#ifdef METH_NOARGS
+	if (PyObject_IsTrue(val)) {
+	  SwigPyObject_acquire(v);
+	} else {
+	  SwigPyObject_disown(v);
+	}
+#else
+	if (PyObject_IsTrue(val)) {
+	  SwigPyObject_acquire(v,args);
+	} else {
+	  SwigPyObject_disown(v,args);
+	}
+#endif
+      } 
+      return obj;
+    }
+}
+
+#ifdef METH_O
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#else
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#endif
+
+#if PY_VERSION_HEX < 0x02020000
+SWIGINTERN PyObject *
+SwigPyObject_getattr(SwigPyObject *sobj,char *name)
+{
+  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
+}
+#endif
+
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_TypeOnce(void) {
+  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
+
+  static PyNumberMethods SwigPyObject_as_number = {
+    (binaryfunc)0, /*nb_add*/
+    (binaryfunc)0, /*nb_subtract*/
+    (binaryfunc)0, /*nb_multiply*/
+    /* nb_divide removed in Python 3 */
+#if PY_VERSION_HEX < 0x03000000
+    (binaryfunc)0, /*nb_divide*/
+#endif
+    (binaryfunc)0, /*nb_remainder*/
+    (binaryfunc)0, /*nb_divmod*/
+    (ternaryfunc)0,/*nb_power*/
+    (unaryfunc)0,  /*nb_negative*/
+    (unaryfunc)0,  /*nb_positive*/
+    (unaryfunc)0,  /*nb_absolute*/
+    (inquiry)0,    /*nb_nonzero*/
+    0,		   /*nb_invert*/
+    0,		   /*nb_lshift*/
+    0,		   /*nb_rshift*/
+    0,		   /*nb_and*/
+    0,		   /*nb_xor*/
+    0,		   /*nb_or*/
+#if PY_VERSION_HEX < 0x03000000
+    0,   /*nb_coerce*/
+#endif
+    (unaryfunc)SwigPyObject_long, /*nb_int*/
+#if PY_VERSION_HEX < 0x03000000
+    (unaryfunc)SwigPyObject_long, /*nb_long*/
+#else
+    0, /*nb_reserved*/
+#endif
+    (unaryfunc)0,                 /*nb_float*/
+#if PY_VERSION_HEX < 0x03000000
+    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
+    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
+#endif
+#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
+#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
+#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
+#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
+    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
+#endif
+  };
+
+  static PyTypeObject swigpyobject_type;
+  static int type_init = 0;
+  if (!type_init) {
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
+#if PY_VERSION_HEX >= 0x03000000
+      PyVarObject_HEAD_INIT(NULL, 0)
+#else
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
+#endif
+      (char *)"SwigPyObject",               /* tp_name */
+      sizeof(SwigPyObject),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyObject_print,        /* tp_print */
+#if PY_VERSION_HEX < 0x02020000
+      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
+#else
+      (getattrfunc)0,                       /* tp_getattr */
+#endif
+      (setattrfunc)0,                       /* tp_setattr */
+#if PY_VERSION_HEX >= 0x03000000
+    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
+#else
+      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
+#endif
+      (reprfunc)SwigPyObject_repr,          /* tp_repr */
+      &SwigPyObject_as_number,              /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyObject_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigobject_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      swigobject_methods,                   /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
+#endif
+#ifdef COUNT_ALLOCS
+      0,0,0,0                               /* tp_alloc -> tp_next */
+#endif
+    };
+    swigpyobject_type = tmp;
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
+    swigpyobject_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpyobject_type) < 0)
+      return NULL;
+#endif
+  }
+  return &swigpyobject_type;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
+{
+  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
+  if (sobj) {
+    sobj->ptr  = ptr;
+    sobj->ty   = ty;
+    sobj->own  = own;
+    sobj->next = 0;
+  }
+  return (PyObject *)sobj;
+}
+
+/* -----------------------------------------------------------------------------
+ * Implements a simple Swig Packed type, and use it instead of string
+ * ----------------------------------------------------------------------------- */
+
+typedef struct {
+  PyObject_HEAD
+  void *pack;
+  swig_type_info *ty;
+  size_t size;
+} SwigPyPacked;
+
+SWIGRUNTIME int
+SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+  char result[SWIG_BUFFER_SIZE];
+  fputs("<Swig Packed ", fp); 
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    fputs("at ", fp); 
+    fputs(result, fp); 
+  }
+  fputs(v->ty->name,fp); 
+  fputs(">", fp);
+  return 0; 
+}
+  
+SWIGRUNTIME PyObject *
+SwigPyPacked_repr(SwigPyPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
+  } else {
+    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
+  }  
+}
+
+SWIGRUNTIME PyObject *
+SwigPyPacked_str(SwigPyPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
+    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
+  } else {
+    return SWIG_Python_str_FromChar(v->ty->name);
+  }  
+}
+
+SWIGRUNTIME int
+SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
+{
+  size_t i = v->size;
+  size_t j = w->size;
+  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
+  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
+}
+
+SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
+
+SWIGRUNTIME PyTypeObject*
+SwigPyPacked_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
+  return type;
+}
+
+SWIGRUNTIMEINLINE int
+SwigPyPacked_Check(PyObject *op) {
+  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
+    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
+}
+
+SWIGRUNTIME void
+SwigPyPacked_dealloc(PyObject *v)
+{
+  if (SwigPyPacked_Check(v)) {
+    SwigPyPacked *sobj = (SwigPyPacked *) v;
+    free(sobj->pack);
+  }
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyTypeObject*
+SwigPyPacked_TypeOnce(void) {
+  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
+  static PyTypeObject swigpypacked_type;
+  static int type_init = 0;
+  if (!type_init) {
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
+#if PY_VERSION_HEX>=0x03000000
+      PyVarObject_HEAD_INIT(NULL, 0)
+#else
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
+#endif
+      (char *)"SwigPyPacked",               /* tp_name */
+      sizeof(SwigPyPacked),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyPacked_print,        /* tp_print */
+      (getattrfunc)0,                       /* tp_getattr */
+      (setattrfunc)0,                       /* tp_setattr */
+#if PY_VERSION_HEX>=0x03000000
+      0, /* tp_reserved in 3.0.1 */
+#else
+      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
+#endif
+      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
+      0,                                    /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyPacked_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigpacked_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      0,                                    /* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      0,                                    /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
+#endif
+#ifdef COUNT_ALLOCS
+      0,0,0,0                               /* tp_alloc -> tp_next */
+#endif
+    };
+    swigpypacked_type = tmp;
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
+    swigpypacked_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpypacked_type) < 0)
+      return NULL;
+#endif
+  }
+  return &swigpypacked_type;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
+{
+  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
+  if (sobj) {
+    void *pack = malloc(size);
+    if (pack) {
+      memcpy(pack, ptr, size);
+      sobj->pack = pack;
+      sobj->ty   = ty;
+      sobj->size = size;
+    } else {
+      PyObject_DEL((PyObject *) sobj);
+      sobj = 0;
+    }
+  }
+  return (PyObject *) sobj;
+}
+
+SWIGRUNTIME swig_type_info *
+SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
+{
+  if (SwigPyPacked_Check(obj)) {
+    SwigPyPacked *sobj = (SwigPyPacked *)obj;
+    if (sobj->size != size) return 0;
+    memcpy(ptr, sobj->pack, size);
+    return sobj->ty;
+  } else {
+    return 0;
+  }
+}
+
+/* -----------------------------------------------------------------------------
+ * pointers/data manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIMEINLINE PyObject *
+_SWIG_This(void)
+{
+    return SWIG_Python_str_FromChar("this");
+}
+
+static PyObject *swig_this = NULL;
+
+SWIGRUNTIME PyObject *
+SWIG_This(void)
+{
+  if (swig_this == NULL)
+    swig_this = _SWIG_This();
+  return swig_this;
+}
+
+/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
+
+/* TODO: I don't know how to implement the fast getset in Python 3 right now */
+#if PY_VERSION_HEX>=0x03000000
+#define SWIG_PYTHON_SLOW_GETSET_THIS 
+#endif
+
+SWIGRUNTIME SwigPyObject *
+SWIG_Python_GetSwigThis(PyObject *pyobj) 
+{
+  PyObject *obj;
+
+  if (SwigPyObject_Check(pyobj))
+    return (SwigPyObject *) pyobj;
+
+#ifdef SWIGPYTHON_BUILTIN
+  (void)obj;
+# ifdef PyWeakref_CheckProxy
+  if (PyWeakref_CheckProxy(pyobj)) {
+    pyobj = PyWeakref_GET_OBJECT(pyobj);
+    if (pyobj && SwigPyObject_Check(pyobj))
+      return (SwigPyObject*) pyobj;
+  }
+# endif
+  return NULL;
+#else
+
+  obj = 0;
+
+#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
+  if (PyInstance_Check(pyobj)) {
+    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+  } else {
+    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+    if (dictptr != NULL) {
+      PyObject *dict = *dictptr;
+      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
+    } else {
+#ifdef PyWeakref_CheckProxy
+      if (PyWeakref_CheckProxy(pyobj)) {
+	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+      }
+#endif
+      obj = PyObject_GetAttr(pyobj,SWIG_This());
+      if (obj) {
+	Py_DECREF(obj);
+      } else {
+	if (PyErr_Occurred()) PyErr_Clear();
+	return 0;
+      }
+    }
+  }
+#else
+  obj = PyObject_GetAttr(pyobj,SWIG_This());
+  if (obj) {
+    Py_DECREF(obj);
+  } else {
+    if (PyErr_Occurred()) PyErr_Clear();
+    return 0;
+  }
+#endif
+  if (obj && !SwigPyObject_Check(obj)) {
+    /* a PyObject is called 'this', try to get the 'real this'
+       SwigPyObject from it */ 
+    return SWIG_Python_GetSwigThis(obj);
+  }
+  return (SwigPyObject *)obj;
+#endif
+}
+
+/* Acquire a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_AcquirePtr(PyObject *obj, int own) {
+  if (own == SWIG_POINTER_OWN) {
+    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
+    if (sobj) {
+      int oldown = sobj->own;
+      sobj->own = own;
+      return oldown;
+    }
+  }
+  return 0;
+}
+
+/* Convert a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
+  int res;
+  SwigPyObject *sobj;
+
+  if (!obj)
+    return SWIG_ERROR;
+  if (obj == Py_None) {
+    if (ptr)
+      *ptr = 0;
+    return SWIG_OK;
+  }
+
+  res = SWIG_ERROR;
+
+  sobj = SWIG_Python_GetSwigThis(obj);
+  if (own)
+    *own = 0;
+  while (sobj) {
+    void *vptr = sobj->ptr;
+    if (ty) {
+      swig_type_info *to = sobj->ty;
+      if (to == ty) {
+        /* no type cast needed */
+        if (ptr) *ptr = vptr;
+        break;
+      } else {
+        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+        if (!tc) {
+          sobj = (SwigPyObject *)sobj->next;
+        } else {
+          if (ptr) {
+            int newmemory = 0;
+            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+            if (newmemory == SWIG_CAST_NEW_MEMORY) {
+              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
+              if (own)
+                *own = *own | SWIG_CAST_NEW_MEMORY;
+            }
+          }
+          break;
+        }
+      }
+    } else {
+      if (ptr) *ptr = vptr;
+      break;
+    }
+  }
+  if (sobj) {
+    if (own)
+      *own = *own | sobj->own;
+    if (flags & SWIG_POINTER_DISOWN) {
+      sobj->own = 0;
+    }
+    res = SWIG_OK;
+  } else {
+    if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+      if (data && !data->implicitconv) {
+        PyObject *klass = data->klass;
+        if (klass) {
+          PyObject *impconv;
+          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+          impconv = SWIG_Python_CallFunctor(klass, obj);
+          data->implicitconv = 0;
+          if (PyErr_Occurred()) {
+            PyErr_Clear();
+            impconv = 0;
+          }
+          if (impconv) {
+            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
+            if (iobj) {
+              void *vptr;
+              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+              if (SWIG_IsOK(res)) {
+                if (ptr) {
+                  *ptr = vptr;
+                  /* transfer the ownership to 'ptr' */
+                  iobj->own = 0;
+                  res = SWIG_AddCast(res);
+                  res = SWIG_AddNewMask(res);
+                } else {
+                  res = SWIG_AddCast(res);		    
+                }
+              }
+            }
+            Py_DECREF(impconv);
+          }
+        }
+      }
+    }
+  }
+  return res;
+}
+
+/* Convert a function ptr value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
+  if (!PyCFunction_Check(obj)) {
+    return SWIG_ConvertPtr(obj, ptr, ty, 0);
+  } else {
+    void *vptr = 0;
+    
+    /* here we get the method pointer for callbacks */
+    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
+    if (desc)
+      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
+    if (!desc) 
+      return SWIG_ERROR;
+    if (ty) {
+      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
+      if (tc) {
+        int newmemory = 0;
+        *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+        assert(!newmemory); /* newmemory handling not yet implemented */
+      } else {
+        return SWIG_ERROR;
+      }
+    } else {
+      *ptr = vptr;
+    }
+    return SWIG_OK;
+  }
+}
+
+/* Convert a packed value value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
+  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
+  if (!to) return SWIG_ERROR;
+  if (ty) {
+    if (to != ty) {
+      /* check type cast? */
+      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+      if (!tc) return SWIG_ERROR;
+    }
+  }
+  return SWIG_OK;
+}  
+
+/* -----------------------------------------------------------------------------
+ * Create a new pointer object
+ * ----------------------------------------------------------------------------- */
+
+/*
+  Create a new instance object, without calling __init__, and set the
+  'this' attribute.
+*/
+
+SWIGRUNTIME PyObject* 
+SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
+{
+#if (PY_VERSION_HEX >= 0x02020000)
+  PyObject *inst = 0;
+  PyObject *newraw = data->newraw;
+  if (newraw) {
+    inst = PyObject_Call(newraw, data->newargs, NULL);
+    if (inst) {
+#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+      PyObject **dictptr = _PyObject_GetDictPtr(inst);
+      if (dictptr != NULL) {
+	PyObject *dict = *dictptr;
+	if (dict == NULL) {
+	  dict = PyDict_New();
+	  *dictptr = dict;
+	  PyDict_SetItem(dict, SWIG_This(), swig_this);
+	}
+      }
+#else
+      PyObject *key = SWIG_This();
+      PyObject_SetAttr(inst, key, swig_this);
+#endif
+    }
+  } else {
+#if PY_VERSION_HEX >= 0x03000000
+    inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
+    PyObject_SetAttr(inst, SWIG_This(), swig_this);
+    Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
+#else
+    PyObject *dict = PyDict_New();
+    PyDict_SetItem(dict, SWIG_This(), swig_this);
+    inst = PyInstance_NewRaw(data->newargs, dict);
+    Py_DECREF(dict);
+#endif
+  }
+  return inst;
+#else
+#if (PY_VERSION_HEX >= 0x02010000)
+  PyObject *inst;
+  PyObject *dict = PyDict_New();
+  PyDict_SetItem(dict, SWIG_This(), swig_this);
+  inst = PyInstance_NewRaw(data->newargs, dict);
+  Py_DECREF(dict);
+  return (PyObject *) inst;
+#else
+  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
+  if (inst == NULL) {
+    return NULL;
+  }
+  inst->in_class = (PyClassObject *)data->newargs;
+  Py_INCREF(inst->in_class);
+  inst->in_dict = PyDict_New();
+  if (inst->in_dict == NULL) {
+    Py_DECREF(inst);
+    return NULL;
+  }
+#ifdef Py_TPFLAGS_HAVE_WEAKREFS
+  inst->in_weakreflist = NULL;
+#endif
+#ifdef Py_TPFLAGS_GC
+  PyObject_GC_Init(inst);
+#endif
+  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
+  return (PyObject *) inst;
+#endif
+#endif
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
+{
+ PyObject *dict;
+#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+ PyObject **dictptr = _PyObject_GetDictPtr(inst);
+ if (dictptr != NULL) {
+   dict = *dictptr;
+   if (dict == NULL) {
+     dict = PyDict_New();
+     *dictptr = dict;
+   }
+   PyDict_SetItem(dict, SWIG_This(), swig_this);
+   return;
+ }
+#endif
+ dict = PyObject_GetAttrString(inst, (char*)"__dict__");
+ PyDict_SetItem(dict, SWIG_This(), swig_this);
+ Py_DECREF(dict);
+} 
+
+
+SWIGINTERN PyObject *
+SWIG_Python_InitShadowInstance(PyObject *args) {
+  PyObject *obj[2];
+  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
+    return NULL;
+  } else {
+    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
+    if (sthis) {
+      SwigPyObject_append((PyObject*) sthis, obj[1]);
+    } else {
+      SWIG_Python_SetSwigThis(obj[0], obj[1]);
+    }
+    return SWIG_Py_Void();
+  }
+}
+
+/* Create a new pointer object */
+
+SWIGRUNTIME PyObject *
+SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
+  SwigPyClientData *clientdata;
+  PyObject * robj;
+  int own;
+
+  if (!ptr)
+    return SWIG_Py_Void();
+
+  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
+  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+  if (clientdata && clientdata->pytype) {
+    SwigPyObject *newobj;
+    if (flags & SWIG_BUILTIN_TP_INIT) {
+      newobj = (SwigPyObject*) self;
+      if (newobj->ptr) {
+        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
+        while (newobj->next)
+	  newobj = (SwigPyObject *) newobj->next;
+        newobj->next = next_self;
+        newobj = (SwigPyObject *)next_self;
+      }
+    } else {
+      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
+    }
+    if (newobj) {
+      newobj->ptr = ptr;
+      newobj->ty = type;
+      newobj->own = own;
+      newobj->next = 0;
+#ifdef SWIGPYTHON_BUILTIN
+      newobj->dict = 0;
+#endif
+      return (PyObject*) newobj;
+    }
+    return SWIG_Py_Void();
+  }
+
+  assert(!(flags & SWIG_BUILTIN_TP_INIT));
+
+  robj = SwigPyObject_New(ptr, type, own);
+  if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+    if (inst) {
+      Py_DECREF(robj);
+      robj = inst;
+    }
+  }
+  return robj;
+}
+
+/* Create a new packed object */
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
+  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
+}
+
+/* -----------------------------------------------------------------------------*
+ *  Get type list 
+ * -----------------------------------------------------------------------------*/
+
+#ifdef SWIG_LINK_RUNTIME
+void *SWIG_ReturnGlobalTypeList(void *);
+#endif
+
+SWIGRUNTIME swig_module_info *
+SWIG_Python_GetModule(void) {
+  static void *type_pointer = (void *)0;
+  /* first check if module already created */
+  if (!type_pointer) {
+#ifdef SWIG_LINK_RUNTIME
+    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
+#else
+# ifdef SWIGPY_USE_CAPSULE
+    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
+# else
+    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
+# endif
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      type_pointer = (void *)0;
+    }
+#endif
+  }
+  return (swig_module_info *) type_pointer;
+}
+
+#if PY_MAJOR_VERSION < 2
+/* PyModule_AddObject function was introduced in Python 2.0.  The following function
+   is copied out of Python/modsupport.c in python version 2.3.4 */
+SWIGINTERN int
+PyModule_AddObject(PyObject *m, char *name, PyObject *o)
+{
+  PyObject *dict;
+  if (!PyModule_Check(m)) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs module as first arg");
+    return SWIG_ERROR;
+  }
+  if (!o) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs non-NULL value");
+    return SWIG_ERROR;
+  }
+  
+  dict = PyModule_GetDict(m);
+  if (dict == NULL) {
+    /* Internal error -- modules must have a dict! */
+    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
+		 PyModule_GetName(m));
+    return SWIG_ERROR;
+  }
+  if (PyDict_SetItemString(dict, name, o))
+    return SWIG_ERROR;
+  Py_DECREF(o);
+  return SWIG_OK;
+}
+#endif
+
+SWIGRUNTIME void
+#ifdef SWIGPY_USE_CAPSULE
+SWIG_Python_DestroyModule(PyObject *obj)
+#else
+SWIG_Python_DestroyModule(void *vptr)
+#endif
+{
+#ifdef SWIGPY_USE_CAPSULE
+  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
+#else
+  swig_module_info *swig_module = (swig_module_info *) vptr;
+#endif
+  swig_type_info **types = swig_module->types;
+  size_t i;
+  for (i =0; i < swig_module->size; ++i) {
+    swig_type_info *ty = types[i];
+    if (ty->owndata) {
+      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
+      if (data) SwigPyClientData_Del(data);
+    }
+  }
+  Py_DECREF(SWIG_This());
+  swig_this = NULL;
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetModule(swig_module_info *swig_module) {
+#if PY_VERSION_HEX >= 0x03000000
+ /* Add a dummy module object into sys.modules */
+  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
+#else
+  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
+  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
+#endif
+#ifdef SWIGPY_USE_CAPSULE
+  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
+  if (pointer && module) {
+    PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
+#else
+  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  if (pointer && module) {
+    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
+#endif
+}
+
+/* The python cached type query */
+SWIGRUNTIME PyObject *
+SWIG_Python_TypeCache(void) {
+  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
+  return cache;
+}
+
+SWIGRUNTIME swig_type_info *
+SWIG_Python_TypeQuery(const char *type)
+{
+  PyObject *cache = SWIG_Python_TypeCache();
+  PyObject *key = SWIG_Python_str_FromChar(type); 
+  PyObject *obj = PyDict_GetItem(cache, key);
+  swig_type_info *descriptor;
+  if (obj) {
+#ifdef SWIGPY_USE_CAPSULE
+    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
+#else
+    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
+#endif
+  } else {
+    swig_module_info *swig_module = SWIG_Python_GetModule();
+    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
+    if (descriptor) {
+#ifdef SWIGPY_USE_CAPSULE
+      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
+#else
+      obj = PyCObject_FromVoidPtr(descriptor, NULL);
+#endif
+      PyDict_SetItem(cache, key, obj);
+      Py_DECREF(obj);
+    }
+  }
+  Py_DECREF(key);
+  return descriptor;
+}
+
+/* 
+   For backward compatibility only
+*/
+#define SWIG_POINTER_EXCEPTION  0
+#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
+#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
+
+SWIGRUNTIME int
+SWIG_Python_AddErrMesg(const char* mesg, int infront)
+{  
+  if (PyErr_Occurred()) {
+    PyObject *type = 0;
+    PyObject *value = 0;
+    PyObject *traceback = 0;
+    PyErr_Fetch(&type, &value, &traceback);
+    if (value) {
+      char *tmp;
+      PyObject *old_str = PyObject_Str(value);
+      Py_XINCREF(type);
+      PyErr_Clear();
+      if (infront) {
+	PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
+      } else {
+	PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
+      }
+      SWIG_Python_str_DelForPy3(tmp);
+      Py_DECREF(old_str);
+    }
+    return 1;
+  } else {
+    return 0;
+  }
+}
+  
+SWIGRUNTIME int
+SWIG_Python_ArgFail(int argnum)
+{
+  if (PyErr_Occurred()) {
+    /* add information about failing argument */
+    char mesg[256];
+    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
+    return SWIG_Python_AddErrMesg(mesg, 1);
+  } else {
+    return 0;
+  }
+}
+
+SWIGRUNTIMEINLINE const char *
+SwigPyObject_GetDesc(PyObject *self)
+{
+  SwigPyObject *v = (SwigPyObject *)self;
+  swig_type_info *ty = v ? v->ty : 0;
+  return ty ? ty->str : "";
+}
+
+SWIGRUNTIME void
+SWIG_Python_TypeError(const char *type, PyObject *obj)
+{
+  if (type) {
+#if defined(SWIG_COBJECT_TYPES)
+    if (obj && SwigPyObject_Check(obj)) {
+      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
+      if (otype) {
+	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
+		     type, otype);
+	return;
+      }
+    } else 
+#endif      
+    {
+      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
+      if (otype) {
+	PyObject *str = PyObject_Str(obj);
+	const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
+	if (cstr) {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
+		       type, otype, cstr);
+          SWIG_Python_str_DelForPy3(cstr);
+	} else {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
+		       type, otype);
+	}
+	Py_XDECREF(str);
+	return;
+      }
+    }   
+    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
+  } else {
+    PyErr_Format(PyExc_TypeError, "unexpected type is received");
+  }
+}
+
+
+/* Convert a pointer value, signal an exception on a type mismatch */
+SWIGRUNTIME void *
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
+  void *result;
+  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
+    PyErr_Clear();
+#if SWIG_POINTER_EXCEPTION
+    if (flags) {
+      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
+      SWIG_Python_ArgFail(argnum);
+    }
+#endif
+  }
+  return result;
+}
+
+#ifdef SWIGPYTHON_BUILTIN
+SWIGRUNTIME int
+SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
+  PyTypeObject *tp = obj->ob_type;
+  PyObject *descr;
+  PyObject *encoded_name;
+  descrsetfunc f;
+  int res;
+
+# ifdef Py_USING_UNICODE
+  if (PyString_Check(name)) {
+    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
+    if (!name)
+      return -1;
+  } else if (!PyUnicode_Check(name))
+# else
+  if (!PyString_Check(name))
+# endif
+  {
+    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
+    return -1;
+  } else {
+    Py_INCREF(name);
+  }
+
+  if (!tp->tp_dict) {
+    if (PyType_Ready(tp) < 0)
+      goto done;
+  }
+
+  res = -1;
+  descr = _PyType_Lookup(tp, name);
+  f = NULL;
+  if (descr != NULL)
+    f = descr->ob_type->tp_descr_set;
+  if (!f) {
+    if (PyString_Check(name)) {
+      encoded_name = name;
+      Py_INCREF(name);
+    } else {
+      encoded_name = PyUnicode_AsUTF8String(name);
+    }
+    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
+    Py_DECREF(encoded_name);
+  } else {
+    res = f(descr, obj, value);
+  }
+  
+  done:
+  Py_DECREF(name);
+  return res;
+}
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
+
+#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
+
+
+
+/* -------- TYPES TABLE (BEGIN) -------- */
+
+#define SWIGTYPE_p_attrl swig_types[0]
+#define SWIGTYPE_p_attrlArray swig_types[1]
+#define SWIGTYPE_p_attropl swig_types[2]
+#define SWIGTYPE_p_batch_status swig_types[3]
+#define SWIGTYPE_p_char swig_types[4]
+#define SWIGTYPE_p_getter_setter swig_types[5]
+#define SWIGTYPE_p_int swig_types[6]
+#define SWIGTYPE_p_long swig_types[7]
+#define SWIGTYPE_p_p_char swig_types[8]
+#define SWIGTYPE_p_pthread_mutex_t swig_types[9]
+#define SWIGTYPE_p_sockaddr swig_types[10]
+static swig_type_info *swig_types[12];
+static swig_module_info swig_module = {swig_types, 11, 0, 0, 0, 0};
+#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
+#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
+
+/* -------- TYPES TABLE (END) -------- */
+
+#if (PY_VERSION_HEX <= 0x02000000)
+# if !defined(SWIG_PYTHON_CLASSIC)
+#  error "This python version requires swig to be run with the '-classic' option"
+# endif
+#endif
+
+/*-----------------------------------------------
+              @(target):= _pbs.so
+  ------------------------------------------------*/
+#if PY_VERSION_HEX >= 0x03000000
+#  define SWIG_init    PyInit__pbs
+
+#else
+#  define SWIG_init    init_pbs
+
+#endif
+#define SWIG_name    "_pbs"
+
+#define SWIGVERSION 0x020007 
+#define SWIG_VERSION SWIGVERSION
+
+
+#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
+#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 
+
+
+
+#include "pbs_ifl.h"
+#include "pbs_error.h"
+#include "rm.h"
+#include "log.h"
+
+#define SARA_DEBUG 0
+
+
+
+int Get_List_Size(PyObject *src)
+{
+  if (PyList_Check(src))
+    return(PyList_Size(src));
+
+  /* check if valid NULL pointer */
+  if ( PyString_Check(src) ) {
+    if ( ! strcmp(PyString_AsString(src), "NULL") )
+      return(0);
+  }
+  return(-1);
+
+} // end Get_List_Size()
+
+
+
+
+// The default constructor for struct attrl
+//
+struct attrl *new_attrl(int number)
+{
+  struct attrl *ptr;
+  struct attrl *prev, *current;
+  int i;
+
+  /* 
+    allocate memory as a one block is handy for Python scripts 
+    and fill in the next fields so it also works for the C-library
+  */
+
+  if (SARA_DEBUG)
+  {
+     printf("new_attrl \n");
+  }
+  ptr = (struct attrl *) malloc(number * sizeof(struct attrl));
+
+  prev = NULL;
+  current = ptr + (number - 1);
+  for (i=0; i < number; i++)
+  { 
+    // printf("constructor called\n");
+    current->name     = (char *) malloc(MAXNAMLEN * sizeof(char));
+    current->resource = (char *) malloc(MAXNAMLEN * sizeof(char));
+    current->value    = (char *) malloc(MAXNAMLEN * sizeof(char));
+
+    bzero( (void*) current->name, sizeof(current->name));
+    bzero( (void*) current->resource, sizeof(current->resource));
+    bzero( (void*) current->value, sizeof(current->value));
+
+    current->next     = prev;
+    prev = current;
+    current--;
+  }
+  return (struct attrl *)ptr;
+
+} // end new_attrl()
+
+
+
+// The default constructor for struct attropl
+//
+struct attropl *new_attropl(int number)
+{
+  struct attropl *ptr;
+  struct attropl *prev, *current;
+  int i;
+
+  /* 
+    allocate memory as a one block is handy for Python scripts 
+    and fill in the next fields so it also works for the C-library
+  */
+  ptr = (struct attropl *) malloc(number * sizeof(struct attropl));
+
+  prev = NULL;
+  current = ptr + (number - 1);
+  for (i=0; i < number; i++)
+  { 
+    // printf("constructor called\n");
+    current->name     = (char *) malloc(MAXNAMLEN * sizeof(char));
+    current->resource = (char *) malloc(MAXNAMLEN * sizeof(char));
+    current->value    = (char *) malloc(MAXNAMLEN * sizeof(char));
+
+    bzero( (void*) current->name, sizeof(current->name));
+    bzero( (void*) current->resource, sizeof(current->resource));
+    bzero( (void*) current->value, sizeof(current->value));
+    // current->op = 0;
+
+    current->next     = prev;
+    prev = current;
+    current--;
+  }
+  return (struct attropl *)ptr;
+
+} // end new_attropl()
+
+/* Not used only returned */
+struct batch_status *new_batch_status()
+{
+   struct batch_status *ptr;
+
+   ptr = (struct batch_status *) malloc(sizeof(struct batch_status));
+   return (struct batch_status *)ptr;
+} // end new struct batch_status
+
+int get_error()
+{
+   if (SARA_DEBUG)
+   {
+      printf("Bas pbs_errno = %d, pbs_strerror %s\n", pbs_errno, pbs_strerror(pbs_errno));
+   }
+   return (pbs_errno);
+}
+
+
+
+
+#include <limits.h>
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+#   define LLONG_MAX __LONG_LONG_MAX__
+#   define LLONG_MIN (-LLONG_MAX - 1LL)
+#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
+#endif
+
+
+SWIGINTERN int
+SWIG_AsVal_double (PyObject *obj, double *val)
+{
+  int res = SWIG_TypeError;
+  if (PyFloat_Check(obj)) {
+    if (val) *val = PyFloat_AsDouble(obj);
+    return SWIG_OK;
+  } else if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    double v = PyLong_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    double d = PyFloat_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = d;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      long v = PyLong_AsLong(obj);
+      if (!PyErr_Occurred()) {
+	if (val) *val = v;
+	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
+      } else {
+	PyErr_Clear();
+      }
+    }
+  }
+#endif
+  return res;
+}
+
+
+#include <float.h>
+
+
+#include <math.h>
+
+
+SWIGINTERNINLINE int
+SWIG_CanCastAsInteger(double *d, double min, double max) {
+  double x = *d;
+  if ((min <= x && x <= max)) {
+   double fx = floor(x);
+   double cx = ceil(x);
+   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
+   if ((errno == EDOM) || (errno == ERANGE)) {
+     errno = 0;
+   } else {
+     double summ, reps, diff;
+     if (rd < x) {
+       diff = x - rd;
+     } else if (rd > x) {
+       diff = rd - x;
+     } else {
+       return 1;
+     }
+     summ = rd + x;
+     reps = diff/summ;
+     if (reps < 8*DBL_EPSILON) {
+       *d = rd;
+       return 1;
+     }
+   }
+  }
+  return 0;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_long (PyObject *obj, long* val)
+{
+  if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    long v = PyLong_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    long v = PyInt_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
+	if (val) *val = (long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_int (PyObject * obj, int *val)
+{
+  long v;
+  int res = SWIG_AsVal_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < INT_MIN || v > INT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (int)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERNINLINE PyObject*
+  SWIG_From_int  (int value)
+{
+  return PyInt_FromLong((long) value);
+}
+
+
+typedef struct attrl attrlArray;
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
+{
+  if (PyInt_Check(obj)) {
+    long v = PyInt_AsLong(obj);
+    if (v >= 0) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      return SWIG_OverflowError;
+    }
+  } else if (PyLong_Check(obj)) {
+    unsigned long v = PyLong_AsUnsignedLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    unsigned long v = PyLong_AsUnsignedLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
+	if (val) *val = (unsigned long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERNINLINE int
+SWIG_AsVal_size_t (PyObject * obj, size_t *val)
+{
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
+  if (SWIG_IsOK(res) && val) *val = (size_t)(v);
+  return res;
+}
+
+SWIGINTERN attrlArray *new_attrlArray(size_t nelements){
+    return (struct attrl *)malloc((nelements)*sizeof(struct attrl));
+  }
+SWIGINTERN void delete_attrlArray(attrlArray *self){
+    free((char*)self);
+  }
+SWIGINTERN struct attrl attrlArray___getitem__(attrlArray *self,size_t index){
+    return self[index];
+  }
+SWIGINTERN void attrlArray___setitem__(attrlArray *self,size_t index,struct attrl value){
+    self[index] = value;
+  }
+SWIGINTERN struct attrl *attrlArray_cast(attrlArray *self){
+    return self;
+  }
+SWIGINTERN attrlArray *attrlArray_frompointer(struct attrl *t){
+    return (attrlArray *)(t);
+  }
+
+SWIGINTERN swig_type_info*
+SWIG_pchar_descriptor(void)
+{
+  static int init = 0;
+  static swig_type_info* info = 0;
+  if (!init) {
+    info = SWIG_TypeQuery("_p_char");
+    init = 1;
+  }
+  return info;
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_FromCharPtrAndSize(const char* carray, size_t size)
+{
+  if (carray) {
+    if (size > INT_MAX) {
+      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+      return pchar_descriptor ? 
+	SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
+    } else {
+#if PY_VERSION_HEX >= 0x03000000
+      return PyUnicode_FromStringAndSize(carray, (int)(size));
+#else
+      return PyString_FromStringAndSize(carray, (int)(size));
+#endif
+    }
+  } else {
+    return SWIG_Py_Void();
+  }
+}
+
+
+SWIGINTERNINLINE PyObject * 
+SWIG_FromCharPtr(const char *cptr)
+{ 
+  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
+}
+
+
+SWIGINTERN int
+SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
+{
+#if PY_VERSION_HEX>=0x03000000
+  if (PyUnicode_Check(obj))
+#else  
+  if (PyString_Check(obj))
+#endif
+  {
+    char *cstr; Py_ssize_t len;
+#if PY_VERSION_HEX>=0x03000000
+    if (!alloc && cptr) {
+        /* We can't allow converting without allocation, since the internal
+           representation of string in Python 3 is UCS-2/UCS-4 but we require
+           a UTF-8 representation.
+           TODO(bhy) More detailed explanation */
+        return SWIG_RuntimeError;
+    }
+    obj = PyUnicode_AsUTF8String(obj);
+    PyBytes_AsStringAndSize(obj, &cstr, &len);
+    if(alloc) *alloc = SWIG_NEWOBJ;
+#else
+    PyString_AsStringAndSize(obj, &cstr, &len);
+#endif
+    if (cptr) {
+      if (alloc) {
+	/* 
+	   In python the user should not be able to modify the inner
+	   string representation. To warranty that, if you define
+	   SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
+	   buffer is always returned.
+
+	   The default behavior is just to return the pointer value,
+	   so, be careful.
+	*/ 
+#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
+	if (*alloc != SWIG_OLDOBJ) 
+#else
+	if (*alloc == SWIG_NEWOBJ) 
+#endif
+	  {
+	    *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
+	    *alloc = SWIG_NEWOBJ;
+	  }
+	else {
+	  *cptr = cstr;
+	  *alloc = SWIG_OLDOBJ;
+	}
+      } else {
+        #if PY_VERSION_HEX>=0x03000000
+        assert(0); /* Should never reach here in Python 3 */
+        #endif
+	*cptr = SWIG_Python_str_AsChar(obj);
+      }
+    }
+    if (psize) *psize = len + 1;
+#if PY_VERSION_HEX>=0x03000000
+    Py_XDECREF(obj);
+#endif
+    return SWIG_OK;
+  } else {
+    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+    if (pchar_descriptor) {
+      void* vptr = 0;
+      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
+	if (cptr) *cptr = (char *) vptr;
+	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
+	if (alloc) *alloc = SWIG_OLDOBJ;
+	return SWIG_OK;
+      }
+    }
+  }
+  return SWIG_TypeError;
+}
+
+
+
+
+SWIGINTERN char *attrl___str__(struct attrl *self){
+    static char temp[4 * 255] ;
+    snprintf(temp, sizeof(temp), "(%s,%s,%s)", 
+      self->name, self->resource, self->value);
+    
+    return &temp[0];
+  }
+SWIGINTERN void delete_attrl(struct attrl *self){
+    if (SARA_DEBUG)
+       printf("Bas free attrl\n");
+
+    // free(self);
+  }
+SWIGINTERN char *attropl___str__(struct attropl *self){
+    static char temp[4 * 255] ;
+    snprintf(temp, sizeof(temp), "(%s,%s,%s)", 
+      self->name, self->resource, self->value);
+    
+    return &temp[0];
+  }
+SWIGINTERN void delete_attropl(struct attropl *self){
+    if (SARA_DEBUG)
+       printf("Bas free attropl\n");
+
+    // free(self);
+  }
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
+{
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v > UINT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (unsigned int)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERNINLINE PyObject*
+  SWIG_From_bool  (bool value)
+{
+  return PyBool_FromLong(value ? 1 : 0);
+}
+
+
+SWIGINTERN int
+SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
+{ 
+  char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
+  int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
+  if (SWIG_IsOK(res)) {
+    if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize;
+    if (csize <= size) {
+      if (val) {
+	if (csize) memcpy(val, cptr, csize*sizeof(char));
+	if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
+      }
+      if (alloc == SWIG_NEWOBJ) {
+	free((char*)cptr);
+	res = SWIG_DelNewMask(res);
+      }      
+      return res;
+    }
+    if (alloc == SWIG_NEWOBJ) free((char*)cptr);
+  }
+  return SWIG_TypeError;
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+SWIGINTERN PyObject *_wrap_new_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attrl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:new_attrl",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attrl" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (struct attrl *)new_attrl(arg1);
+  {
+    PyObject      *obj_batch;
+    struct attrl  *ptr;
+    int           i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct attrl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attropl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:new_attropl",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attropl" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (struct attropl *)new_attropl(arg1);
+  {
+    PyObject          *obj_batch;
+    struct attropl    *ptr;
+    int               i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct attropl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); 
+      PyList_SetItem(resultobj, i, obj_batch); 
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_batch_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":new_batch_status")) SWIG_fail;
+  result = (struct batch_status *)new_batch_status();
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr, *org;
+    int                   i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    org = result;
+    ptr = org;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_get_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":get_error")) SWIG_fail;
+  result = (int)get_error();
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_attrlArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  size_t arg1 ;
+  size_t val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  attrlArray *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:new_attrlArray",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attrlArray" "', argument " "1"" of type '" "size_t""'");
+  } 
+  arg1 = (size_t)(val1);
+  result = (attrlArray *)new_attrlArray(arg1);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_attrlArray, SWIG_POINTER_NEW |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_delete_attrlArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  attrlArray *arg1 = (attrlArray *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:delete_attrlArray",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrlArray, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attrlArray" "', argument " "1"" of type '" "attrlArray *""'"); 
+  }
+  arg1 = (attrlArray *)(argp1);
+  delete_attrlArray(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrlArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  attrlArray *arg1 = (attrlArray *) 0 ;
+  size_t arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  size_t val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  struct attrl result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrlArray___getitem__",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrlArray, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrlArray___getitem__" "', argument " "1"" of type '" "attrlArray *""'"); 
+  }
+  arg1 = (attrlArray *)(argp1);
+  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrlArray___getitem__" "', argument " "2"" of type '" "size_t""'");
+  } 
+  arg2 = (size_t)(val2);
+  result = attrlArray___getitem__(arg1,arg2);
+  resultobj = SWIG_NewPointerObj((struct attrl *)memcpy((struct attrl *)malloc(sizeof(struct attrl)),&result,sizeof(struct attrl)), SWIGTYPE_p_attrl, SWIG_POINTER_OWN |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrlArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  attrlArray *arg1 = (attrlArray *) 0 ;
+  size_t arg2 ;
+  struct attrl arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  size_t val2 ;
+  int ecode2 = 0 ;
+  void *argp3 ;
+  int res3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:attrlArray___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrlArray, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrlArray___setitem__" "', argument " "1"" of type '" "attrlArray *""'"); 
+  }
+  arg1 = (attrlArray *)(argp1);
+  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrlArray___setitem__" "', argument " "2"" of type '" "size_t""'");
+  } 
+  arg2 = (size_t)(val2);
+  {
+    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_attrl,  0 );
+    if (!SWIG_IsOK(res3)) {
+      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "attrlArray___setitem__" "', argument " "3"" of type '" "struct attrl""'"); 
+    }  
+    if (!argp3) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "attrlArray___setitem__" "', argument " "3"" of type '" "struct attrl""'");
+    } else {
+      arg3 = *((struct attrl *)(argp3));
+    }
+  }
+  attrlArray___setitem__(arg1,arg2,arg3);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrlArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  attrlArray *arg1 = (attrlArray *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attrl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrlArray_cast",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrlArray, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrlArray_cast" "', argument " "1"" of type '" "attrlArray *""'"); 
+  }
+  arg1 = (attrlArray *)(argp1);
+  result = (struct attrl *)attrlArray_cast(arg1);
+  {
+    PyObject      *obj_batch;
+    struct attrl  *ptr;
+    int           i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct attrl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrlArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  attrlArray *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrlArray_frompointer",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrlArray_frompointer" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (attrlArray *)attrlArray_frompointer(arg1);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_attrlArray, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *attrlArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p_attrlArray, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject *_wrap_attrl_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  struct attrl *arg2 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_next_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_next_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_next_set" "', argument " "2"" of type '" "struct attrl *""'"); 
+  }
+  arg2 = (struct attrl *)(argp2);
+  if (arg1) (arg1)->next = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attrl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_next_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_next_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (struct attrl *) ((arg1)->next);
+  {
+    PyObject      *obj_batch;
+    struct attrl  *ptr;
+    int           i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct attrl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_name_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_name_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->name) free((char*)arg1->name);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->name = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_name_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (char *) ((arg1)->name);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_resource_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_resource_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->resource) free((char*)arg1->resource);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->resource = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->resource = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_resource_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (char *) ((arg1)->resource);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_value_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_value_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->value) free((char*)arg1->value);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->value = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->value = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_value_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (char *) ((arg1)->value);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  enum batch_op arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_op_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrl_op_set" "', argument " "2"" of type '" "enum batch_op""'");
+  } 
+  arg2 = (enum batch_op)(val2);
+  if (arg1) (arg1)->op = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  enum batch_op result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_op_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (enum batch_op) ((arg1)->op);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl___str__",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl___str__" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (char *)attrl___str__(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_delete_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:delete_attrl",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attrl" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  delete_attrl(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *attrl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p_attrl, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject *_wrap_attropl_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  struct attropl *arg2 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_next_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_next_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_next_set" "', argument " "2"" of type '" "struct attropl *""'"); 
+  }
+  arg2 = (struct attropl *)(argp2);
+  if (arg1) (arg1)->next = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attropl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_next_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_next_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (struct attropl *) ((arg1)->next);
+  {
+    PyObject          *obj_batch;
+    struct attropl    *ptr;
+    int               i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct attropl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); 
+      PyList_SetItem(resultobj, i, obj_batch); 
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_name_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_name_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->name) free((char*)arg1->name);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->name = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_name_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (char *) ((arg1)->name);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_resource_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_resource_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->resource) free((char*)arg1->resource);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->resource = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->resource = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_resource_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (char *) ((arg1)->resource);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_value_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_value_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->value) free((char*)arg1->value);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->value = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->value = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_value_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (char *) ((arg1)->value);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  enum batch_op arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_op_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attropl_op_set" "', argument " "2"" of type '" "enum batch_op""'");
+  } 
+  arg2 = (enum batch_op)(val2);
+  if (arg1) (arg1)->op = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  enum batch_op result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_op_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (enum batch_op) ((arg1)->op);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl___str__",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl___str__" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (char *)attropl___str__(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_delete_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:delete_attropl",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attropl" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  delete_attropl(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *attropl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p_attropl, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject *_wrap_batch_status_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  struct batch_status *arg2 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_next_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_next_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_batch_status, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_next_set" "', argument " "2"" of type '" "struct batch_status *""'"); 
+  }
+  arg2 = (struct batch_status *)(argp2);
+  if (arg1) (arg1)->next = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_next_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_next_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  result = (struct batch_status *) ((arg1)->next);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr, *org;
+    int                   i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    org = result;
+    ptr = org;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_name_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_name_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->name) free((char*)arg1->name);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->name = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_name_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  result = (char *) ((arg1)->name);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_attribs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  struct attrl *arg2 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_attribs_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_attribs_set" "', argument " "2"" of type '" "struct attrl *""'"); 
+  }
+  arg2 = (struct attrl *)(argp2);
+  if (arg1) (arg1)->attribs = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_attribs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attrl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_attribs_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  result = (struct attrl *) ((arg1)->attribs);
+  {
+    PyObject      *obj_batch;
+    struct attrl  *ptr;
+    int           i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct attrl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_text_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_text_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_text_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->text) free((char*)arg1->text);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->text = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->text = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_text_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_text_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  result = (char *) ((arg1)->text);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *batch_status_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p_batch_status, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN int Swig_var_pbs_server_set(PyObject *_val) {
+  {
+    char *cptr = 0; size_t csize = 0; int alloc = SWIG_NEWOBJ;
+    int res = SWIG_AsCharPtrAndSize(_val, &cptr, &csize, &alloc);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_server""' of type '""char *""'");
+    }
+    if (pbs_server) free((char*)pbs_server);
+    if (alloc == SWIG_NEWOBJ) {
+      pbs_server = cptr;
+    } else {
+      pbs_server = csize ? (char *)(char *)memcpy((char *)malloc((csize)*sizeof(char)), cptr, sizeof(char)*(csize)) : 0;
+    }
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_pbs_server_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_FromCharPtr(pbs_server);
+  return pyobj;
+}
+
+
+SWIGINTERN PyObject *_wrap_avail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:avail",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "avail" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avail" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  result = (char *)avail(arg1,arg2);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_asyrunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_asyrunjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_asyrunjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_asyrunjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_asyrunjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_asyrunjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_asyrunjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_alterjob_async(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob_async",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_alterjob_async" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_alterjob_async" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Convert python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skip the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_alterjob_async" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_alterjob_async(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_alterjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_alterjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_alterjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Convert python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skip the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_alterjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_alterjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_connect",&obj0)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pbs_connect" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  result = (int)pbs_connect(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_query_max_connections(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":pbs_query_max_connections")) SWIG_fail;
+  result = (int)pbs_query_max_connections();
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":pbs_default")) SWIG_fail;
+  result = (char *)pbs_default();
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_fbserver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":pbs_fbserver")) SWIG_fail;
+  result = (char *)pbs_fbserver();
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_get_server_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":pbs_get_server_list")) SWIG_fail;
+  result = (char *)pbs_get_server_list();
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_deljob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_deljob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_deljob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_deljob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_deljob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)pbs_deljob(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_disconnect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_disconnect",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_disconnect" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (int)pbs_disconnect(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_geterrmsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_geterrmsg",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_geterrmsg" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (char *)pbs_geterrmsg(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_holdjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_holdjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_holdjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_holdjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_holdjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_holdjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_holdjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_checkpointjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_checkpointjob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_checkpointjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_checkpointjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_checkpointjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)pbs_checkpointjob(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_locjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_locjob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_locjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_locjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_locjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (char *)pbs_locjob(arg1,arg2,arg3);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_manager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int arg3 ;
+  char *arg4 = (char *) 0 ;
+  struct attropl *arg5 = (struct attropl *) 0 ;
+  char *arg6 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  int res6 ;
+  char *buf6 = 0 ;
+  int alloc6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:pbs_manager",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_manager" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_manager" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_manager" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_manager" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  {
+    PyObject          *py_obj;
+    struct attropl    *ptr, *prev;
+    char              s[255];
+    int               i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Convert python -> c (struct attropl *):\n");
+    
+    size = Get_List_Size(obj4);
+    
+    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    //printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg5 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj4, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg5 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
+  if (!SWIG_IsOK(res6)) {
+    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_manager" "', argument " "6"" of type '" "char *""'");
+  }
+  arg6 = (char *)(buf6);
+  result = (int)pbs_manager(arg1,arg2,arg3,arg4,arg5,arg6);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  return resultobj;
+fail:
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_movejob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_movejob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_movejob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_movejob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_movejob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_movejob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_movejob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_msgjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  int arg3 ;
+  char *arg4 = (char *) 0 ;
+  char *arg5 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  int res5 ;
+  char *buf5 = 0 ;
+  int alloc5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_msgjob",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_msgjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_msgjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_msgjob" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_msgjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_msgjob" "', argument " "5"" of type '" "char *""'");
+  }
+  arg5 = (char *)(buf5);
+  result = (int)pbs_msgjob(arg1,arg2,arg3,arg4,arg5);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_orderjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_orderjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_orderjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_orderjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_orderjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_orderjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_orderjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rescquery(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char **arg2 = (char **) 0 ;
+  int arg3 ;
+  int *arg4 = (int *) 0 ;
+  int *arg5 = (int *) 0 ;
+  int *arg6 = (int *) 0 ;
+  int *arg7 = (int *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  void *argp5 = 0 ;
+  int res5 = 0 ;
+  void *argp6 = 0 ;
+  int res6 = 0 ;
+  void *argp7 = 0 ;
+  int res7 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:pbs_rescquery",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescquery" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_char, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rescquery" "', argument " "2"" of type '" "char **""'"); 
+  }
+  arg2 = (char **)(argp2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_rescquery" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rescquery" "', argument " "4"" of type '" "int *""'"); 
+  }
+  arg4 = (int *)(argp4);
+  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_rescquery" "', argument " "5"" of type '" "int *""'"); 
+  }
+  arg5 = (int *)(argp5);
+  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res6)) {
+    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_rescquery" "', argument " "6"" of type '" "int *""'"); 
+  }
+  arg6 = (int *)(argp6);
+  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res7)) {
+    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "pbs_rescquery" "', argument " "7"" of type '" "int *""'"); 
+  }
+  arg7 = (int *)(argp7);
+  result = (int)pbs_rescquery(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
+  resultobj = SWIG_From_int((int)(result));
+  {
+    free( (char *) arg2);
+  }
+  return resultobj;
+fail:
+  {
+    free( (char *) arg2);
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rescreserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char **arg2 = (char **) 0 ;
+  int arg3 ;
+  resource_t *arg4 = (resource_t *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rescreserve",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescreserve" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_char, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rescreserve" "', argument " "2"" of type '" "char **""'"); 
+  }
+  arg2 = (char **)(argp2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_rescreserve" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rescreserve" "', argument " "4"" of type '" "resource_t *""'"); 
+  }
+  arg4 = (resource_t *)(argp4);
+  result = (int)pbs_rescreserve(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  {
+    free( (char *) arg2);
+  }
+  return resultobj;
+fail:
+  {
+    free( (char *) arg2);
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rescrelease(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  resource_t arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:pbs_rescrelease",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescrelease" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_rescrelease" "', argument " "2"" of type '" "resource_t""'");
+  } 
+  arg2 = (resource_t)(val2);
+  result = (int)pbs_rescrelease(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rerunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_rerunjob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rerunjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rerunjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_rerunjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)pbs_rerunjob(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rlsjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rlsjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rlsjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rlsjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_rlsjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rlsjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_rlsjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_runjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_runjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_runjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_runjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_runjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_runjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_runjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_selectjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  struct attropl *arg2 = (struct attropl *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  char **result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_selectjob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_selectjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_selectjob" "', argument " "2"" of type '" "struct attropl *""'"); 
+  }
+  arg2 = (struct attropl *)(argp2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_selectjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (char **)pbs_selectjob(arg1,arg2,arg3);
+  {
+    int len=0, i;
+    
+    if (SARA_DEBUG) 
+    printf("Convert char ** -> python list\n");
+    
+    
+    if (result == NULL) 
+    resultobj = PyList_New(0);
+    else {
+      while (result[len]) 
+      len++;
+    }
+    
+    if (SARA_DEBUG) 
+    printf("\tSize of List: %d\n", len);
+    
+    resultobj = PyList_New(len);
+    if (SARA_DEBUG) 
+    printf("\t<Contents>\n");
+    for (i=0; i < len; i++ ) {
+      PyList_SetItem(resultobj, i , PyString_FromString(result[i])); 
+      if (SARA_DEBUG) 
+      printf("\t\t- %s\n", result[i]);
+    }
+    
+    if (SARA_DEBUG) 
+    printf("\t</Contents>\n");
+  }
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_sigjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_sigjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_sigjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_sigjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_sigjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_sigjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_sigjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_sigjobasync(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_sigjobasync",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_sigjobasync" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_sigjobasync" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_sigjobasync" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_sigjobasync" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_sigjobasync(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statfree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_statfree",&obj0)) SWIG_fail;
+  {
+    PyObject              *py_obj;
+    struct batch_status   *ptr, *prev;
+    char                  s[255];
+    int                   i=0, size=0;
+    
+    if (SARA_DEBUG) printf("Convert python -> c (struct batch_status *):\n");
+    
+    size = Get_List_Size(obj0);
+    if (SARA_DEBUG) printf("\tSize of batch_status list: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    // printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg1 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj0, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_batch_status, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg1 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      prev = ptr;
+      
+    } // end for
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  pbs_statfree(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_statjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Convert python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skip the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_statjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (struct batch_status *)pbs_statjob(arg1,arg2,arg3,arg4);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr, *org;
+    int                   i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    org = result;
+    ptr = org;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_selstat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  struct attropl *arg2 = (struct attropl *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_selstat",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_selstat" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_selstat" "', argument " "2"" of type '" "struct attropl *""'"); 
+  }
+  arg2 = (struct attropl *)(argp2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_selstat" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (struct batch_status *)pbs_selstat(arg1,arg2,arg3);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr, *org;
+    int                   i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    org = result;
+    ptr = org;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statque(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statque",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statque" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_statque" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Convert python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skip the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_statque" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (struct batch_status *)pbs_statque(arg1,arg2,arg3,arg4);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr, *org;
+    int                   i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    org = result;
+    ptr = org;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statserver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  struct attrl *arg2 = (struct attrl *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_statserver",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statserver" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Convert python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj1);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skip the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg2 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_statserver" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (struct batch_status *)pbs_statserver(arg1,arg2,arg3);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr, *org;
+    int                   i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    org = result;
+    ptr = org;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statnode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statnode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statnode" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_statnode" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Convert python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skip the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_statnode" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (struct batch_status *)pbs_statnode(arg1,arg2,arg3,arg4);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr, *org;
+    int                   i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Convert c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    org = result;
+    ptr = org;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_submit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  struct attropl *arg2 = (struct attropl *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  char *arg5 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  int res5 ;
+  char *buf5 = 0 ;
+  int alloc5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_submit",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_submit" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    PyObject          *py_obj;
+    struct attropl    *ptr, *prev;
+    char              s[255];
+    int               i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Convert python -> c (struct attropl *):\n");
+    
+    size = Get_List_Size(obj1);
+    
+    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    //printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg2 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_submit" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_submit" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_submit" "', argument " "5"" of type '" "char *""'");
+  }
+  arg5 = (char *)(buf5);
+  result = (char *)pbs_submit(arg1,arg2,arg3,arg4,arg5);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_submit_hash_ext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  void *arg2 = (void *) 0 ;
+  void *arg3 = (void *) 0 ;
+  char *arg4 = (char *) 0 ;
+  char *arg5 = (char *) 0 ;
+  char *arg6 = (char *) 0 ;
+  char **arg7 = (char **) 0 ;
+  char **arg8 = (char **) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  int res3 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  int res5 ;
+  char *buf5 = 0 ;
+  int alloc5 = 0 ;
+  int res6 ;
+  char *buf6 = 0 ;
+  int alloc6 = 0 ;
+  void *argp7 = 0 ;
+  int res7 = 0 ;
+  void *argp8 = 0 ;
+  int res8 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:pbs_submit_hash_ext",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_submit_hash_ext" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_submit_hash_ext" "', argument " "2"" of type '" "void *""'"); 
+  }
+  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_submit_hash_ext" "', argument " "3"" of type '" "void *""'"); 
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_submit_hash_ext" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_submit_hash_ext" "', argument " "5"" of type '" "char *""'");
+  }
+  arg5 = (char *)(buf5);
+  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
+  if (!SWIG_IsOK(res6)) {
+    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_submit_hash_ext" "', argument " "6"" of type '" "char *""'");
+  }
+  arg6 = (char *)(buf6);
+  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_p_char, 0 |  0 );
+  if (!SWIG_IsOK(res7)) {
+    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "pbs_submit_hash_ext" "', argument " "7"" of type '" "char **""'"); 
+  }
+  arg7 = (char **)(argp7);
+  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_p_char, 0 |  0 );
+  if (!SWIG_IsOK(res8)) {
+    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "pbs_submit_hash_ext" "', argument " "8"" of type '" "char **""'"); 
+  }
+  arg8 = (char **)(argp8);
+  result = (int)pbs_submit_hash_ext(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  {
+    free( (char *) arg7);
+  }
+  {
+    free( (char *) arg8);
+  }
+  return resultobj;
+fail:
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  {
+    free( (char *) arg7);
+  }
+  {
+    free( (char *) arg8);
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_terminate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_terminate",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_terminate" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_terminate" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_terminate" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)pbs_terminate(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_totpool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:totpool",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "totpool" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "totpool" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  result = (int)totpool(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_usepool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:usepool",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "usepool" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "usepool" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  result = (int)usepool(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_gpumode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int arg4 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_gpumode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_gpumode" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_gpumode" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_gpumode" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pbs_gpumode" "', argument " "4"" of type '" "int""'");
+  } 
+  arg4 = (int)(val4);
+  result = (int)pbs_gpumode(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_trq_set_preferred_network_interface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  struct sockaddr *arg2 = (struct sockaddr *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:trq_set_preferred_network_interface",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "trq_set_preferred_network_interface" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_sockaddr, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "trq_set_preferred_network_interface" "', argument " "2"" of type '" "struct sockaddr *""'"); 
+  }
+  arg2 = (struct sockaddr *)(argp2);
+  result = (int)trq_set_preferred_network_interface(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_trq_get_if_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":trq_get_if_name")) SWIG_fail;
+  result = (char *)trq_get_if_name();
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_stagein(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_stagein",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_stagein" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_stagein" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_stagein" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_stagein" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_stagein(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_openrm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  unsigned int arg2 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:openrm",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "openrm" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "openrm" "', argument " "2"" of type '" "unsigned int""'");
+  } 
+  arg2 = (unsigned int)(val2);
+  result = (int)openrm(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_closerm_err(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int *arg1 = (int *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:closerm_err",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "closerm_err" "', argument " "1"" of type '" "int *""'"); 
+  }
+  arg1 = (int *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "closerm_err" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  result = (int)closerm_err(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_closerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:closerm",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "closerm" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (int)closerm(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_downrm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int *arg1 = (int *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:downrm",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "downrm" "', argument " "1"" of type '" "int *""'"); 
+  }
+  arg1 = (int *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "downrm" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  result = (int)downrm(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_configrm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int *arg2 = (int *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:configrm",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "configrm" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "configrm" "', argument " "2"" of type '" "int *""'"); 
+  }
+  arg2 = (int *)(argp2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "configrm" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)configrm(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_addreq_err(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int *arg2 = (int *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:addreq_err",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "addreq_err" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "addreq_err" "', argument " "2"" of type '" "int *""'"); 
+  }
+  arg2 = (int *)(argp2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "addreq_err" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)addreq_err(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_begin_rm_req(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int *arg2 = (int *) 0 ;
+  int arg3 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:begin_rm_req",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "begin_rm_req" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "begin_rm_req" "', argument " "2"" of type '" "int *""'"); 
+  }
+  arg2 = (int *)(argp2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "begin_rm_req" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  result = (int)begin_rm_req(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_addreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:addreq",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "addreq" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "addreq" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  result = (int)addreq(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_allreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:allreq",&obj0)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "allreq" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  result = (int)allreq(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_getreq_err(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int *arg1 = (int *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:getreq_err",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getreq_err" "', argument " "1"" of type '" "int *""'"); 
+  }
+  arg1 = (int *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "getreq_err" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  result = (char *)getreq_err(arg1,arg2);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_getreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:getreq",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getreq" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (char *)getreq(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_flushreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":flushreq")) SWIG_fail;
+  result = (int)flushreq();
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_activereq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":activereq")) SWIG_fail;
+  result = (int)activereq();
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_fullresp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:fullresp",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fullresp" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  fullresp(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN int Swig_var_log_event_mask_set(PyObject *_val) {
+  {
+    void *argp = 0;
+    int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_long,  0 );  
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""log_event_mask""' of type '""long *""'");
+    }
+    log_event_mask = (long *)(argp);
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_log_event_mask_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(log_event_mask), SWIGTYPE_p_long,  0 );
+  return pyobj;
+}
+
+
+SWIGINTERN int Swig_var_log_mutex_set(PyObject *_val) {
+  {
+    void *argp = 0;
+    int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_pthread_mutex_t,  0 );
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""log_mutex""' of type '""pthread_mutex_t""'");
+    }
+    if (!argp) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""log_mutex""' of type '""pthread_mutex_t""'");
+    } else {
+      log_mutex = *((pthread_mutex_t *)(argp));
+    }
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_log_mutex_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&log_mutex), SWIGTYPE_p_pthread_mutex_t,  0 );
+  return pyobj;
+}
+
+
+SWIGINTERN int Swig_var_job_log_mutex_set(PyObject *_val) {
+  {
+    void *argp = 0;
+    int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_pthread_mutex_t,  0 );
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""job_log_mutex""' of type '""pthread_mutex_t""'");
+    }
+    if (!argp) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""job_log_mutex""' of type '""pthread_mutex_t""'");
+    } else {
+      job_log_mutex = *((pthread_mutex_t *)(argp));
+    }
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_job_log_mutex_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&job_log_mutex), SWIGTYPE_p_pthread_mutex_t,  0 );
+  return pyobj;
+}
+
+
+SWIGINTERN int Swig_var_chk_file_sec_stderr_set(PyObject *_val) {
+  {
+    int val;
+    int res = SWIG_AsVal_int(_val, &val);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""chk_file_sec_stderr""' of type '""int""'");
+    }
+    chk_file_sec_stderr = (int)(val);
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_chk_file_sec_stderr_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_From_int((int)(chk_file_sec_stderr));
+  return pyobj;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_err(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:log_err",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_err" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "log_err" "', argument " "2"" of type '" "char const *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_err" "', argument " "3"" of type '" "char const *""'");
+  }
+  arg3 = (char *)(buf3);
+  log_err(arg1,(char const *)arg2,(char const *)arg3);
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_ext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int arg4 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:log_ext",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_ext" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "log_ext" "', argument " "2"" of type '" "char const *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_ext" "', argument " "3"" of type '" "char const *""'");
+  }
+  arg3 = (char *)(buf3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "log_ext" "', argument " "4"" of type '" "int""'");
+  } 
+  arg4 = (int)(val4);
+  log_ext(arg1,(char const *)arg2,(char const *)arg3,arg4);
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:log_event",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_event" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "log_event" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_event" "', argument " "3"" of type '" "char const *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "log_event" "', argument " "4"" of type '" "char const *""'");
+  }
+  arg4 = (char *)(buf4);
+  log_event(arg1,arg2,(char const *)arg3,(char const *)arg4);
+  resultobj = SWIG_Py_Void();
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_record(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:log_record",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_record" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "log_record" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_record" "', argument " "3"" of type '" "char const *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "log_record" "', argument " "4"" of type '" "char const *""'");
+  }
+  arg4 = (char *)(buf4);
+  log_record(arg1,arg2,(char const *)arg3,(char const *)arg4);
+  resultobj = SWIG_Py_Void();
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_available(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  bool result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:log_available",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_available" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (bool)log_available(arg1);
+  resultobj = SWIG_From_bool((bool)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN int Swig_var_log_buffer_set(PyObject *_val) {
+  {
+    int res = SWIG_AsCharArray(_val, log_buffer, 16384);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""log_buffer""' of type '""char [16384]""'");
+    }
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_log_buffer_get(void) {
+  PyObject *pyobj = 0;
+  
+  size_t size = 16384;
+  
+  while (size && (log_buffer[size - 1] == '\0')) --size;
+  
+  pyobj = SWIG_FromCharPtrAndSize(log_buffer, size);
+  return pyobj;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  char *arg2 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:log_init",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "log_init" "', argument " "1"" of type '" "char const *""'");
+  }
+  arg1 = (char *)(buf1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "log_init" "', argument " "2"" of type '" "char const *""'");
+  }
+  arg2 = (char *)(buf2);
+  result = (int)log_init((char const *)arg1,(char const *)arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_chk_file_sec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  int arg2 ;
+  int arg3 ;
+  int arg4 ;
+  int arg5 ;
+  char *arg6 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int res6 ;
+  char *buf6 = 0 ;
+  int alloc6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:chk_file_sec",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chk_file_sec" "', argument " "1"" of type '" "char const *""'");
+  }
+  arg1 = (char *)(buf1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "chk_file_sec" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "chk_file_sec" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "chk_file_sec" "', argument " "4"" of type '" "int""'");
+  } 
+  arg4 = (int)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "chk_file_sec" "', argument " "5"" of type '" "int""'");
+  } 
+  arg5 = (int)(val5);
+  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
+  if (!SWIG_IsOK(res6)) {
+    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "chk_file_sec" "', argument " "6"" of type '" "char *""'");
+  }
+  arg6 = (char *)(buf6);
+  result = (int)chk_file_sec((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbse_to_txt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbse_to_txt",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbse_to_txt" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (char *)pbse_to_txt(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_strerror(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_strerror",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_strerror" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (char *)pbs_strerror(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN int Swig_var_pbs_errno_set(PyObject *_val) {
+  {
+    int val;
+    int res = SWIG_AsVal_int(_val, &val);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_errno""' of type '""int""'");
+    }
+    pbs_errno = (int)(val);
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_pbs_errno_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_From_int((int)(pbs_errno));
+  return pyobj;
+}
+
+
+static PyMethodDef SwigMethods[] = {
+	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
+	 { (char *)"new_attrl", _wrap_new_attrl, METH_VARARGS, NULL},
+	 { (char *)"new_attropl", _wrap_new_attropl, METH_VARARGS, NULL},
+	 { (char *)"new_batch_status", _wrap_new_batch_status, METH_VARARGS, NULL},
+	 { (char *)"get_error", _wrap_get_error, METH_VARARGS, NULL},
+	 { (char *)"new_attrlArray", _wrap_new_attrlArray, METH_VARARGS, NULL},
+	 { (char *)"delete_attrlArray", _wrap_delete_attrlArray, METH_VARARGS, NULL},
+	 { (char *)"attrlArray___getitem__", _wrap_attrlArray___getitem__, METH_VARARGS, NULL},
+	 { (char *)"attrlArray___setitem__", _wrap_attrlArray___setitem__, METH_VARARGS, NULL},
+	 { (char *)"attrlArray_cast", _wrap_attrlArray_cast, METH_VARARGS, NULL},
+	 { (char *)"attrlArray_frompointer", _wrap_attrlArray_frompointer, METH_VARARGS, NULL},
+	 { (char *)"attrlArray_swigregister", attrlArray_swigregister, METH_VARARGS, NULL},
+	 { (char *)"attrl_next_set", _wrap_attrl_next_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_next_get", _wrap_attrl_next_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_name_set", _wrap_attrl_name_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_name_get", _wrap_attrl_name_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_resource_set", _wrap_attrl_resource_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_resource_get", _wrap_attrl_resource_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_value_set", _wrap_attrl_value_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_value_get", _wrap_attrl_value_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_op_set", _wrap_attrl_op_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_op_get", _wrap_attrl_op_get, METH_VARARGS, NULL},
+	 { (char *)"attrl___str__", _wrap_attrl___str__, METH_VARARGS, NULL},
+	 { (char *)"delete_attrl", _wrap_delete_attrl, METH_VARARGS, NULL},
+	 { (char *)"attrl_swigregister", attrl_swigregister, METH_VARARGS, NULL},
+	 { (char *)"attropl_next_set", _wrap_attropl_next_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_next_get", _wrap_attropl_next_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_name_set", _wrap_attropl_name_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_name_get", _wrap_attropl_name_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_resource_set", _wrap_attropl_resource_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_resource_get", _wrap_attropl_resource_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_value_set", _wrap_attropl_value_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_value_get", _wrap_attropl_value_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_op_set", _wrap_attropl_op_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_op_get", _wrap_attropl_op_get, METH_VARARGS, NULL},
+	 { (char *)"attropl___str__", _wrap_attropl___str__, METH_VARARGS, NULL},
+	 { (char *)"delete_attropl", _wrap_delete_attropl, METH_VARARGS, NULL},
+	 { (char *)"attropl_swigregister", attropl_swigregister, METH_VARARGS, NULL},
+	 { (char *)"batch_status_next_set", _wrap_batch_status_next_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_next_get", _wrap_batch_status_next_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_name_set", _wrap_batch_status_name_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_name_get", _wrap_batch_status_name_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_attribs_set", _wrap_batch_status_attribs_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_attribs_get", _wrap_batch_status_attribs_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_text_set", _wrap_batch_status_text_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_text_get", _wrap_batch_status_text_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_swigregister", batch_status_swigregister, METH_VARARGS, NULL},
+	 { (char *)"avail", _wrap_avail, METH_VARARGS, NULL},
+	 { (char *)"pbs_asyrunjob", _wrap_pbs_asyrunjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_alterjob_async", _wrap_pbs_alterjob_async, METH_VARARGS, NULL},
+	 { (char *)"pbs_alterjob", _wrap_pbs_alterjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_connect", _wrap_pbs_connect, METH_VARARGS, NULL},
+	 { (char *)"pbs_query_max_connections", _wrap_pbs_query_max_connections, METH_VARARGS, NULL},
+	 { (char *)"pbs_default", _wrap_pbs_default, METH_VARARGS, NULL},
+	 { (char *)"pbs_fbserver", _wrap_pbs_fbserver, METH_VARARGS, NULL},
+	 { (char *)"pbs_get_server_list", _wrap_pbs_get_server_list, METH_VARARGS, NULL},
+	 { (char *)"pbs_deljob", _wrap_pbs_deljob, METH_VARARGS, NULL},
+	 { (char *)"pbs_disconnect", _wrap_pbs_disconnect, METH_VARARGS, NULL},
+	 { (char *)"pbs_geterrmsg", _wrap_pbs_geterrmsg, METH_VARARGS, NULL},
+	 { (char *)"pbs_holdjob", _wrap_pbs_holdjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_checkpointjob", _wrap_pbs_checkpointjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_locjob", _wrap_pbs_locjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_manager", _wrap_pbs_manager, METH_VARARGS, NULL},
+	 { (char *)"pbs_movejob", _wrap_pbs_movejob, METH_VARARGS, NULL},
+	 { (char *)"pbs_msgjob", _wrap_pbs_msgjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_orderjob", _wrap_pbs_orderjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_rescquery", _wrap_pbs_rescquery, METH_VARARGS, NULL},
+	 { (char *)"pbs_rescreserve", _wrap_pbs_rescreserve, METH_VARARGS, NULL},
+	 { (char *)"pbs_rescrelease", _wrap_pbs_rescrelease, METH_VARARGS, NULL},
+	 { (char *)"pbs_rerunjob", _wrap_pbs_rerunjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_rlsjob", _wrap_pbs_rlsjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_runjob", _wrap_pbs_runjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_selectjob", _wrap_pbs_selectjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_sigjob", _wrap_pbs_sigjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_sigjobasync", _wrap_pbs_sigjobasync, METH_VARARGS, NULL},
+	 { (char *)"pbs_statfree", _wrap_pbs_statfree, METH_VARARGS, NULL},
+	 { (char *)"pbs_statjob", _wrap_pbs_statjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_selstat", _wrap_pbs_selstat, METH_VARARGS, NULL},
+	 { (char *)"pbs_statque", _wrap_pbs_statque, METH_VARARGS, NULL},
+	 { (char *)"pbs_statserver", _wrap_pbs_statserver, METH_VARARGS, NULL},
+	 { (char *)"pbs_statnode", _wrap_pbs_statnode, METH_VARARGS, NULL},
+	 { (char *)"pbs_submit", _wrap_pbs_submit, METH_VARARGS, NULL},
+	 { (char *)"pbs_submit_hash_ext", _wrap_pbs_submit_hash_ext, METH_VARARGS, NULL},
+	 { (char *)"pbs_terminate", _wrap_pbs_terminate, METH_VARARGS, NULL},
+	 { (char *)"totpool", _wrap_totpool, METH_VARARGS, NULL},
+	 { (char *)"usepool", _wrap_usepool, METH_VARARGS, NULL},
+	 { (char *)"pbs_gpumode", _wrap_pbs_gpumode, METH_VARARGS, NULL},
+	 { (char *)"trq_set_preferred_network_interface", _wrap_trq_set_preferred_network_interface, METH_VARARGS, NULL},
+	 { (char *)"trq_get_if_name", _wrap_trq_get_if_name, METH_VARARGS, NULL},
+	 { (char *)"pbs_stagein", _wrap_pbs_stagein, METH_VARARGS, NULL},
+	 { (char *)"openrm", _wrap_openrm, METH_VARARGS, NULL},
+	 { (char *)"closerm_err", _wrap_closerm_err, METH_VARARGS, NULL},
+	 { (char *)"closerm", _wrap_closerm, METH_VARARGS, NULL},
+	 { (char *)"downrm", _wrap_downrm, METH_VARARGS, NULL},
+	 { (char *)"configrm", _wrap_configrm, METH_VARARGS, NULL},
+	 { (char *)"addreq_err", _wrap_addreq_err, METH_VARARGS, NULL},
+	 { (char *)"begin_rm_req", _wrap_begin_rm_req, METH_VARARGS, NULL},
+	 { (char *)"addreq", _wrap_addreq, METH_VARARGS, NULL},
+	 { (char *)"allreq", _wrap_allreq, METH_VARARGS, NULL},
+	 { (char *)"getreq_err", _wrap_getreq_err, METH_VARARGS, NULL},
+	 { (char *)"getreq", _wrap_getreq, METH_VARARGS, NULL},
+	 { (char *)"flushreq", _wrap_flushreq, METH_VARARGS, NULL},
+	 { (char *)"activereq", _wrap_activereq, METH_VARARGS, NULL},
+	 { (char *)"fullresp", _wrap_fullresp, METH_VARARGS, NULL},
+	 { (char *)"log_err", _wrap_log_err, METH_VARARGS, NULL},
+	 { (char *)"log_ext", _wrap_log_ext, METH_VARARGS, NULL},
+	 { (char *)"log_event", _wrap_log_event, METH_VARARGS, NULL},
+	 { (char *)"log_record", _wrap_log_record, METH_VARARGS, NULL},
+	 { (char *)"log_available", _wrap_log_available, METH_VARARGS, NULL},
+	 { (char *)"log_init", _wrap_log_init, METH_VARARGS, NULL},
+	 { (char *)"chk_file_sec", _wrap_chk_file_sec, METH_VARARGS, NULL},
+	 { (char *)"pbse_to_txt", _wrap_pbse_to_txt, METH_VARARGS, NULL},
+	 { (char *)"pbs_strerror", _wrap_pbs_strerror, METH_VARARGS, NULL},
+	 { NULL, NULL, 0, NULL }
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
+
+static void *_p_attrlArrayTo_p_attrl(void *x, int *SWIGUNUSEDPARM(newmemory)) {
+    return (void *)((struct attrl *)  ((attrlArray *) x));
+}
+static swig_type_info _swigt__p_attrl = {"_p_attrl", "struct attrl *|attrl *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_attrlArray = {"_p_attrlArray", "attrlArray *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_attropl = {"_p_attropl", "struct attropl *|attropl *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_batch_status = {"_p_batch_status", "struct batch_status *|batch_status *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_getter_setter = {"_p_getter_setter", "enum getter_setter *|SGetter *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_int = {"_p_int", "int *|resource_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_pthread_mutex_t = {"_p_pthread_mutex_t", "pthread_mutex_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_sockaddr = {"_p_sockaddr", "struct sockaddr *", 0, 0, (void*)0, 0};
+
+static swig_type_info *swig_type_initial[] = {
+  &_swigt__p_attrl,
+  &_swigt__p_attrlArray,
+  &_swigt__p_attropl,
+  &_swigt__p_batch_status,
+  &_swigt__p_char,
+  &_swigt__p_getter_setter,
+  &_swigt__p_int,
+  &_swigt__p_long,
+  &_swigt__p_p_char,
+  &_swigt__p_pthread_mutex_t,
+  &_swigt__p_sockaddr,
+};
+
+static swig_cast_info _swigc__p_attrl[] = {  {&_swigt__p_attrlArray, _p_attrlArrayTo_p_attrl, 0, 0},  {&_swigt__p_attrl, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_attrlArray[] = {  {&_swigt__p_attrlArray, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_attropl[] = {  {&_swigt__p_attropl, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_batch_status[] = {  {&_swigt__p_batch_status, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_getter_setter[] = {  {&_swigt__p_getter_setter, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_long[] = {  {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_pthread_mutex_t[] = {  {&_swigt__p_pthread_mutex_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_sockaddr[] = {  {&_swigt__p_sockaddr, 0, 0, 0},{0, 0, 0, 0}};
+
+static swig_cast_info *swig_cast_initial[] = {
+  _swigc__p_attrl,
+  _swigc__p_attrlArray,
+  _swigc__p_attropl,
+  _swigc__p_batch_status,
+  _swigc__p_char,
+  _swigc__p_getter_setter,
+  _swigc__p_int,
+  _swigc__p_long,
+  _swigc__p_p_char,
+  _swigc__p_pthread_mutex_t,
+  _swigc__p_sockaddr,
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
+
+static swig_const_info swig_const_table[] = {
+{0, 0, 0, 0.0, 0, 0}};
+
+#ifdef __cplusplus
+}
+#endif
+/* -----------------------------------------------------------------------------
+ * Type initialization:
+ * This problem is tough by the requirement that no dynamic 
+ * memory is used. Also, since swig_type_info structures store pointers to 
+ * swig_cast_info structures and swig_cast_info structures store pointers back
+ * to swig_type_info structures, we need some lookup code at initialization. 
+ * The idea is that swig generates all the structures that are needed. 
+ * The runtime then collects these partially filled structures. 
+ * The SWIG_InitializeModule function takes these initial arrays out of 
+ * swig_module, and does all the lookup, filling in the swig_module.types
+ * array with the correct data and linking the correct swig_cast_info
+ * structures together.
+ *
+ * The generated swig_type_info structures are assigned staticly to an initial 
+ * array. We just loop through that array, and handle each type individually.
+ * First we lookup if this type has been already loaded, and if so, use the
+ * loaded structure instead of the generated one. Then we have to fill in the
+ * cast linked list. The cast data is initially stored in something like a
+ * two-dimensional array. Each row corresponds to a type (there are the same
+ * number of rows as there are in the swig_type_initial array). Each entry in
+ * a column is one of the swig_cast_info structures for that type.
+ * The cast_initial array is actually an array of arrays, because each row has
+ * a variable number of columns. So to actually build the cast linked list,
+ * we find the array of casts associated with the type, and loop through it 
+ * adding the casts to the list. The one last trick we need to do is making
+ * sure the type pointer in the swig_cast_info struct is correct.
+ *
+ * First off, we lookup the cast->type name to see if it is already loaded. 
+ * There are three cases to handle:
+ *  1) If the cast->type has already been loaded AND the type we are adding
+ *     casting info to has not been loaded (it is in this module), THEN we
+ *     replace the cast->type pointer with the type pointer that has already
+ *     been loaded.
+ *  2) If BOTH types (the one we are adding casting info to, and the 
+ *     cast->type) are loaded, THEN the cast info has already been loaded by
+ *     the previous module so we just ignore it.
+ *  3) Finally, if cast->type has not already been loaded, then we add that
+ *     swig_cast_info to the linked list (because the cast->type) pointer will
+ *     be correct.
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* c-mode */
+#endif
+#endif
+
+#if 0
+#define SWIGRUNTIME_DEBUG
+#endif
+
+
+SWIGRUNTIME void
+SWIG_InitializeModule(void *clientdata) {
+  size_t i;
+  swig_module_info *module_head, *iter;
+  int found, init;
+  
+  clientdata = clientdata;
+  
+  /* check to see if the circular list has been setup, if not, set it up */
+  if (swig_module.next==0) {
+    /* Initialize the swig_module */
+    swig_module.type_initial = swig_type_initial;
+    swig_module.cast_initial = swig_cast_initial;
+    swig_module.next = &swig_module;
+    init = 1;
+  } else {
+    init = 0;
+  }
+  
+  /* Try and load any already created modules */
+  module_head = SWIG_GetModule(clientdata);
+  if (!module_head) {
+    /* This is the first module loaded for this interpreter */
+    /* so set the swig module into the interpreter */
+    SWIG_SetModule(clientdata, &swig_module);
+    module_head = &swig_module;
+  } else {
+    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
+    found=0;
+    iter=module_head;
+    do {
+      if (iter==&swig_module) {
+        found=1;
+        break;
+      }
+      iter=iter->next;
+    } while (iter!= module_head);
+    
+    /* if the is found in the list, then all is done and we may leave */
+    if (found) return;
+    /* otherwise we must add out module into the list */
+    swig_module.next = module_head->next;
+    module_head->next = &swig_module;
+  }
+  
+  /* When multiple interpeters are used, a module could have already been initialized in
+       a different interpreter, but not yet have a pointer in this interpreter.
+       In this case, we do not want to continue adding types... everything should be
+       set up already */
+  if (init == 0) return;
+  
+  /* Now work on filling in swig_module.types */
+#ifdef SWIGRUNTIME_DEBUG
+  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
+#endif
+  for (i = 0; i < swig_module.size; ++i) {
+    swig_type_info *type = 0;
+    swig_type_info *ret;
+    swig_cast_info *cast;
+    
+#ifdef SWIGRUNTIME_DEBUG
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+#endif
+    
+    /* if there is another module already loaded */
+    if (swig_module.next != &swig_module) {
+      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
+    }
+    if (type) {
+      /* Overwrite clientdata field */
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: found type %s\n", type->name);
+#endif
+      if (swig_module.type_initial[i]->clientdata) {
+        type->clientdata = swig_module.type_initial[i]->clientdata;
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
+#endif
+      }
+    } else {
+      type = swig_module.type_initial[i];
+    }
+    
+    /* Insert casting types */
+    cast = swig_module.cast_initial[i];
+    while (cast->type) {
+      /* Don't need to add information already in the list */
+      ret = 0;
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
+#endif
+      if (swig_module.next != &swig_module) {
+        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
+#ifdef SWIGRUNTIME_DEBUG
+        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
+#endif
+      }
+      if (ret) {
+        if (type == swig_module.type_initial[i]) {
+#ifdef SWIGRUNTIME_DEBUG
+          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
+#endif
+          cast->type = ret;
+          ret = 0;
+        } else {
+          /* Check for casting already in the list */
+          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
+#ifdef SWIGRUNTIME_DEBUG
+          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
+#endif
+          if (!ocast) ret = 0;
+        }
+      }
+      
+      if (!ret) {
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
+#endif
+        if (type->cast) {
+          type->cast->prev = cast;
+          cast->next = type->cast;
+        }
+        type->cast = cast;
+      }
+      cast++;
+    }
+    /* Set entry in modules->types array equal to the type */
+    swig_module.types[i] = type;
+  }
+  swig_module.types[i] = 0;
+  
+#ifdef SWIGRUNTIME_DEBUG
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+  for (i = 0; i < swig_module.size; ++i) {
+    int j = 0;
+    swig_cast_info *cast = swig_module.cast_initial[i];
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+    while (cast->type) {
+      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
+      cast++;
+      ++j;
+    }
+    printf("---- Total casts: %d\n",j);
+  }
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+#endif
+}
+
+/* This function will propagate the clientdata field of type to
+* any new swig_type_info structures that have been added into the list
+* of equivalent types.  It is like calling
+* SWIG_TypeClientData(type, clientdata) a second time.
+*/
+SWIGRUNTIME void
+SWIG_PropagateClientData(void) {
+  size_t i;
+  swig_cast_info *equiv;
+  static int init_run = 0;
+  
+  if (init_run) return;
+  init_run = 1;
+  
+  for (i = 0; i < swig_module.size; i++) {
+    if (swig_module.types[i]->clientdata) {
+      equiv = swig_module.types[i]->cast;
+      while (equiv) {
+        if (!equiv->converter) {
+          if (equiv->type && !equiv->type->clientdata)
+          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
+        }
+        equiv = equiv->next;
+      }
+    }
+  }
+}
+
+#ifdef __cplusplus
+#if 0
+{
+  /* c-mode */
+#endif
+}
+#endif
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+  
+  /* Python-specific SWIG API */
+#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
+#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
+#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
+  
+  /* -----------------------------------------------------------------------------
+   * global variable support code.
+   * ----------------------------------------------------------------------------- */
+  
+  typedef struct swig_globalvar {
+    char       *name;                  /* Name of global variable */
+    PyObject *(*get_attr)(void);       /* Return the current value */
+    int       (*set_attr)(PyObject *); /* Set the value */
+    struct swig_globalvar *next;
+  } swig_globalvar;
+  
+  typedef struct swig_varlinkobject {
+    PyObject_HEAD
+    swig_globalvar *vars;
+  } swig_varlinkobject;
+  
+  SWIGINTERN PyObject *
+  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
+#if PY_VERSION_HEX >= 0x03000000
+    return PyUnicode_InternFromString("<Swig global variables>");
+#else
+    return PyString_FromString("<Swig global variables>");
+#endif
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_str(swig_varlinkobject *v) {
+#if PY_VERSION_HEX >= 0x03000000
+    PyObject *str = PyUnicode_InternFromString("(");
+    PyObject *tail;
+    PyObject *joined;
+    swig_globalvar *var;
+    for (var = v->vars; var; var=var->next) {
+      tail = PyUnicode_FromString(var->name);
+      joined = PyUnicode_Concat(str, tail);
+      Py_DecRef(str);
+      Py_DecRef(tail);
+      str = joined;
+      if (var->next) {
+        tail = PyUnicode_InternFromString(", ");
+        joined = PyUnicode_Concat(str, tail);
+        Py_DecRef(str);
+        Py_DecRef(tail);
+        str = joined;
+      }
+    }
+    tail = PyUnicode_InternFromString(")");
+    joined = PyUnicode_Concat(str, tail);
+    Py_DecRef(str);
+    Py_DecRef(tail);
+    str = joined;
+#else
+    PyObject *str = PyString_FromString("(");
+    swig_globalvar *var;
+    for (var = v->vars; var; var=var->next) {
+      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
+      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
+    }
+    PyString_ConcatAndDel(&str,PyString_FromString(")"));
+#endif
+    return str;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
+    char *tmp;
+    PyObject *str = swig_varlink_str(v);
+    fprintf(fp,"Swig global variables ");
+    fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
+    SWIG_Python_str_DelForPy3(tmp);
+    Py_DECREF(str);
+    return 0;
+  }
+  
+  SWIGINTERN void
+  swig_varlink_dealloc(swig_varlinkobject *v) {
+    swig_globalvar *var = v->vars;
+    while (var) {
+      swig_globalvar *n = var->next;
+      free(var->name);
+      free(var);
+      var = n;
+    }
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
+    PyObject *res = NULL;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->get_attr)();
+        break;
+      }
+      var = var->next;
+    }
+    if (res == NULL && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
+    int res = 1;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->set_attr)(p);
+        break;
+      }
+      var = var->next;
+    }
+    if (res == 1 && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN PyTypeObject*
+  swig_varlink_type(void) {
+    static char varlink__doc__[] = "Swig var link object";
+    static PyTypeObject varlink_type;
+    static int type_init = 0;
+    if (!type_init) {
+      const PyTypeObject tmp = {
+        /* PyObject header changed in Python 3 */
+#if PY_VERSION_HEX >= 0x03000000
+        PyVarObject_HEAD_INIT(NULL, 0)
+#else
+        PyObject_HEAD_INIT(NULL)
+        0,                                  /* ob_size */
+#endif
+        (char *)"swigvarlink",              /* tp_name */
+        sizeof(swig_varlinkobject),         /* tp_basicsize */
+        0,                                  /* tp_itemsize */
+        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
+        (printfunc) swig_varlink_print,     /* tp_print */
+        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
+        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
+        0,                                  /* tp_compare */
+        (reprfunc) swig_varlink_repr,       /* tp_repr */
+        0,                                  /* tp_as_number */
+        0,                                  /* tp_as_sequence */
+        0,                                  /* tp_as_mapping */
+        0,                                  /* tp_hash */
+        0,                                  /* tp_call */
+        (reprfunc) swig_varlink_str,        /* tp_str */
+        0,                                  /* tp_getattro */
+        0,                                  /* tp_setattro */
+        0,                                  /* tp_as_buffer */
+        0,                                  /* tp_flags */
+        varlink__doc__,                     /* tp_doc */
+        0,                                  /* tp_traverse */
+        0,                                  /* tp_clear */
+        0,                                  /* tp_richcompare */
+        0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+        0,                                  /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+        0,                                  /* tp_version */
+#endif
+#ifdef COUNT_ALLOCS
+        0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+      varlink_type = tmp;
+      type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
+      varlink_type.ob_type = &PyType_Type;
+#else
+      if (PyType_Ready(&varlink_type) < 0)
+      return NULL;
+#endif
+    }
+    return &varlink_type;
+  }
+  
+  /* Create a variable linking object for use later */
+  SWIGINTERN PyObject *
+  SWIG_Python_newvarlink(void) {
+    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
+    if (result) {
+      result->vars = 0;
+    }
+    return ((PyObject*) result);
+  }
+  
+  SWIGINTERN void 
+  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
+    swig_varlinkobject *v = (swig_varlinkobject *) p;
+    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
+    if (gv) {
+      size_t size = strlen(name)+1;
+      gv->name = (char *)malloc(size);
+      if (gv->name) {
+        strncpy(gv->name,name,size);
+        gv->get_attr = get_attr;
+        gv->set_attr = set_attr;
+        gv->next = v->vars;
+      }
+    }
+    v->vars = gv;
+  }
+  
+  SWIGINTERN PyObject *
+  SWIG_globals(void) {
+    static PyObject *_SWIG_globals = 0; 
+    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
+    return _SWIG_globals;
+  }
+  
+  /* -----------------------------------------------------------------------------
+   * constants/methods manipulation
+   * ----------------------------------------------------------------------------- */
+  
+  /* Install Constants */
+  SWIGINTERN void
+  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
+    PyObject *obj = 0;
+    size_t i;
+    for (i = 0; constants[i].type; ++i) {
+      switch(constants[i].type) {
+      case SWIG_PY_POINTER:
+        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+        break;
+      case SWIG_PY_BINARY:
+        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
+        break;
+      default:
+        obj = 0;
+        break;
+      }
+      if (obj) {
+        PyDict_SetItemString(d, constants[i].name, obj);
+        Py_DECREF(obj);
+      }
+    }
+  }
+  
+  /* -----------------------------------------------------------------------------*/
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  /* -----------------------------------------------------------------------------*/
+  
+  SWIGINTERN void
+  SWIG_Python_FixMethods(PyMethodDef *methods,
+    swig_const_info *const_table,
+    swig_type_info **types,
+    swig_type_info **types_initial) {
+    size_t i;
+    for (i = 0; methods[i].ml_name; ++i) {
+      const char *c = methods[i].ml_doc;
+      if (c && (c = strstr(c, "swig_ptr: "))) {
+        int j;
+        swig_const_info *ci = 0;
+        const char *name = c + 10;
+        for (j = 0; const_table[j].type; ++j) {
+          if (strncmp(const_table[j].name, name, 
+              strlen(const_table[j].name)) == 0) {
+            ci = &(const_table[j]);
+            break;
+          }
+        }
+        if (ci) {
+          void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
+          if (ptr) {
+            size_t shift = (ci->ptype) - types;
+            swig_type_info *ty = types_initial[shift];
+            size_t ldoc = (c - methods[i].ml_doc);
+            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
+            char *ndoc = (char*)malloc(ldoc + lptr + 10);
+            if (ndoc) {
+              char *buff = ndoc;
+              strncpy(buff, methods[i].ml_doc, ldoc);
+              buff += ldoc;
+              strncpy(buff, "swig_ptr: ", 10);
+              buff += 10;
+              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
+              methods[i].ml_doc = ndoc;
+            }
+          }
+        }
+      }
+    }
+  } 
+  
+#ifdef __cplusplus
+}
+#endif
+
+/* -----------------------------------------------------------------------------*
+ *  Partial Init method
+ * -----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+extern "C"
+#endif
+
+SWIGEXPORT 
+#if PY_VERSION_HEX >= 0x03000000
+PyObject*
+#else
+void
+#endif
+SWIG_init(void) {
+  PyObject *m, *d, *md;
+#if PY_VERSION_HEX >= 0x03000000
+  static struct PyModuleDef SWIG_module = {
+# if PY_VERSION_HEX >= 0x03020000
+    PyModuleDef_HEAD_INIT,
+# else
+    {
+      PyObject_HEAD_INIT(NULL)
+      NULL, /* m_init */
+      0,    /* m_index */
+      NULL, /* m_copy */
+    },
+# endif
+    (char *) SWIG_name,
+    NULL,
+    -1,
+    SwigMethods,
+    NULL,
+    NULL,
+    NULL,
+    NULL
+  };
+#endif
+  
+#if defined(SWIGPYTHON_BUILTIN)
+  static SwigPyClientData SwigPyObject_clientdata = {
+    0, 0, 0, 0, 0, 0, 0
+  };
+  static PyGetSetDef this_getset_def = {
+    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
+  };
+  static SwigPyGetSet thisown_getset_closure = {
+    (PyCFunction) SwigPyObject_own,
+    (PyCFunction) SwigPyObject_own
+  };
+  static PyGetSetDef thisown_getset_def = {
+    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
+  };
+  PyObject *metatype_args;
+  PyTypeObject *builtin_pytype;
+  int builtin_base_count;
+  swig_type_info *builtin_basetype;
+  PyObject *tuple;
+  PyGetSetDescrObject *static_getset;
+  PyTypeObject *metatype;
+  SwigPyClientData *cd;
+  PyObject *public_interface, *public_symbol;
+  PyObject *this_descr;
+  PyObject *thisown_descr;
+  int i;
+  
+  (void)builtin_pytype;
+  (void)builtin_base_count;
+  (void)builtin_basetype;
+  (void)tuple;
+  (void)static_getset;
+  
+  /* metatype is used to implement static member variables. */
+  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
+  assert(metatype_args);
+  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
+  assert(metatype);
+  Py_DECREF(metatype_args);
+  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
+  assert(PyType_Ready(metatype) >= 0);
+#endif
+  
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
+  
+#if PY_VERSION_HEX >= 0x03000000
+  m = PyModule_Create(&SWIG_module);
+#else
+  m = Py_InitModule((char *) SWIG_name, SwigMethods);
+#endif
+  md = d = PyModule_GetDict(m);
+  
+  SWIG_InitializeModule(0);
+  
+#ifdef SWIGPYTHON_BUILTIN
+  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
+  assert(SwigPyObject_stype);
+  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+  if (!cd) {
+    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
+    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
+  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
+    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
+# if PY_VERSION_HEX >= 0x03000000
+    return NULL;
+# else
+    return;
+# endif
+  }
+  
+  /* All objects have a 'this' attribute */
+  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
+  (void)this_descr;
+  
+  /* All objects have a 'thisown' attribute */
+  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
+  (void)thisown_descr;
+  
+  public_interface = PyList_New(0);
+  public_symbol = 0;
+  (void)public_symbol;
+  
+  PyDict_SetItemString(md, "__all__", public_interface);
+  Py_DECREF(public_interface);
+  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
+  for (i = 0; swig_const_table[i].name != 0; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
+#endif
+  
+  SWIG_InstallConstants(d,swig_const_table);
+  
+  SWIG_Python_SetConstant(d, "ATTR_a",SWIG_FromCharPtr("Execution_Time"));
+  SWIG_Python_SetConstant(d, "ATTR_c",SWIG_FromCharPtr("Checkpoint"));
+  SWIG_Python_SetConstant(d, "ATTR_e",SWIG_FromCharPtr("Error_Path"));
+  SWIG_Python_SetConstant(d, "ATTR_f",SWIG_FromCharPtr("fault_tolerant"));
+  SWIG_Python_SetConstant(d, "ATTR_g",SWIG_FromCharPtr("group_list"));
+  SWIG_Python_SetConstant(d, "ATTR_h",SWIG_FromCharPtr("Hold_Types"));
+  SWIG_Python_SetConstant(d, "ATTR_j",SWIG_FromCharPtr("Join_Path"));
+  SWIG_Python_SetConstant(d, "ATTR_k",SWIG_FromCharPtr("Keep_Files"));
+  SWIG_Python_SetConstant(d, "ATTR_l",SWIG_FromCharPtr("Resource_List"));
+  SWIG_Python_SetConstant(d, "ATTR_m",SWIG_FromCharPtr("Mail_Points"));
+  SWIG_Python_SetConstant(d, "ATTR_o",SWIG_FromCharPtr("Output_Path"));
+  SWIG_Python_SetConstant(d, "ATTR_p",SWIG_FromCharPtr("Priority"));
+  SWIG_Python_SetConstant(d, "ATTR_q",SWIG_FromCharPtr("destination"));
+  SWIG_Python_SetConstant(d, "ATTR_r",SWIG_FromCharPtr("Rerunable"));
+  SWIG_Python_SetConstant(d, "ATTR_t",SWIG_FromCharPtr("job_array_request"));
+  SWIG_Python_SetConstant(d, "ATTR_array_id",SWIG_FromCharPtr("job_array_id"));
+  SWIG_Python_SetConstant(d, "ATTR_u",SWIG_FromCharPtr("User_List"));
+  SWIG_Python_SetConstant(d, "ATTR_v",SWIG_FromCharPtr("Variable_List"));
+  SWIG_Python_SetConstant(d, "ATTR_A",SWIG_FromCharPtr("Account_Name"));
+  SWIG_Python_SetConstant(d, "ATTR_args",SWIG_FromCharPtr("job_arguments"));
+  SWIG_Python_SetConstant(d, "ATTR_reservation_id",SWIG_FromCharPtr("reservation_id"));
+  SWIG_Python_SetConstant(d, "ATTR_login_node_id",SWIG_FromCharPtr("login_node_id"));
+  SWIG_Python_SetConstant(d, "ATTR_login_prop",SWIG_FromCharPtr("login_property"));
+  SWIG_Python_SetConstant(d, "ATTR_external_nodes",SWIG_FromCharPtr("external_nodes"));
+  SWIG_Python_SetConstant(d, "ATTR_multi_req_alps",SWIG_FromCharPtr("multi_req_alps"));
+  SWIG_Python_SetConstant(d, "ATTR_M",SWIG_FromCharPtr("Mail_Users"));
+  SWIG_Python_SetConstant(d, "ATTR_N",SWIG_FromCharPtr("Job_Name"));
+  SWIG_Python_SetConstant(d, "ATTR_S",SWIG_FromCharPtr("Shell_Path_List"));
+  SWIG_Python_SetConstant(d, "ATTR_depend",SWIG_FromCharPtr("depend"));
+  SWIG_Python_SetConstant(d, "ATTR_inter",SWIG_FromCharPtr("interactive"));
+  SWIG_Python_SetConstant(d, "ATTR_stagein",SWIG_FromCharPtr("stagein"));
+  SWIG_Python_SetConstant(d, "ATTR_stageout",SWIG_FromCharPtr("stageout"));
+  SWIG_Python_SetConstant(d, "ATTR_jobtype",SWIG_FromCharPtr("jobtype"));
+  SWIG_Python_SetConstant(d, "ATTR_submit_host",SWIG_FromCharPtr("submit_host"));
+  SWIG_Python_SetConstant(d, "ATTR_init_work_dir",SWIG_FromCharPtr("init_work_dir"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_initdir",SWIG_FromCharPtr("PBS_O_INITDIR"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_rootdir",SWIG_FromCharPtr("PBS_O_ROOTDIR"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_workdir",SWIG_FromCharPtr("PBS_O_WORKDIR"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_host",SWIG_FromCharPtr("PBS_O_HOST"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_server",SWIG_FromCharPtr("PBS_O_SERVER"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_home",SWIG_FromCharPtr("PBS_O_HOME"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_logname",SWIG_FromCharPtr("PBS_O_LOGNAME"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_path",SWIG_FromCharPtr("PBS_O_PATH"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_mail",SWIG_FromCharPtr("PBS_O_MAIL"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_shell",SWIG_FromCharPtr("PBS_O_SHELL"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_tz",SWIG_FromCharPtr("PBS_O_TZ"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_lang",SWIG_FromCharPtr("PBS_O_LANG"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_uid",SWIG_FromCharPtr("PBS_O_UID"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_submit_filter",SWIG_FromCharPtr("PBS_O_SUBMIT_FILTER"));
+  SWIG_Python_SetConstant(d, "ATTR_ctime",SWIG_FromCharPtr("ctime"));
+  SWIG_Python_SetConstant(d, "ATTR_exechost",SWIG_FromCharPtr("exec_host"));
+  SWIG_Python_SetConstant(d, "ATTR_execport",SWIG_FromCharPtr("exec_port"));
+  SWIG_Python_SetConstant(d, "ATTR_mtime",SWIG_FromCharPtr("mtime"));
+  SWIG_Python_SetConstant(d, "ATTR_qtime",SWIG_FromCharPtr("qtime"));
+  SWIG_Python_SetConstant(d, "ATTR_session",SWIG_FromCharPtr("session_id"));
+  SWIG_Python_SetConstant(d, "ATTR_euser",SWIG_FromCharPtr("euser"));
+  SWIG_Python_SetConstant(d, "ATTR_egroup",SWIG_FromCharPtr("egroup"));
+  SWIG_Python_SetConstant(d, "ATTR_hashname",SWIG_FromCharPtr("hashname"));
+  SWIG_Python_SetConstant(d, "ATTR_hopcount",SWIG_FromCharPtr("hop_count"));
+  SWIG_Python_SetConstant(d, "ATTR_security",SWIG_FromCharPtr("security"));
+  SWIG_Python_SetConstant(d, "ATTR_sched_hint",SWIG_FromCharPtr("sched_hint"));
+  SWIG_Python_SetConstant(d, "ATTR_substate",SWIG_FromCharPtr("substate"));
+  SWIG_Python_SetConstant(d, "ATTR_name",SWIG_FromCharPtr("Job_Name"));
+  SWIG_Python_SetConstant(d, "ATTR_owner",SWIG_FromCharPtr("Job_Owner"));
+  SWIG_Python_SetConstant(d, "ATTR_used",SWIG_FromCharPtr("resources_used"));
+  SWIG_Python_SetConstant(d, "ATTR_state",SWIG_FromCharPtr("job_state"));
+  SWIG_Python_SetConstant(d, "ATTR_queue",SWIG_FromCharPtr("queue"));
+  SWIG_Python_SetConstant(d, "ATTR_server",SWIG_FromCharPtr("server"));
+  SWIG_Python_SetConstant(d, "ATTR_maxrun",SWIG_FromCharPtr("max_running"));
+  SWIG_Python_SetConstant(d, "ATTR_maxreport",SWIG_FromCharPtr("max_report"));
+  SWIG_Python_SetConstant(d, "ATTR_total",SWIG_FromCharPtr("total_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_comment",SWIG_FromCharPtr("comment"));
+  SWIG_Python_SetConstant(d, "ATTR_cookie",SWIG_FromCharPtr("cookie"));
+  SWIG_Python_SetConstant(d, "ATTR_qrank",SWIG_FromCharPtr("queue_rank"));
+  SWIG_Python_SetConstant(d, "ATTR_altid",SWIG_FromCharPtr("alt_id"));
+  SWIG_Python_SetConstant(d, "ATTR_etime",SWIG_FromCharPtr("etime"));
+  SWIG_Python_SetConstant(d, "ATTR_exitstat",SWIG_FromCharPtr("exit_status"));
+  SWIG_Python_SetConstant(d, "ATTR_forwardx11",SWIG_FromCharPtr("forward_x11"));
+  SWIG_Python_SetConstant(d, "ATTR_submit_args",SWIG_FromCharPtr("submit_args"));
+  SWIG_Python_SetConstant(d, "ATTR_tokens",SWIG_FromCharPtr("tokens"));
+  SWIG_Python_SetConstant(d, "ATTR_netcounter",SWIG_FromCharPtr("net_counter"));
+  SWIG_Python_SetConstant(d, "ATTR_umask",SWIG_FromCharPtr("umask"));
+  SWIG_Python_SetConstant(d, "ATTR_start_time",SWIG_FromCharPtr("start_time"));
+  SWIG_Python_SetConstant(d, "ATTR_start_count",SWIG_FromCharPtr("start_count"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_dir",SWIG_FromCharPtr("checkpoint_dir"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_name",SWIG_FromCharPtr("checkpoint_name"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_time",SWIG_FromCharPtr("checkpoint_time"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_restart_status",SWIG_FromCharPtr("checkpoint_restart_status"));
+  SWIG_Python_SetConstant(d, "ATTR_restart_name",SWIG_FromCharPtr("restart_name"));
+  SWIG_Python_SetConstant(d, "ATTR_comp_time",SWIG_FromCharPtr("comp_time"));
+  SWIG_Python_SetConstant(d, "ATTR_reported",SWIG_FromCharPtr("reported"));
+  SWIG_Python_SetConstant(d, "ATTR_intcmd",SWIG_FromCharPtr("inter_cmd"));
+  SWIG_Python_SetConstant(d, "ATTR_job_radix",SWIG_FromCharPtr("job_radix"));
+  SWIG_Python_SetConstant(d, "ATTR_sister_list",SWIG_FromCharPtr("sister_list"));
+  SWIG_Python_SetConstant(d, "ATTR_total_runtime",SWIG_FromCharPtr("total_runtime"));
+  SWIG_Python_SetConstant(d, "ATTR_P",SWIG_FromCharPtr("proxy_user"));
+  SWIG_Python_SetConstant(d, "ATTR_node_exclusive",SWIG_FromCharPtr("node_exclusive"));
+  SWIG_Python_SetConstant(d, "ATTR_exec_gpus",SWIG_FromCharPtr("exec_gpus"));
+  SWIG_Python_SetConstant(d, "ATTR_exec_mics",SWIG_FromCharPtr("exec_mics"));
+  SWIG_Python_SetConstant(d, "ATTR_J",SWIG_FromCharPtr("job_id"));
+  SWIG_Python_SetConstant(d, "ATTR_pagg",SWIG_FromCharPtr("pagg_id"));
+  SWIG_Python_SetConstant(d, "ATTR_system_start_time",SWIG_FromCharPtr("system_start_time"));
+  SWIG_Python_SetConstant(d, "ATTR_gpu_flags",SWIG_FromCharPtr("gpu_flags"));
+  SWIG_Python_SetConstant(d, "ATTR_aclgren",SWIG_FromCharPtr("acl_group_enable"));
+  SWIG_Python_SetConstant(d, "ATTR_aclgroup",SWIG_FromCharPtr("acl_groups"));
+  SWIG_Python_SetConstant(d, "ATTR_aclhten",SWIG_FromCharPtr("acl_host_enable"));
+  SWIG_Python_SetConstant(d, "ATTR_aclhost",SWIG_FromCharPtr("acl_hosts"));
+  SWIG_Python_SetConstant(d, "ATTR_acluren",SWIG_FromCharPtr("acl_user_enable"));
+  SWIG_Python_SetConstant(d, "ATTR_acluser",SWIG_FromCharPtr("acl_users"));
+  SWIG_Python_SetConstant(d, "ATTR_altrouter",SWIG_FromCharPtr("alt_router"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_min",SWIG_FromCharPtr("checkpoint_min"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_defaults",SWIG_FromCharPtr("checkpoint_defaults"));
+  SWIG_Python_SetConstant(d, "ATTR_enable",SWIG_FromCharPtr("enabled"));
+  SWIG_Python_SetConstant(d, "ATTR_fromroute",SWIG_FromCharPtr("from_route_only"));
+  SWIG_Python_SetConstant(d, "ATTR_hostlist",SWIG_FromCharPtr("hostlist"));
+  SWIG_Python_SetConstant(d, "ATTR_killdelay",SWIG_FromCharPtr("kill_delay"));
+  SWIG_Python_SetConstant(d, "ATTR_maxgrprun",SWIG_FromCharPtr("max_group_run"));
+  SWIG_Python_SetConstant(d, "ATTR_maxque",SWIG_FromCharPtr("max_queuable"));
+  SWIG_Python_SetConstant(d, "ATTR_maxuserque",SWIG_FromCharPtr("max_user_queuable"));
+  SWIG_Python_SetConstant(d, "ATTR_maxuserrun",SWIG_FromCharPtr("max_user_run"));
+  SWIG_Python_SetConstant(d, "ATTR_qtype",SWIG_FromCharPtr("queue_type"));
+  SWIG_Python_SetConstant(d, "ATTR_rescassn",SWIG_FromCharPtr("resources_assigned"));
+  SWIG_Python_SetConstant(d, "ATTR_rescdflt",SWIG_FromCharPtr("resources_default"));
+  SWIG_Python_SetConstant(d, "ATTR_rescmax",SWIG_FromCharPtr("resources_max"));
+  SWIG_Python_SetConstant(d, "ATTR_rescmin",SWIG_FromCharPtr("resources_min"));
+  SWIG_Python_SetConstant(d, "ATTR_featreqd",SWIG_FromCharPtr("features_required"));
+  SWIG_Python_SetConstant(d, "ATTR_req_login_property",SWIG_FromCharPtr("required_login_property"));
+  SWIG_Python_SetConstant(d, "ATTR_rerunnable",SWIG_FromCharPtr("restartable"));
+  SWIG_Python_SetConstant(d, "ATTR_rndzretry",SWIG_FromCharPtr("rendezvous_retry"));
+  SWIG_Python_SetConstant(d, "ATTR_routedest",SWIG_FromCharPtr("route_destinations"));
+  SWIG_Python_SetConstant(d, "ATTR_routeheld",SWIG_FromCharPtr("route_held_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_routewait",SWIG_FromCharPtr("route_waiting_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_routeretry",SWIG_FromCharPtr("route_retry_time"));
+  SWIG_Python_SetConstant(d, "ATTR_routelife",SWIG_FromCharPtr("route_lifetime"));
+  SWIG_Python_SetConstant(d, "ATTR_rsvexpdt",SWIG_FromCharPtr("reserved_expedite"));
+  SWIG_Python_SetConstant(d, "ATTR_rsvsync",SWIG_FromCharPtr("reserved_sync"));
+  SWIG_Python_SetConstant(d, "ATTR_start",SWIG_FromCharPtr("started"));
+  SWIG_Python_SetConstant(d, "ATTR_count",SWIG_FromCharPtr("state_count"));
+  SWIG_Python_SetConstant(d, "ATTR_number",SWIG_FromCharPtr("number_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_acllogic",SWIG_FromCharPtr("acl_logic_or"));
+  SWIG_Python_SetConstant(d, "ATTR_aclgrpslpy",SWIG_FromCharPtr("acl_group_sloppy"));
+  SWIG_Python_SetConstant(d, "ATTR_keepcompleted",SWIG_FromCharPtr("keep_completed"));
+  SWIG_Python_SetConstant(d, "ATTR_disallowedtypes",SWIG_FromCharPtr("disallowed_types"));
+  SWIG_Python_SetConstant(d, "ATTR_is_transit",SWIG_FromCharPtr("is_transit"));
+  SWIG_Python_SetConstant(d, "ATTR_aclroot",SWIG_FromCharPtr("acl_roots"));
+  SWIG_Python_SetConstant(d, "ATTR_managers",SWIG_FromCharPtr("managers"));
+  SWIG_Python_SetConstant(d, "ATTR_dfltque",SWIG_FromCharPtr("default_queue"));
+  SWIG_Python_SetConstant(d, "ATTR_dispsvrsuffix",SWIG_FromCharPtr("display_job_server_suffix"));
+  SWIG_Python_SetConstant(d, "ATTR_jobsuffixalias",SWIG_FromCharPtr("job_suffix_alias"));
+  SWIG_Python_SetConstant(d, "ATTR_defnode",SWIG_FromCharPtr("default_node"));
+  SWIG_Python_SetConstant(d, "ATTR_locsvrs",SWIG_FromCharPtr("location_servers"));
+  SWIG_Python_SetConstant(d, "ATTR_logevents",SWIG_FromCharPtr("log_events"));
+  SWIG_Python_SetConstant(d, "ATTR_logfile",SWIG_FromCharPtr("log_file"));
+  SWIG_Python_SetConstant(d, "ATTR_loglevel",SWIG_FromCharPtr("log_level"));
+  SWIG_Python_SetConstant(d, "ATTR_mailfrom",SWIG_FromCharPtr("mail_from"));
+  SWIG_Python_SetConstant(d, "ATTR_nodepack",SWIG_FromCharPtr("node_pack"));
+  SWIG_Python_SetConstant(d, "ATTR_nodesuffix",SWIG_FromCharPtr("node_suffix"));
+  SWIG_Python_SetConstant(d, "ATTR_operators",SWIG_FromCharPtr("operators"));
+  SWIG_Python_SetConstant(d, "ATTR_queryother",SWIG_FromCharPtr("query_other_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_resccost",SWIG_FromCharPtr("resources_cost"));
+  SWIG_Python_SetConstant(d, "ATTR_rescavail",SWIG_FromCharPtr("resources_available"));
+  SWIG_Python_SetConstant(d, "ATTR_schedit",SWIG_FromCharPtr("scheduler_iteration"));
+  SWIG_Python_SetConstant(d, "ATTR_scheduling",SWIG_FromCharPtr("scheduling"));
+  SWIG_Python_SetConstant(d, "ATTR_status",SWIG_FromCharPtr("server_state"));
+  SWIG_Python_SetConstant(d, "ATTR_syscost",SWIG_FromCharPtr("system_cost"));
+  SWIG_Python_SetConstant(d, "ATTR_pingrate",SWIG_FromCharPtr("node_ping_rate"));
+  SWIG_Python_SetConstant(d, "ATTR_ndchkrate",SWIG_FromCharPtr("node_check_rate"));
+  SWIG_Python_SetConstant(d, "ATTR_tcptimeout",SWIG_FromCharPtr("tcp_timeout"));
+  SWIG_Python_SetConstant(d, "ATTR_jobstatrate",SWIG_FromCharPtr("job_stat_rate"));
+  SWIG_Python_SetConstant(d, "ATTR_polljobs",SWIG_FromCharPtr("poll_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_downonerror",SWIG_FromCharPtr("down_on_error"));
+  SWIG_Python_SetConstant(d, "ATTR_disableserveridcheck",SWIG_FromCharPtr("disable_server_id_check"));
+  SWIG_Python_SetConstant(d, "ATTR_jobnanny",SWIG_FromCharPtr("job_nanny"));
+  SWIG_Python_SetConstant(d, "ATTR_ownerpurge",SWIG_FromCharPtr("owner_purge"));
+  SWIG_Python_SetConstant(d, "ATTR_qcqlimits",SWIG_FromCharPtr("queue_centric_limits"));
+  SWIG_Python_SetConstant(d, "ATTR_momjobsync",SWIG_FromCharPtr("mom_job_sync"));
+  SWIG_Python_SetConstant(d, "ATTR_maildomain",SWIG_FromCharPtr("mail_domain"));
+  SWIG_Python_SetConstant(d, "ATTR_pbsversion",SWIG_FromCharPtr("pbs_version"));
+  SWIG_Python_SetConstant(d, "ATTR_submithosts",SWIG_FromCharPtr("submit_hosts"));
+  SWIG_Python_SetConstant(d, "ATTR_allownodesubmit",SWIG_FromCharPtr("allow_node_submit"));
+  SWIG_Python_SetConstant(d, "ATTR_allowproxyuser",SWIG_FromCharPtr("allow_proxy_user"));
+  SWIG_Python_SetConstant(d, "ATTR_autonodenp",SWIG_FromCharPtr("auto_node_np"));
+  SWIG_Python_SetConstant(d, "ATTR_servername",SWIG_FromCharPtr("server_name"));
+  SWIG_Python_SetConstant(d, "ATTR_logfilemaxsize",SWIG_FromCharPtr("log_file_max_size"));
+  SWIG_Python_SetConstant(d, "ATTR_logfilerolldepth",SWIG_FromCharPtr("log_file_roll_depth"));
+  SWIG_Python_SetConstant(d, "ATTR_logkeepdays",SWIG_FromCharPtr("log_keep_days"));
+  SWIG_Python_SetConstant(d, "ATTR_nextjobnum",SWIG_FromCharPtr("next_job_number"));
+  SWIG_Python_SetConstant(d, "ATTR_extraresc",SWIG_FromCharPtr("extra_resc"));
+  SWIG_Python_SetConstant(d, "ATTR_schedversion",SWIG_FromCharPtr("sched_version"));
+  SWIG_Python_SetConstant(d, "ATTR_acctkeepdays",SWIG_FromCharPtr("accounting_keep_days"));
+  SWIG_Python_SetConstant(d, "ATTR_lockfile",SWIG_FromCharPtr("lock_file"));
+  SWIG_Python_SetConstant(d, "ATTR_credentiallifetime",SWIG_FromCharPtr("credential_lifetime"));
+  SWIG_Python_SetConstant(d, "ATTR_jobmustreport",SWIG_FromCharPtr("job_must_report"));
+  SWIG_Python_SetConstant(d, "ATTR_LockfileUpdateTime",SWIG_FromCharPtr("lock_file_update_time"));
+  SWIG_Python_SetConstant(d, "ATTR_LockfileCheckTime",SWIG_FromCharPtr("lock_file_check_time"));
+  SWIG_Python_SetConstant(d, "ATTR_npdefault",SWIG_FromCharPtr("np_default"));
+  SWIG_Python_SetConstant(d, "ATTR_clonebatchsize",SWIG_FromCharPtr("clone_batch_size"));
+  SWIG_Python_SetConstant(d, "ATTR_clonebatchdelay",SWIG_FromCharPtr("clone_batch_delay"));
+  SWIG_Python_SetConstant(d, "ATTR_jobstarttimeout",SWIG_FromCharPtr("job_start_timeout"));
+  SWIG_Python_SetConstant(d, "ATTR_jobforcecanceltime",SWIG_FromCharPtr("job_force_cancel_time"));
+  SWIG_Python_SetConstant(d, "ATTR_maxarraysize",SWIG_FromCharPtr("max_job_array_size"));
+  SWIG_Python_SetConstant(d, "ATTR_maxslotlimit",SWIG_FromCharPtr("max_slot_limit"));
+  SWIG_Python_SetConstant(d, "ATTR_recordjobinfo",SWIG_FromCharPtr("record_job_info"));
+  SWIG_Python_SetConstant(d, "ATTR_recordjobscript",SWIG_FromCharPtr("record_job_script"));
+  SWIG_Python_SetConstant(d, "ATTR_joblogfilemaxsize",SWIG_FromCharPtr("job_log_file_max_size"));
+  SWIG_Python_SetConstant(d, "ATTR_joblogfilerolldepth",SWIG_FromCharPtr("job_log_file_roll_depth"));
+  SWIG_Python_SetConstant(d, "ATTR_joblogkeepdays",SWIG_FromCharPtr("job_log_keep_days"));
+  SWIG_Python_SetConstant(d, "ATTR_minthreads",SWIG_FromCharPtr("min_threads"));
+  SWIG_Python_SetConstant(d, "ATTR_maxthreads",SWIG_FromCharPtr("max_threads"));
+  SWIG_Python_SetConstant(d, "ATTR_threadidleseconds",SWIG_FromCharPtr("thread_idle_seconds"));
+  SWIG_Python_SetConstant(d, "ATTR_moabarraycompatible",SWIG_FromCharPtr("moab_array_compatible"));
+  SWIG_Python_SetConstant(d, "ATTR_nomailforce",SWIG_FromCharPtr("no_mail_force"));
+  SWIG_Python_SetConstant(d, "ATTR_interactivejobscanroam",SWIG_FromCharPtr("interactive_jobs_can_roam"));
+  SWIG_Python_SetConstant(d, "ATTR_crayenabled",SWIG_FromCharPtr("cray_enabled"));
+  SWIG_Python_SetConstant(d, "ATTR_nppcu",SWIG_FromCharPtr("nppcu"));
+  SWIG_Python_SetConstant(d, "ATTR_login_node_key",SWIG_FromCharPtr("login_node_key"));
+  SWIG_Python_SetConstant(d, "ATTR_maxuserqueuable",SWIG_FromCharPtr("max_user_queuable"));
+  SWIG_Python_SetConstant(d, "ATTR_automaticrequeueexitcode",SWIG_FromCharPtr("automatic_requeue_exit_code"));
+  SWIG_Python_SetConstant(d, "ATTR_jobsynctimeout",SWIG_FromCharPtr("job_sync_timeout"));
+  SWIG_Python_SetConstant(d, "ATTR_pass_cpu_clock",SWIG_FromCharPtr("pass_cpu_clock"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_state",SWIG_FromCharPtr("state"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_power_state",SWIG_FromCharPtr("power_state"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_np",SWIG_FromCharPtr("np"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_properties",SWIG_FromCharPtr("properties"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_ntype",SWIG_FromCharPtr("ntype"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_jobs",SWIG_FromCharPtr("jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_status",SWIG_FromCharPtr("status"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_note",SWIG_FromCharPtr("note"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_mom_port",SWIG_FromCharPtr("mom_service_port"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_mom_rm_port",SWIG_FromCharPtr("mom_manager_port"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_num_node_boards",SWIG_FromCharPtr("num_node_boards"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_numa_str",SWIG_FromCharPtr("numa_board_str"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_gpus",SWIG_FromCharPtr("gpus"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_gpustatus",SWIG_FromCharPtr("gpu_status"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_gpus_str",SWIG_FromCharPtr("numa_gpu_node_str"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_mics",SWIG_FromCharPtr("mics"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_micstatus",SWIG_FromCharPtr("mic_status"));
+  SWIG_Python_SetConstant(d, "ATTR_copy_on_rerun",SWIG_FromCharPtr("copy_on_rerun"));
+  SWIG_Python_SetConstant(d, "ATTR_job_exclusive_on_use",SWIG_FromCharPtr("job_exclusive_on_use"));
+  SWIG_Python_SetConstant(d, "ATTR_mailsubjectfmt",SWIG_FromCharPtr("mail_subject_fmt"));
+  SWIG_Python_SetConstant(d, "ATTR_mailbodyfmt",SWIG_FromCharPtr("mail_body_fmt"));
+  SWIG_Python_SetConstant(d, "CHECKPOINT_UNSPECIFIED",SWIG_FromCharPtr("u"));
+  SWIG_Python_SetConstant(d, "NO_HOLD",SWIG_FromCharPtr("n"));
+  SWIG_Python_SetConstant(d, "NO_JOIN",SWIG_FromCharPtr("n"));
+  SWIG_Python_SetConstant(d, "NO_KEEP",SWIG_FromCharPtr("n"));
+  SWIG_Python_SetConstant(d, "MAIL_AT_ABORT",SWIG_FromCharPtr("a"));
+  SWIG_Python_SetConstant(d, "DEFAULT_PRIORITY",SWIG_FromCharPtr("0"));
+  SWIG_Python_SetConstant(d, "ARRAY_RANGE",SWIG_FromCharPtr("array_range="));
+  SWIG_Python_SetConstant(d, "DELDELAY",SWIG_FromCharPtr("deldelay="));
+  SWIG_Python_SetConstant(d, "DELPURGE",SWIG_FromCharPtr("delpurge="));
+  SWIG_Python_SetConstant(d, "DELASYNC",SWIG_FromCharPtr("delasync"));
+  SWIG_Python_SetConstant(d, "PURGECOMP",SWIG_FromCharPtr("purgecomplete="));
+  SWIG_Python_SetConstant(d, "EXECQUEONLY",SWIG_FromCharPtr("exec_queue_only"));
+  SWIG_Python_SetConstant(d, "RERUNFORCE",SWIG_FromCharPtr("force"));
+  SWIG_Python_SetConstant(d, "USER_HOLD",SWIG_FromCharPtr("u"));
+  SWIG_Python_SetConstant(d, "OTHER_HOLD",SWIG_FromCharPtr("o"));
+  SWIG_Python_SetConstant(d, "SYSTEM_HOLD",SWIG_FromCharPtr("s"));
+  SWIG_Python_SetConstant(d, "ND_free",SWIG_FromCharPtr("free"));
+  SWIG_Python_SetConstant(d, "ND_offline",SWIG_FromCharPtr("offline"));
+  SWIG_Python_SetConstant(d, "ND_down",SWIG_FromCharPtr("down"));
+  SWIG_Python_SetConstant(d, "ND_reserve",SWIG_FromCharPtr("reserve"));
+  SWIG_Python_SetConstant(d, "ND_job_exclusive",SWIG_FromCharPtr("job-exclusive"));
+  SWIG_Python_SetConstant(d, "ND_job_sharing",SWIG_FromCharPtr("job-sharing"));
+  SWIG_Python_SetConstant(d, "ND_busy",SWIG_FromCharPtr("busy"));
+  SWIG_Python_SetConstant(d, "ND_state_unknown",SWIG_FromCharPtr("state-unknown"));
+  SWIG_Python_SetConstant(d, "ND_running",SWIG_FromCharPtr("Running"));
+  SWIG_Python_SetConstant(d, "ND_standby",SWIG_FromCharPtr("Standby"));
+  SWIG_Python_SetConstant(d, "ND_suspend",SWIG_FromCharPtr("Suspend"));
+  SWIG_Python_SetConstant(d, "ND_sleep",SWIG_FromCharPtr("Sleep"));
+  SWIG_Python_SetConstant(d, "ND_hibernate",SWIG_FromCharPtr("Hibernate"));
+  SWIG_Python_SetConstant(d, "ND_shutdown",SWIG_FromCharPtr("Shutdown"));
+  SWIG_Python_SetConstant(d, "ND_active",SWIG_FromCharPtr("active"));
+  SWIG_Python_SetConstant(d, "ND_all",SWIG_FromCharPtr("all"));
+  SWIG_Python_SetConstant(d, "ND_up",SWIG_FromCharPtr("up"));
+  SWIG_Python_SetConstant(d, "ND_timeshared",SWIG_FromCharPtr("time-shared"));
+  SWIG_Python_SetConstant(d, "ND_cluster",SWIG_FromCharPtr("cluster"));
+  SWIG_Python_SetConstant(d, "Q_DT_batch",SWIG_FromCharPtr("batch"));
+  SWIG_Python_SetConstant(d, "Q_DT_interactive",SWIG_FromCharPtr("interactive"));
+  SWIG_Python_SetConstant(d, "Q_DT_rerunable",SWIG_FromCharPtr("rerunable"));
+  SWIG_Python_SetConstant(d, "Q_DT_nonrerunable",SWIG_FromCharPtr("nonrerunable"));
+  SWIG_Python_SetConstant(d, "Q_DT_fault_tolerant",SWIG_FromCharPtr("fault_tolerant"));
+  SWIG_Python_SetConstant(d, "Q_DT_fault_intolerant",SWIG_FromCharPtr("fault_intolerant"));
+  SWIG_Python_SetConstant(d, "Q_DT_job_array",SWIG_FromCharPtr("job_array"));
+  SWIG_Python_SetConstant(d, "MAX_ENCODE_BFR",SWIG_From_int((int)(150)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_CREATE",SWIG_From_int((int)(0)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_DELETE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_SET",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_UNSET",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_LIST",SWIG_From_int((int)(4)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_PRINT",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_ACTIVE",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_NONE",SWIG_From_int((int)(-1)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_SERVER",SWIG_From_int((int)(0)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_QUEUE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_JOB",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_NODE",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "MSG_OUT",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "MSG_ERR",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "SHUT_SIG",SWIG_From_int((int)(-1)));
+  SWIG_Python_SetConstant(d, "SHUT_IMMEDIATE",SWIG_From_int((int)(0)));
+  SWIG_Python_SetConstant(d, "SHUT_DELAY",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "SHUT_QUICK",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "SIG_RESUME",SWIG_FromCharPtr("resume"));
+  SWIG_Python_SetConstant(d, "SIG_SUSPEND",SWIG_FromCharPtr("suspend"));
+  SWIG_Python_SetConstant(d, "PBS_MAXHOSTNAME",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "MAXPATHLEN",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "MAXPORTLEN",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "MAXNAMLEN",SWIG_From_int((int)(255)));
+  SWIG_Python_SetConstant(d, "MAX_NOTE",SWIG_From_int((int)(256)));
+  SWIG_Python_SetConstant(d, "MAX_NOTE_STR",SWIG_FromCharPtr("256"));
+  SWIG_Python_SetConstant(d, "PBS_MAXUSER",SWIG_From_int((int)(32)));
+  SWIG_Python_SetConstant(d, "PBS_MAXGRPN",SWIG_From_int((int)(16)));
+  SWIG_Python_SetConstant(d, "PBS_MAXGPUID",SWIG_From_int((int)(16)));
+  SWIG_Python_SetConstant(d, "PBS_MAXQUEUENAME",SWIG_From_int((int)(15)));
+  SWIG_Python_SetConstant(d, "PBS_MAXSERVERNAME",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "PBS_MAXJOBARRAYLEN",SWIG_From_int((int)(7)));
+  SWIG_Python_SetConstant(d, "PBS_MAXSEQNUM",SWIG_From_int((int)(8)));
+  SWIG_Python_SetConstant(d, "PBS_MAXPORTNUM",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "PBS_MAXJOBARRAY",SWIG_From_int((int)(99999)));
+  SWIG_Python_SetConstant(d, "PBS_MAXSVRJOBID",SWIG_From_int((int)((8+1024+5+7+2))));
+  SWIG_Python_SetConstant(d, "PBS_MAXCLTJOBID",SWIG_From_int((int)(((8+1024+5+7+2) +1024+5+7+2))));
+  SWIG_Python_SetConstant(d, "PBS_MAXDEST",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "PBS_MAXROUTEDEST",SWIG_From_int((int)((15+1024+5+2))));
+  SWIG_Python_SetConstant(d, "PBS_USE_IFF",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "PBS_INTERACTIVE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "PBS_TERM_BUF_SZ",SWIG_From_int((int)(80)));
+  SWIG_Python_SetConstant(d, "PBS_TERM_CCA",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "PBS_MAXCREDENTIAL_LEN",SWIG_From_int((int)(2048)));
+  SWIG_Python_SetConstant(d, "PBS_QS_VERSION_BASE",SWIG_From_int((int)(0x00020300)));
+  SWIG_Python_SetConstant(d, "PBS_QS_VERSION_INT",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "PBS_QS_VERSION",SWIG_From_int((int)((0x00020300+2))));
+  SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_NAME",SWIG_FromCharPtr("pbs"));
+  SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_PORT",SWIG_From_int((int)(15001)));
+  SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_NAME_DIS",SWIG_FromCharPtr("pbs_dis"));
+  SWIG_Python_SetConstant(d, "PBS_MOM_SERVICE_NAME",SWIG_FromCharPtr("pbs_mom"));
+  SWIG_Python_SetConstant(d, "PBS_MOM_SERVICE_PORT",SWIG_From_int((int)(15002)));
+  SWIG_Python_SetConstant(d, "PBS_MANAGER_SERVICE_NAME",SWIG_FromCharPtr("pbs_resmon"));
+  SWIG_Python_SetConstant(d, "PBS_MANAGER_SERVICE_PORT",SWIG_From_int((int)(15003)));
+  SWIG_Python_SetConstant(d, "PBS_SCHEDULER_SERVICE_NAME",SWIG_FromCharPtr("pbs_sched"));
+  SWIG_Python_SetConstant(d, "PBS_SCHEDULER_SERVICE_PORT",SWIG_From_int((int)(15004)));
+  SWIG_Python_SetConstant(d, "TRQ_AUTHD_SERVICE_PORT",SWIG_From_int((int)(15005)));
+  SWIG_Python_SetConstant(d, "CHECKPOINTHOLD",SWIG_FromCharPtr("checkpoint_hold"));
+  SWIG_Python_SetConstant(d, "CHECKPOINTCONT",SWIG_FromCharPtr("checkpoint_cont"));
+  SWIG_Python_SetConstant(d, "MOM_DEFAULT_CHECKPOINT_DIR",SWIG_FromCharPtr("$MOMDEFAULTCHECKPOINTDIR$"));
+  SWIG_Python_SetConstant(d, "NO_MOM_RELAY",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "SET",SWIG_From_int((int)(SET)));
+  SWIG_Python_SetConstant(d, "UNSET",SWIG_From_int((int)(UNSET)));
+  SWIG_Python_SetConstant(d, "INCR",SWIG_From_int((int)(INCR)));
+  SWIG_Python_SetConstant(d, "DECR",SWIG_From_int((int)(DECR)));
+  SWIG_Python_SetConstant(d, "EQ",SWIG_From_int((int)(EQ)));
+  SWIG_Python_SetConstant(d, "NE",SWIG_From_int((int)(NE)));
+  SWIG_Python_SetConstant(d, "GE",SWIG_From_int((int)(GE)));
+  SWIG_Python_SetConstant(d, "GT",SWIG_From_int((int)(GT)));
+  SWIG_Python_SetConstant(d, "LE",SWIG_From_int((int)(LE)));
+  SWIG_Python_SetConstant(d, "LT",SWIG_From_int((int)(LT)));
+  SWIG_Python_SetConstant(d, "DFLT",SWIG_From_int((int)(DFLT)));
+  SWIG_Python_SetConstant(d, "MERGE",SWIG_From_int((int)(MERGE)));
+  SWIG_Python_SetConstant(d, "INCR_OLD",SWIG_From_int((int)(INCR_OLD)));
+  SWIG_Python_SetConstant(d, "NPPCU_ALPS_CHOOSES",SWIG_From_int((int)(NPPCU_ALPS_CHOOSES)));
+  SWIG_Python_SetConstant(d, "NPPCU_NO_USE_HT",SWIG_From_int((int)(NPPCU_NO_USE_HT)));
+  SWIG_Python_SetConstant(d, "NPPCU_USE_HT",SWIG_From_int((int)(NPPCU_USE_HT)));
+  PyDict_SetItemString(md,(char*)"cvar", SWIG_globals());
+  SWIG_addvarlink(SWIG_globals(),(char*)"pbs_server",Swig_var_pbs_server_get, Swig_var_pbs_server_set);
+  SWIG_Python_SetConstant(d, "LOG_BUF_SIZE",SWIG_From_int((int)(16384)));
+  SWIG_Python_SetConstant(d, "LOCAL_LOG_BUF_SIZE",SWIG_From_int((int)(5096)));
+  SWIG_Python_SetConstant(d, "LOG_EMERG",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "LOG_ALERT",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "LOG_CRIT",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "LOG_ERR",SWIG_From_int((int)(4)));
+  SWIG_Python_SetConstant(d, "LOG_WARNING",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "LOG_NOTICE",SWIG_From_int((int)(7)));
+  SWIG_Python_SetConstant(d, "LOG_INFO",SWIG_From_int((int)(8)));
+  SWIG_Python_SetConstant(d, "LOG_DEBUG",SWIG_From_int((int)(9)));
+  SWIG_Python_SetConstant(d, "MAXLINE",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "GETV",SWIG_From_int((int)(GETV)));
+  SWIG_Python_SetConstant(d, "SETV",SWIG_From_int((int)(SETV)));
+  SWIG_addvarlink(SWIG_globals(),(char*)"log_event_mask",Swig_var_log_event_mask_get, Swig_var_log_event_mask_set);
+  SWIG_addvarlink(SWIG_globals(),(char*)"log_mutex",Swig_var_log_mutex_get, Swig_var_log_mutex_set);
+  SWIG_addvarlink(SWIG_globals(),(char*)"job_log_mutex",Swig_var_job_log_mutex_get, Swig_var_job_log_mutex_set);
+  SWIG_addvarlink(SWIG_globals(),(char*)"chk_file_sec_stderr",Swig_var_chk_file_sec_stderr_get, Swig_var_chk_file_sec_stderr_set);
+  SWIG_addvarlink(SWIG_globals(),(char*)"log_buffer",Swig_var_log_buffer_get, Swig_var_log_buffer_set);
+  SWIG_Python_SetConstant(d, "PBSEVENT_ERROR",SWIG_From_int((int)(0x0001)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_SYSTEM",SWIG_From_int((int)(0x0002)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_ADMIN",SWIG_From_int((int)(0x0004)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_JOB",SWIG_From_int((int)(0x0008)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_JOB_USAGE",SWIG_From_int((int)(0x0010)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_SECURITY",SWIG_From_int((int)(0x0020)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_SCHED",SWIG_From_int((int)(0x0040)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_DEBUG",SWIG_From_int((int)(0x0080)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_DEBUG2",SWIG_From_int((int)(0x0100)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_CLIENTAUTH",SWIG_From_int((int)(0X0200)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_SYSLOG",SWIG_From_int((int)(0x0400)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_FORCE",SWIG_From_int((int)(0x8000)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_SERVER",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_QUEUE",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_JOB",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_REQUEST",SWIG_From_int((int)(4)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_FILE",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_ACCT",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_NODE",SWIG_From_int((int)(7)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_TRQAUTHD",SWIG_From_int((int)(8)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_MASK",SWIG_From_int((int)(0x01ff)));
+  SWIG_Python_SetConstant(d, "MAX_PATH_LEN",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "SECS_PER_DAY",SWIG_From_int((int)(86400)));
+  SWIG_Python_SetConstant(d, "TRUE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "FALSE",SWIG_From_int((int)(0)));
+  SWIG_Python_SetConstant(d, "PBSE_TOTAL_CEILING",SWIG_From_int((int)(PBSE_TOTAL_CEILING)));
+  SWIG_Python_SetConstant(d, "PBSE_",SWIG_From_int((int)(15000)));
+  SWIG_Python_SetConstant(d, "PBSE_NONE",SWIG_From_int((int)(0)));
+  SWIG_addvarlink(SWIG_globals(),(char*)"pbs_errno",Swig_var_pbs_errno_get, Swig_var_pbs_errno_set);
+#if PY_VERSION_HEX >= 0x03000000
+  return m;
+#else
+  return;
+#endif
+}
+
Index: /tags/4.6.0/src/5.x/rm.h
===================================================================
--- /tags/4.6.0/src/5.x/rm.h	(revision 342)
+++ /tags/4.6.0/src/5.x/rm.h	(revision 342)
@@ -0,0 +1,106 @@
+/*
+*         OpenPBS (Portable Batch System) v2.3 Software License
+*
+* Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+* All rights reserved.
+*
+* ---------------------------------------------------------------------------
+* For a license to use or redistribute the OpenPBS software under conditions
+* other than those described below, or to purchase support for this software,
+* please contact Veridian Systems, PBS Products Department ("Licensor") at:
+*
+*    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+*                        877 902-4PBS (US toll-free)
+* ---------------------------------------------------------------------------
+*
+* This license covers use of the OpenPBS v2.3 software (the "Software") at
+* your site or location, and, for certain users, redistribution of the
+* Software to other sites and locations.  Use and redistribution of
+* OpenPBS v2.3 in source and binary forms, with or without modification,
+* are permitted provided that all of the following conditions are met.
+* After December 31, 2001, only conditions 3-6 must be met:
+*
+* 1. Commercial and/or non-commercial use of the Software is permitted
+*    provided a current software registration is on file at www.OpenPBS.org.
+*    If use of this software contributes to a publication, product, or
+*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
+*
+* 2. Redistribution in any form is only permitted for non-commercial,
+*    non-profit purposes.  There can be no charge for the Software or any
+*    software incorporating the Software.  Further, there can be no
+*    expectation of revenue generated as a consequence of redistributing
+*    the Software.
+*
+* 3. Any Redistribution of source code must retain the above copyright notice
+*    and the acknowledgment contained in paragraph 6, this list of conditions
+*    and the disclaimer contained in paragraph 7.
+*
+* 4. Any Redistribution in binary form must reproduce the above copyright
+*    notice and the acknowledgment contained in paragraph 6, this list of
+*    conditions and the disclaimer contained in paragraph 7 in the
+*    documentation and/or other materials provided with the distribution.
+*
+* 5. Redistributions in any form must be accompanied by information on how to
+*    obtain complete source code for the OpenPBS software and any
+*    modifications and/or additions to the OpenPBS software.  The source code
+*    must either be included in the distribution or be available for no more
+*    than the cost of distribution plus a nominal fee, and all modifications
+*    and additions to the Software must be freely redistributable by any party
+*    (including Licensor) without restriction.
+*
+* 6. All advertising materials mentioning features or use of the Software must
+*    display the following acknowledgment:
+*
+*     "This product includes software developed by NASA Ames Research Center,
+*     Lawrence Livermore National Laboratory, and Veridian Information
+*     Solutions, Inc.
+*     Visit www.OpenPBS.org for OpenPBS software support,
+*     products, and information."
+*
+* 7. DISCLAIMER OF WARRANTY
+*
+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+* ARE EXPRESSLY DISCLAIMED.
+*
+* IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+* U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* This license will be governed by the laws of the Commonwealth of Virginia,
+* without reference to its choice of law rules.
+*/
+
+/*
+** Header file defineing the library calls for connecting
+** to the resource monitor.
+*/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+int openrm(char *, unsigned int);
+int closerm_err(int *, int);
+int closerm(int);
+int downrm(int *, int);
+int configrm(int, int *, char *);
+int addreq_err(int, int *, char *);
+int begin_rm_req(int ,int *,int );
+int addreq(int, char *);
+int allreq(char *);
+char* getreq_err(int *, int);
+char* getreq(int);
+int flushreq(void);
+int activereq(void);
+void fullresp(int);
+#ifdef __cplusplus
+}
+#endif
+
Index: /tags/4.6.0/src/C++/log.h
===================================================================
--- /tags/4.6.0/src/C++/log.h	(revision 342)
+++ /tags/4.6.0/src/C++/log.h	(revision 342)
@@ -0,0 +1,234 @@
+/*
+*         OpenPBS (Portable Batch System) v2.3 Software License
+*
+* Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+* All rights reserved.
+*
+* ---------------------------------------------------------------------------
+* For a license to use or redistribute the OpenPBS software under conditions
+* other than those described below, or to purchase support for this software,
+* please contact Veridian Systems, PBS Products Department ("Licensor") at:
+*
+*    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+*                        877 902-4PBS (US toll-free)
+* ---------------------------------------------------------------------------
+*
+* This license covers use of the OpenPBS v2.3 software (the "Software") at
+* your site or location, and, for certain users, redistribution of the
+* Software to other sites and locations.  Use and redistribution of
+* OpenPBS v2.3 in source and binary forms, with or without modification,
+* are permitted provided that all of the following conditions are met.
+* After December 31, 2001, only conditions 3-6 must be met:
+*
+* 1. Commercial and/or non-commercial use of the Software is permitted
+*    provided a current software registration is on file at www.OpenPBS.org.
+*    If use of this software contributes to a publication, product, or
+*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
+*
+* 2. Redistribution in any form is only permitted for non-commercial,
+*    non-profit purposes.  There can be no charge for the Software or any
+*    software incorporating the Software.  Further, there can be no
+*    expectation of revenue generated as a consequence of redistributing
+*    the Software.
+*
+* 3. Any Redistribution of source code must retain the above copyright notice
+*    and the acknowledgment contained in paragraph 6, this list of conditions
+*    and the disclaimer contained in paragraph 7.
+*
+* 4. Any Redistribution in binary form must reproduce the above copyright
+*    notice and the acknowledgment contained in paragraph 6, this list of
+*    conditions and the disclaimer contained in paragraph 7 in the
+*    documentation and/or other materials provided with the distribution.
+*
+* 5. Redistributions in any form must be accompanied by information on how to
+*    obtain complete source code for the OpenPBS software and any
+*    modifications and/or additions to the OpenPBS software.  The source code
+*    must either be included in the distribution or be available for no more
+*    than the cost of distribution plus a nominal fee, and all modifications
+*    and additions to the Software must be freely redistributable by any party
+*    (including Licensor) without restriction.
+*
+* 6. All advertising materials mentioning features or use of the Software must
+*    display the following acknowledgment:
+*
+*     "This product includes software developed by NASA Ames Research Center,
+*     Lawrence Livermore National Laboratory, and Veridian Information
+*     Solutions, Inc.
+*     Visit www.OpenPBS.org for OpenPBS software support,
+*     products, and information."
+*
+* 7. DISCLAIMER OF WARRANTY
+*
+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+* ARE EXPRESSLY DISCLAIMED.
+*
+* IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+* U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* This license will be governed by the laws of the Commonwealth of Virginia,
+* without reference to its choice of law rules.
+*/
+
+/*
+ * include file for error/event logging
+ */
+
+#ifndef LOG_H
+#define LOG_H
+
+#include <pthread.h>
+#define LOG_BUF_SIZE        16384
+#define LOCAL_LOG_BUF_SIZE  5096
+
+/* The following macro assist in sharing code between the Server and Mom */
+#define LOG_EVENT log_event
+
+/*
+** Set up a debug print macro.
+*/
+#ifdef NDEBUG
+#define DBPRT(x)
+#else
+#define DBPRT(x) printf x;
+#endif  /* END NDEBUG */
+
+#if SYSLOG
+#include <syslog.h>
+#endif /* SYSLOG */
+
+#if !SYSLOG
+/* define syslog constants that can be used in code regardless of whether we
+ * are using syslog or not! */
+
+#ifndef LOG_EMERG
+#define LOG_EMERG 1
+#endif
+
+#ifndef LOG_ALERT
+#define LOG_ALERT 2
+#endif
+
+#ifndef LOG_CRIT
+#define LOG_CRIT 3
+#endif
+
+#ifndef LOG_ERR
+#define LOG_ERR 4 
+#endif
+
+#ifndef LOG_ERR
+#define LOG_ERR 5 
+#endif
+
+#ifndef LOG_WARNING
+#define LOG_WARNING 6
+#endif
+
+#ifndef LOG_NOTICE
+#define LOG_NOTICE 7
+#endif
+
+#ifndef LOG_INFO
+#define LOG_INFO 8
+#endif
+
+#ifndef LOG_DEBUG
+#define LOG_DEBUG 9
+#endif
+#endif /* SYSLOG */
+
+#define MAXLINE 1024
+
+enum getter_setter { GETV, SETV };
+typedef enum getter_setter SGetter;
+
+/* HvB
+extern int LOGLEVEL;
+*/
+
+extern long *log_event_mask;
+extern pthread_mutex_t log_mutex;
+extern pthread_mutex_t job_log_mutex;
+
+/* set this to non-zero in calling app if errors go to stderr */
+extern int   chk_file_sec_stderr;
+
+/* extern void log_close (int); */
+/* extern void job_log_close (int); */
+void log_err (int, const char *, const char *);
+void log_ext (int, const char *, const char *,int);
+void log_event (int, int, const char *, const char *);
+/* extern int  log_open (char *, char *); */
+/* extern int  job_log_open (char *, char *); */
+
+void log_record (int, int, const char *, const char *);
+
+/* HvB */
+bool log_available(int eventtype);
+
+/* extern void log_roll (int); */
+/* extern long log_size (void); */
+/* extern long job_log_size (void); */
+/* extern int  log_remove_old (char *,unsigned long); */
+extern char log_buffer[LOG_BUF_SIZE];
+/* int log_init (char *, char *); */
+
+/* extern int  IamRoot (void); */
+/* #ifdef __CYGWIN__ */
+/* extern int  IamAdminByName (char *); */
+/* extern int  IamUser (void); */
+/* extern int  IamUserByName (char *); */
+/* #endif  __CYGWIN__ */
+
+/* extern int  chk_file_sec (char *, int, int, int, int, char *); */
+/* extern int  setup_env (char *); */
+
+
+/* Event types */
+
+#define PBSEVENT_ERROR  0x0001  /* internal errors       */
+#define PBSEVENT_SYSTEM  0x0002  /* system (server) & (trqauthd) events     */
+#define PBSEVENT_ADMIN  0x0004  /* admin events        */
+#define PBSEVENT_JOB  0x0008  /* job related events       */
+#define PBSEVENT_JOB_USAGE 0x0010  /* End of Job accounting      */
+#define PBSEVENT_SECURITY 0x0020  /* security violation events  */
+#define PBSEVENT_SCHED  0x0040  /* scheduler events       */
+#define PBSEVENT_DEBUG  0x0080  /* common debug messages      */
+#define PBSEVENT_DEBUG2  0x0100  /* less needed debug messages */
+#define PBSEVENT_CLIENTAUTH 0X0200 /* TRQAUTHD login events */
+#define PBSEVENT_SYSLOG 0x0400   /* pass this event to the syslog as well (if defined) */
+#define PBSEVENT_FORCE  0x8000  /* set to force a message     */
+
+/* Event Object Classes, see array class_names[] in ../lib/Liblog/pbs_log.c   */
+
+#define PBS_EVENTCLASS_SERVER 1 /* The server itself */
+#define PBS_EVENTCLASS_QUEUE 2 /* Queues  */
+#define PBS_EVENTCLASS_JOB 3 /* Jobs   */
+#define PBS_EVENTCLASS_REQUEST 4 /* Batch Requests */
+#define PBS_EVENTCLASS_FILE 5 /* A Job related File */
+#define PBS_EVENTCLASS_ACCT 6 /* Accounting info */
+#define PBS_EVENTCLASS_NODE 7 /* Nodes           */
+#define PBS_EVENTCLASS_TRQAUTHD 8 /* trqauthd */
+
+/* Logging Masks */
+
+#define PBSEVENT_MASK  0x01ff
+
+/* definition's for pbs_log.c's log_remove_old() function */
+#define MAX_PATH_LEN    1024  /* maximum possible length of any path */
+#define SECS_PER_DAY     86400
+
+#if !defined(TRUE) || !defined(FALSE)
+#define TRUE 1
+#define FALSE 0
+#endif /* !defined(TRUE) || !defined(FALSE) */
+
+#endif /* ifndef LOG_H */
Index: /tags/4.6.0/src/C++/pbs.py
===================================================================
--- /tags/4.6.0/src/C++/pbs.py	(revision 342)
+++ /tags/4.6.0/src/C++/pbs.py	(revision 342)
@@ -0,0 +1,1056 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 2.0.7
+#
+# Do not make changes to this file unless you know what you are doing--modify
+# the SWIG interface file instead.
+
+
+
+from sys import version_info
+if version_info >= (2,6,0):
+    def swig_import_helper():
+        from os.path import dirname
+        import imp
+        fp = None
+        try:
+            fp, pathname, description = imp.find_module('_pbs', [dirname(__file__)])
+        except ImportError:
+            import _pbs
+            return _pbs
+        if fp is not None:
+            try:
+                _mod = imp.load_module('_pbs', fp, pathname, description)
+            finally:
+                fp.close()
+            return _mod
+    _pbs = swig_import_helper()
+    del swig_import_helper
+else:
+    import _pbs
+del version_info
+try:
+    _swig_property = property
+except NameError:
+    pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+    if (name == "thisown"): return self.this.own(value)
+    if (name == "this"):
+        if type(value).__name__ == 'SwigPyObject':
+            self.__dict__[name] = value
+            return
+    method = class_type.__swig_setmethods__.get(name,None)
+    if method: return method(self,value)
+    if (not static):
+        self.__dict__[name] = value
+    else:
+        raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+    return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+    if (name == "thisown"): return self.this.own()
+    method = class_type.__swig_getmethods__.get(name,None)
+    if method: return method(self)
+    raise AttributeError(name)
+
+def _swig_repr(self):
+    try: strthis = "proxy of " + self.this.__repr__()
+    except: strthis = ""
+    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+try:
+    _object = object
+    _newclass = 1
+except AttributeError:
+    class _object : pass
+    _newclass = 0
+
+
+
+def new_attrl(*args):
+  return _pbs.new_attrl(*args)
+new_attrl = _pbs.new_attrl
+
+def new_attropl(*args):
+  return _pbs.new_attropl(*args)
+new_attropl = _pbs.new_attropl
+
+def new_batch_status():
+  return _pbs.new_batch_status()
+new_batch_status = _pbs.new_batch_status
+
+def get_error():
+  return _pbs.get_error()
+get_error = _pbs.get_error
+class attrlArray(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, attrlArray, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, attrlArray, name)
+    __repr__ = _swig_repr
+    def __init__(self, *args): 
+        this = _pbs.new_attrlArray(*args)
+        try: self.this.append(this)
+        except: self.this = this
+    __swig_destroy__ = _pbs.delete_attrlArray
+    __del__ = lambda self : None;
+    def __getitem__(self, *args): return _pbs.attrlArray___getitem__(self, *args)
+    def __setitem__(self, *args): return _pbs.attrlArray___setitem__(self, *args)
+    def cast(self): return _pbs.attrlArray_cast(self)
+    __swig_getmethods__["frompointer"] = lambda x: _pbs.attrlArray_frompointer
+    if _newclass:frompointer = staticmethod(_pbs.attrlArray_frompointer)
+attrlArray_swigregister = _pbs.attrlArray_swigregister
+attrlArray_swigregister(attrlArray)
+
+def attrlArray_frompointer(*args):
+  return _pbs.attrlArray_frompointer(*args)
+attrlArray_frompointer = _pbs.attrlArray_frompointer
+
+ATTR_a = _pbs.ATTR_a
+ATTR_c = _pbs.ATTR_c
+ATTR_e = _pbs.ATTR_e
+ATTR_f = _pbs.ATTR_f
+ATTR_g = _pbs.ATTR_g
+ATTR_h = _pbs.ATTR_h
+ATTR_j = _pbs.ATTR_j
+ATTR_k = _pbs.ATTR_k
+ATTR_l = _pbs.ATTR_l
+ATTR_m = _pbs.ATTR_m
+ATTR_o = _pbs.ATTR_o
+ATTR_p = _pbs.ATTR_p
+ATTR_q = _pbs.ATTR_q
+ATTR_r = _pbs.ATTR_r
+ATTR_t = _pbs.ATTR_t
+ATTR_array_id = _pbs.ATTR_array_id
+ATTR_u = _pbs.ATTR_u
+ATTR_v = _pbs.ATTR_v
+ATTR_A = _pbs.ATTR_A
+ATTR_args = _pbs.ATTR_args
+ATTR_reservation_id = _pbs.ATTR_reservation_id
+ATTR_login_node_id = _pbs.ATTR_login_node_id
+ATTR_login_prop = _pbs.ATTR_login_prop
+ATTR_external_nodes = _pbs.ATTR_external_nodes
+ATTR_multi_req_alps = _pbs.ATTR_multi_req_alps
+ATTR_M = _pbs.ATTR_M
+ATTR_N = _pbs.ATTR_N
+ATTR_S = _pbs.ATTR_S
+ATTR_depend = _pbs.ATTR_depend
+ATTR_inter = _pbs.ATTR_inter
+ATTR_stagein = _pbs.ATTR_stagein
+ATTR_stageout = _pbs.ATTR_stageout
+ATTR_jobtype = _pbs.ATTR_jobtype
+ATTR_submit_host = _pbs.ATTR_submit_host
+ATTR_init_work_dir = _pbs.ATTR_init_work_dir
+ATTR_pbs_o_initdir = _pbs.ATTR_pbs_o_initdir
+ATTR_pbs_o_rootdir = _pbs.ATTR_pbs_o_rootdir
+ATTR_pbs_o_workdir = _pbs.ATTR_pbs_o_workdir
+ATTR_pbs_o_host = _pbs.ATTR_pbs_o_host
+ATTR_pbs_o_server = _pbs.ATTR_pbs_o_server
+ATTR_pbs_o_home = _pbs.ATTR_pbs_o_home
+ATTR_pbs_o_logname = _pbs.ATTR_pbs_o_logname
+ATTR_pbs_o_path = _pbs.ATTR_pbs_o_path
+ATTR_pbs_o_mail = _pbs.ATTR_pbs_o_mail
+ATTR_pbs_o_shell = _pbs.ATTR_pbs_o_shell
+ATTR_pbs_o_tz = _pbs.ATTR_pbs_o_tz
+ATTR_pbs_o_lang = _pbs.ATTR_pbs_o_lang
+ATTR_pbs_o_uid = _pbs.ATTR_pbs_o_uid
+ATTR_pbs_o_submit_filter = _pbs.ATTR_pbs_o_submit_filter
+ATTR_ctime = _pbs.ATTR_ctime
+ATTR_exechost = _pbs.ATTR_exechost
+ATTR_execport = _pbs.ATTR_execport
+ATTR_mtime = _pbs.ATTR_mtime
+ATTR_qtime = _pbs.ATTR_qtime
+ATTR_session = _pbs.ATTR_session
+ATTR_euser = _pbs.ATTR_euser
+ATTR_egroup = _pbs.ATTR_egroup
+ATTR_hashname = _pbs.ATTR_hashname
+ATTR_hopcount = _pbs.ATTR_hopcount
+ATTR_security = _pbs.ATTR_security
+ATTR_sched_hint = _pbs.ATTR_sched_hint
+ATTR_substate = _pbs.ATTR_substate
+ATTR_name = _pbs.ATTR_name
+ATTR_owner = _pbs.ATTR_owner
+ATTR_used = _pbs.ATTR_used
+ATTR_state = _pbs.ATTR_state
+ATTR_queue = _pbs.ATTR_queue
+ATTR_server = _pbs.ATTR_server
+ATTR_maxrun = _pbs.ATTR_maxrun
+ATTR_maxreport = _pbs.ATTR_maxreport
+ATTR_total = _pbs.ATTR_total
+ATTR_comment = _pbs.ATTR_comment
+ATTR_cookie = _pbs.ATTR_cookie
+ATTR_qrank = _pbs.ATTR_qrank
+ATTR_altid = _pbs.ATTR_altid
+ATTR_etime = _pbs.ATTR_etime
+ATTR_exitstat = _pbs.ATTR_exitstat
+ATTR_forwardx11 = _pbs.ATTR_forwardx11
+ATTR_submit_args = _pbs.ATTR_submit_args
+ATTR_tokens = _pbs.ATTR_tokens
+ATTR_netcounter = _pbs.ATTR_netcounter
+ATTR_umask = _pbs.ATTR_umask
+ATTR_start_time = _pbs.ATTR_start_time
+ATTR_start_count = _pbs.ATTR_start_count
+ATTR_checkpoint_dir = _pbs.ATTR_checkpoint_dir
+ATTR_checkpoint_name = _pbs.ATTR_checkpoint_name
+ATTR_checkpoint_time = _pbs.ATTR_checkpoint_time
+ATTR_checkpoint_restart_status = _pbs.ATTR_checkpoint_restart_status
+ATTR_restart_name = _pbs.ATTR_restart_name
+ATTR_comp_time = _pbs.ATTR_comp_time
+ATTR_reported = _pbs.ATTR_reported
+ATTR_intcmd = _pbs.ATTR_intcmd
+ATTR_job_radix = _pbs.ATTR_job_radix
+ATTR_sister_list = _pbs.ATTR_sister_list
+ATTR_total_runtime = _pbs.ATTR_total_runtime
+ATTR_P = _pbs.ATTR_P
+ATTR_node_exclusive = _pbs.ATTR_node_exclusive
+ATTR_exec_gpus = _pbs.ATTR_exec_gpus
+ATTR_exec_mics = _pbs.ATTR_exec_mics
+ATTR_J = _pbs.ATTR_J
+ATTR_pagg = _pbs.ATTR_pagg
+ATTR_system_start_time = _pbs.ATTR_system_start_time
+ATTR_gpu_flags = _pbs.ATTR_gpu_flags
+ATTR_aclgren = _pbs.ATTR_aclgren
+ATTR_aclgroup = _pbs.ATTR_aclgroup
+ATTR_aclhten = _pbs.ATTR_aclhten
+ATTR_aclhost = _pbs.ATTR_aclhost
+ATTR_acluren = _pbs.ATTR_acluren
+ATTR_acluser = _pbs.ATTR_acluser
+ATTR_altrouter = _pbs.ATTR_altrouter
+ATTR_checkpoint_min = _pbs.ATTR_checkpoint_min
+ATTR_checkpoint_defaults = _pbs.ATTR_checkpoint_defaults
+ATTR_enable = _pbs.ATTR_enable
+ATTR_fromroute = _pbs.ATTR_fromroute
+ATTR_hostlist = _pbs.ATTR_hostlist
+ATTR_killdelay = _pbs.ATTR_killdelay
+ATTR_maxgrprun = _pbs.ATTR_maxgrprun
+ATTR_maxque = _pbs.ATTR_maxque
+ATTR_maxuserque = _pbs.ATTR_maxuserque
+ATTR_maxuserrun = _pbs.ATTR_maxuserrun
+ATTR_qtype = _pbs.ATTR_qtype
+ATTR_rescassn = _pbs.ATTR_rescassn
+ATTR_rescdflt = _pbs.ATTR_rescdflt
+ATTR_rescmax = _pbs.ATTR_rescmax
+ATTR_rescmin = _pbs.ATTR_rescmin
+ATTR_featreqd = _pbs.ATTR_featreqd
+ATTR_req_login_property = _pbs.ATTR_req_login_property
+ATTR_rerunnable = _pbs.ATTR_rerunnable
+ATTR_rndzretry = _pbs.ATTR_rndzretry
+ATTR_routedest = _pbs.ATTR_routedest
+ATTR_routeheld = _pbs.ATTR_routeheld
+ATTR_routewait = _pbs.ATTR_routewait
+ATTR_routeretry = _pbs.ATTR_routeretry
+ATTR_routelife = _pbs.ATTR_routelife
+ATTR_rsvexpdt = _pbs.ATTR_rsvexpdt
+ATTR_rsvsync = _pbs.ATTR_rsvsync
+ATTR_start = _pbs.ATTR_start
+ATTR_count = _pbs.ATTR_count
+ATTR_number = _pbs.ATTR_number
+ATTR_acllogic = _pbs.ATTR_acllogic
+ATTR_aclgrpslpy = _pbs.ATTR_aclgrpslpy
+ATTR_keepcompleted = _pbs.ATTR_keepcompleted
+ATTR_disallowedtypes = _pbs.ATTR_disallowedtypes
+ATTR_is_transit = _pbs.ATTR_is_transit
+ATTR_aclroot = _pbs.ATTR_aclroot
+ATTR_managers = _pbs.ATTR_managers
+ATTR_dfltque = _pbs.ATTR_dfltque
+ATTR_dispsvrsuffix = _pbs.ATTR_dispsvrsuffix
+ATTR_jobsuffixalias = _pbs.ATTR_jobsuffixalias
+ATTR_defnode = _pbs.ATTR_defnode
+ATTR_locsvrs = _pbs.ATTR_locsvrs
+ATTR_logevents = _pbs.ATTR_logevents
+ATTR_logfile = _pbs.ATTR_logfile
+ATTR_loglevel = _pbs.ATTR_loglevel
+ATTR_mailfrom = _pbs.ATTR_mailfrom
+ATTR_nodepack = _pbs.ATTR_nodepack
+ATTR_nodesuffix = _pbs.ATTR_nodesuffix
+ATTR_operators = _pbs.ATTR_operators
+ATTR_queryother = _pbs.ATTR_queryother
+ATTR_resccost = _pbs.ATTR_resccost
+ATTR_rescavail = _pbs.ATTR_rescavail
+ATTR_schedit = _pbs.ATTR_schedit
+ATTR_scheduling = _pbs.ATTR_scheduling
+ATTR_status = _pbs.ATTR_status
+ATTR_syscost = _pbs.ATTR_syscost
+ATTR_pingrate = _pbs.ATTR_pingrate
+ATTR_ndchkrate = _pbs.ATTR_ndchkrate
+ATTR_tcptimeout = _pbs.ATTR_tcptimeout
+ATTR_jobstatrate = _pbs.ATTR_jobstatrate
+ATTR_polljobs = _pbs.ATTR_polljobs
+ATTR_downonerror = _pbs.ATTR_downonerror
+ATTR_disableserveridcheck = _pbs.ATTR_disableserveridcheck
+ATTR_jobnanny = _pbs.ATTR_jobnanny
+ATTR_ownerpurge = _pbs.ATTR_ownerpurge
+ATTR_qcqlimits = _pbs.ATTR_qcqlimits
+ATTR_momjobsync = _pbs.ATTR_momjobsync
+ATTR_maildomain = _pbs.ATTR_maildomain
+ATTR_pbsversion = _pbs.ATTR_pbsversion
+ATTR_submithosts = _pbs.ATTR_submithosts
+ATTR_allownodesubmit = _pbs.ATTR_allownodesubmit
+ATTR_allowproxyuser = _pbs.ATTR_allowproxyuser
+ATTR_autonodenp = _pbs.ATTR_autonodenp
+ATTR_servername = _pbs.ATTR_servername
+ATTR_logfilemaxsize = _pbs.ATTR_logfilemaxsize
+ATTR_logfilerolldepth = _pbs.ATTR_logfilerolldepth
+ATTR_logkeepdays = _pbs.ATTR_logkeepdays
+ATTR_nextjobnum = _pbs.ATTR_nextjobnum
+ATTR_extraresc = _pbs.ATTR_extraresc
+ATTR_schedversion = _pbs.ATTR_schedversion
+ATTR_acctkeepdays = _pbs.ATTR_acctkeepdays
+ATTR_lockfile = _pbs.ATTR_lockfile
+ATTR_credentiallifetime = _pbs.ATTR_credentiallifetime
+ATTR_jobmustreport = _pbs.ATTR_jobmustreport
+ATTR_LockfileUpdateTime = _pbs.ATTR_LockfileUpdateTime
+ATTR_LockfileCheckTime = _pbs.ATTR_LockfileCheckTime
+ATTR_npdefault = _pbs.ATTR_npdefault
+ATTR_clonebatchsize = _pbs.ATTR_clonebatchsize
+ATTR_clonebatchdelay = _pbs.ATTR_clonebatchdelay
+ATTR_jobstarttimeout = _pbs.ATTR_jobstarttimeout
+ATTR_jobforcecanceltime = _pbs.ATTR_jobforcecanceltime
+ATTR_maxarraysize = _pbs.ATTR_maxarraysize
+ATTR_maxslotlimit = _pbs.ATTR_maxslotlimit
+ATTR_recordjobinfo = _pbs.ATTR_recordjobinfo
+ATTR_recordjobscript = _pbs.ATTR_recordjobscript
+ATTR_joblogfilemaxsize = _pbs.ATTR_joblogfilemaxsize
+ATTR_joblogfilerolldepth = _pbs.ATTR_joblogfilerolldepth
+ATTR_joblogkeepdays = _pbs.ATTR_joblogkeepdays
+ATTR_minthreads = _pbs.ATTR_minthreads
+ATTR_maxthreads = _pbs.ATTR_maxthreads
+ATTR_threadidleseconds = _pbs.ATTR_threadidleseconds
+ATTR_moabarraycompatible = _pbs.ATTR_moabarraycompatible
+ATTR_nomailforce = _pbs.ATTR_nomailforce
+ATTR_interactivejobscanroam = _pbs.ATTR_interactivejobscanroam
+ATTR_crayenabled = _pbs.ATTR_crayenabled
+ATTR_nppcu = _pbs.ATTR_nppcu
+ATTR_maxuserqueuable = _pbs.ATTR_maxuserqueuable
+ATTR_automaticrequeueexitcode = _pbs.ATTR_automaticrequeueexitcode
+ATTR_jobsynctimeout = _pbs.ATTR_jobsynctimeout
+ATTR_NODE_state = _pbs.ATTR_NODE_state
+ATTR_NODE_np = _pbs.ATTR_NODE_np
+ATTR_NODE_properties = _pbs.ATTR_NODE_properties
+ATTR_NODE_ntype = _pbs.ATTR_NODE_ntype
+ATTR_NODE_jobs = _pbs.ATTR_NODE_jobs
+ATTR_NODE_status = _pbs.ATTR_NODE_status
+ATTR_NODE_note = _pbs.ATTR_NODE_note
+ATTR_NODE_mom_port = _pbs.ATTR_NODE_mom_port
+ATTR_NODE_mom_rm_port = _pbs.ATTR_NODE_mom_rm_port
+ATTR_NODE_num_node_boards = _pbs.ATTR_NODE_num_node_boards
+ATTR_NODE_numa_str = _pbs.ATTR_NODE_numa_str
+ATTR_NODE_gpus = _pbs.ATTR_NODE_gpus
+ATTR_NODE_gpustatus = _pbs.ATTR_NODE_gpustatus
+ATTR_NODE_gpus_str = _pbs.ATTR_NODE_gpus_str
+ATTR_NODE_mics = _pbs.ATTR_NODE_mics
+ATTR_NODE_micstatus = _pbs.ATTR_NODE_micstatus
+ATTR_mailsubjectfmt = _pbs.ATTR_mailsubjectfmt
+ATTR_mailbodyfmt = _pbs.ATTR_mailbodyfmt
+CHECKPOINT_UNSPECIFIED = _pbs.CHECKPOINT_UNSPECIFIED
+NO_HOLD = _pbs.NO_HOLD
+NO_JOIN = _pbs.NO_JOIN
+NO_KEEP = _pbs.NO_KEEP
+MAIL_AT_ABORT = _pbs.MAIL_AT_ABORT
+DEFAULT_PRIORITY = _pbs.DEFAULT_PRIORITY
+ARRAY_RANGE = _pbs.ARRAY_RANGE
+DELDELAY = _pbs.DELDELAY
+DELPURGE = _pbs.DELPURGE
+DELASYNC = _pbs.DELASYNC
+PURGECOMP = _pbs.PURGECOMP
+EXECQUEONLY = _pbs.EXECQUEONLY
+RERUNFORCE = _pbs.RERUNFORCE
+USER_HOLD = _pbs.USER_HOLD
+OTHER_HOLD = _pbs.OTHER_HOLD
+SYSTEM_HOLD = _pbs.SYSTEM_HOLD
+ND_free = _pbs.ND_free
+ND_offline = _pbs.ND_offline
+ND_down = _pbs.ND_down
+ND_reserve = _pbs.ND_reserve
+ND_job_exclusive = _pbs.ND_job_exclusive
+ND_job_sharing = _pbs.ND_job_sharing
+ND_busy = _pbs.ND_busy
+ND_state_unknown = _pbs.ND_state_unknown
+ND_active = _pbs.ND_active
+ND_all = _pbs.ND_all
+ND_up = _pbs.ND_up
+ND_timeshared = _pbs.ND_timeshared
+ND_cluster = _pbs.ND_cluster
+Q_DT_batch = _pbs.Q_DT_batch
+Q_DT_interactive = _pbs.Q_DT_interactive
+Q_DT_rerunable = _pbs.Q_DT_rerunable
+Q_DT_nonrerunable = _pbs.Q_DT_nonrerunable
+Q_DT_fault_tolerant = _pbs.Q_DT_fault_tolerant
+Q_DT_fault_intolerant = _pbs.Q_DT_fault_intolerant
+Q_DT_job_array = _pbs.Q_DT_job_array
+MAX_ENCODE_BFR = _pbs.MAX_ENCODE_BFR
+MGR_CMD_CREATE = _pbs.MGR_CMD_CREATE
+MGR_CMD_DELETE = _pbs.MGR_CMD_DELETE
+MGR_CMD_SET = _pbs.MGR_CMD_SET
+MGR_CMD_UNSET = _pbs.MGR_CMD_UNSET
+MGR_CMD_LIST = _pbs.MGR_CMD_LIST
+MGR_CMD_PRINT = _pbs.MGR_CMD_PRINT
+MGR_CMD_ACTIVE = _pbs.MGR_CMD_ACTIVE
+MGR_OBJ_NONE = _pbs.MGR_OBJ_NONE
+MGR_OBJ_SERVER = _pbs.MGR_OBJ_SERVER
+MGR_OBJ_QUEUE = _pbs.MGR_OBJ_QUEUE
+MGR_OBJ_JOB = _pbs.MGR_OBJ_JOB
+MGR_OBJ_NODE = _pbs.MGR_OBJ_NODE
+MSG_OUT = _pbs.MSG_OUT
+MSG_ERR = _pbs.MSG_ERR
+SHUT_SIG = _pbs.SHUT_SIG
+SHUT_IMMEDIATE = _pbs.SHUT_IMMEDIATE
+SHUT_DELAY = _pbs.SHUT_DELAY
+SHUT_QUICK = _pbs.SHUT_QUICK
+SIG_RESUME = _pbs.SIG_RESUME
+SIG_SUSPEND = _pbs.SIG_SUSPEND
+PBS_MAXHOSTNAME = _pbs.PBS_MAXHOSTNAME
+MAXPATHLEN = _pbs.MAXPATHLEN
+MAXPORTLEN = _pbs.MAXPORTLEN
+MAXNAMLEN = _pbs.MAXNAMLEN
+MAX_NOTE = _pbs.MAX_NOTE
+MAX_NOTE_STR = _pbs.MAX_NOTE_STR
+PBS_MAXUSER = _pbs.PBS_MAXUSER
+PBS_MAXGRPN = _pbs.PBS_MAXGRPN
+PBS_MAXGPUID = _pbs.PBS_MAXGPUID
+PBS_MAXQUEUENAME = _pbs.PBS_MAXQUEUENAME
+PBS_MAXSERVERNAME = _pbs.PBS_MAXSERVERNAME
+PBS_MAXJOBARRAYLEN = _pbs.PBS_MAXJOBARRAYLEN
+PBS_MAXSEQNUM = _pbs.PBS_MAXSEQNUM
+PBS_MAXPORTNUM = _pbs.PBS_MAXPORTNUM
+PBS_MAXJOBARRAY = _pbs.PBS_MAXJOBARRAY
+PBS_MAXSVRJOBID = _pbs.PBS_MAXSVRJOBID
+PBS_MAXCLTJOBID = _pbs.PBS_MAXCLTJOBID
+PBS_MAXDEST = _pbs.PBS_MAXDEST
+PBS_MAXROUTEDEST = _pbs.PBS_MAXROUTEDEST
+PBS_USE_IFF = _pbs.PBS_USE_IFF
+PBS_INTERACTIVE = _pbs.PBS_INTERACTIVE
+PBS_TERM_BUF_SZ = _pbs.PBS_TERM_BUF_SZ
+PBS_TERM_CCA = _pbs.PBS_TERM_CCA
+PBS_MAXCREDENTIAL_LEN = _pbs.PBS_MAXCREDENTIAL_LEN
+PBS_QS_VERSION_BASE = _pbs.PBS_QS_VERSION_BASE
+PBS_QS_VERSION_INT = _pbs.PBS_QS_VERSION_INT
+PBS_QS_VERSION = _pbs.PBS_QS_VERSION
+PBS_BATCH_SERVICE_NAME = _pbs.PBS_BATCH_SERVICE_NAME
+PBS_BATCH_SERVICE_PORT = _pbs.PBS_BATCH_SERVICE_PORT
+PBS_BATCH_SERVICE_NAME_DIS = _pbs.PBS_BATCH_SERVICE_NAME_DIS
+PBS_MOM_SERVICE_NAME = _pbs.PBS_MOM_SERVICE_NAME
+PBS_MOM_SERVICE_PORT = _pbs.PBS_MOM_SERVICE_PORT
+PBS_MANAGER_SERVICE_NAME = _pbs.PBS_MANAGER_SERVICE_NAME
+PBS_MANAGER_SERVICE_PORT = _pbs.PBS_MANAGER_SERVICE_PORT
+PBS_SCHEDULER_SERVICE_NAME = _pbs.PBS_SCHEDULER_SERVICE_NAME
+PBS_SCHEDULER_SERVICE_PORT = _pbs.PBS_SCHEDULER_SERVICE_PORT
+TRQ_AUTHD_SERVICE_PORT = _pbs.TRQ_AUTHD_SERVICE_PORT
+CHECKPOINTHOLD = _pbs.CHECKPOINTHOLD
+CHECKPOINTCONT = _pbs.CHECKPOINTCONT
+MOM_DEFAULT_CHECKPOINT_DIR = _pbs.MOM_DEFAULT_CHECKPOINT_DIR
+NO_MOM_RELAY = _pbs.NO_MOM_RELAY
+SET = _pbs.SET
+UNSET = _pbs.UNSET
+INCR = _pbs.INCR
+DECR = _pbs.DECR
+EQ = _pbs.EQ
+NE = _pbs.NE
+GE = _pbs.GE
+GT = _pbs.GT
+LE = _pbs.LE
+LT = _pbs.LT
+DFLT = _pbs.DFLT
+MERGE = _pbs.MERGE
+INCR_OLD = _pbs.INCR_OLD
+NPPCU_ALPS_CHOOSES = _pbs.NPPCU_ALPS_CHOOSES
+NPPCU_NO_USE_HT = _pbs.NPPCU_NO_USE_HT
+NPPCU_USE_HT = _pbs.NPPCU_USE_HT
+class attrl(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, attrl, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, attrl, name)
+    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
+    __repr__ = _swig_repr
+    __swig_setmethods__["next"] = _pbs.attrl_next_set
+    __swig_getmethods__["next"] = _pbs.attrl_next_get
+    if _newclass:next = _swig_property(_pbs.attrl_next_get, _pbs.attrl_next_set)
+    __swig_setmethods__["name"] = _pbs.attrl_name_set
+    __swig_getmethods__["name"] = _pbs.attrl_name_get
+    if _newclass:name = _swig_property(_pbs.attrl_name_get, _pbs.attrl_name_set)
+    __swig_setmethods__["resource"] = _pbs.attrl_resource_set
+    __swig_getmethods__["resource"] = _pbs.attrl_resource_get
+    if _newclass:resource = _swig_property(_pbs.attrl_resource_get, _pbs.attrl_resource_set)
+    __swig_setmethods__["value"] = _pbs.attrl_value_set
+    __swig_getmethods__["value"] = _pbs.attrl_value_get
+    if _newclass:value = _swig_property(_pbs.attrl_value_get, _pbs.attrl_value_set)
+    __swig_setmethods__["op"] = _pbs.attrl_op_set
+    __swig_getmethods__["op"] = _pbs.attrl_op_get
+    if _newclass:op = _swig_property(_pbs.attrl_op_get, _pbs.attrl_op_set)
+    def __str__(self): return _pbs.attrl___str__(self)
+    __swig_destroy__ = _pbs.delete_attrl
+    __del__ = lambda self : None;
+attrl_swigregister = _pbs.attrl_swigregister
+attrl_swigregister(attrl)
+
+class attropl(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, attropl, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, attropl, name)
+    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
+    __repr__ = _swig_repr
+    __swig_setmethods__["next"] = _pbs.attropl_next_set
+    __swig_getmethods__["next"] = _pbs.attropl_next_get
+    if _newclass:next = _swig_property(_pbs.attropl_next_get, _pbs.attropl_next_set)
+    __swig_setmethods__["name"] = _pbs.attropl_name_set
+    __swig_getmethods__["name"] = _pbs.attropl_name_get
+    if _newclass:name = _swig_property(_pbs.attropl_name_get, _pbs.attropl_name_set)
+    __swig_setmethods__["resource"] = _pbs.attropl_resource_set
+    __swig_getmethods__["resource"] = _pbs.attropl_resource_get
+    if _newclass:resource = _swig_property(_pbs.attropl_resource_get, _pbs.attropl_resource_set)
+    __swig_setmethods__["value"] = _pbs.attropl_value_set
+    __swig_getmethods__["value"] = _pbs.attropl_value_get
+    if _newclass:value = _swig_property(_pbs.attropl_value_get, _pbs.attropl_value_set)
+    __swig_setmethods__["op"] = _pbs.attropl_op_set
+    __swig_getmethods__["op"] = _pbs.attropl_op_get
+    if _newclass:op = _swig_property(_pbs.attropl_op_get, _pbs.attropl_op_set)
+    def __str__(self): return _pbs.attropl___str__(self)
+    __swig_destroy__ = _pbs.delete_attropl
+    __del__ = lambda self : None;
+attropl_swigregister = _pbs.attropl_swigregister
+attropl_swigregister(attropl)
+
+class batch_status(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, batch_status, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, batch_status, name)
+    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
+    __repr__ = _swig_repr
+    __swig_setmethods__["next"] = _pbs.batch_status_next_set
+    __swig_getmethods__["next"] = _pbs.batch_status_next_get
+    if _newclass:next = _swig_property(_pbs.batch_status_next_get, _pbs.batch_status_next_set)
+    __swig_setmethods__["name"] = _pbs.batch_status_name_set
+    __swig_getmethods__["name"] = _pbs.batch_status_name_get
+    if _newclass:name = _swig_property(_pbs.batch_status_name_get, _pbs.batch_status_name_set)
+    __swig_setmethods__["attribs"] = _pbs.batch_status_attribs_set
+    __swig_getmethods__["attribs"] = _pbs.batch_status_attribs_get
+    if _newclass:attribs = _swig_property(_pbs.batch_status_attribs_get, _pbs.batch_status_attribs_set)
+    __swig_setmethods__["text"] = _pbs.batch_status_text_set
+    __swig_getmethods__["text"] = _pbs.batch_status_text_get
+    if _newclass:text = _swig_property(_pbs.batch_status_text_get, _pbs.batch_status_text_set)
+batch_status_swigregister = _pbs.batch_status_swigregister
+batch_status_swigregister(batch_status)
+
+
+def avail(*args):
+  return _pbs.avail(*args)
+avail = _pbs.avail
+
+def pbs_asyrunjob(*args):
+  return _pbs.pbs_asyrunjob(*args)
+pbs_asyrunjob = _pbs.pbs_asyrunjob
+
+def pbs_alterjob_async(*args):
+  return _pbs.pbs_alterjob_async(*args)
+pbs_alterjob_async = _pbs.pbs_alterjob_async
+
+def pbs_alterjob(*args):
+  return _pbs.pbs_alterjob(*args)
+pbs_alterjob = _pbs.pbs_alterjob
+
+def pbs_connect(*args):
+  return _pbs.pbs_connect(*args)
+pbs_connect = _pbs.pbs_connect
+
+def pbs_default():
+  return _pbs.pbs_default()
+pbs_default = _pbs.pbs_default
+
+def pbs_fbserver():
+  return _pbs.pbs_fbserver()
+pbs_fbserver = _pbs.pbs_fbserver
+
+def pbs_get_server_list():
+  return _pbs.pbs_get_server_list()
+pbs_get_server_list = _pbs.pbs_get_server_list
+
+def pbs_deljob(*args):
+  return _pbs.pbs_deljob(*args)
+pbs_deljob = _pbs.pbs_deljob
+
+def pbs_disconnect(*args):
+  return _pbs.pbs_disconnect(*args)
+pbs_disconnect = _pbs.pbs_disconnect
+
+def pbs_geterrmsg(*args):
+  return _pbs.pbs_geterrmsg(*args)
+pbs_geterrmsg = _pbs.pbs_geterrmsg
+
+def pbs_holdjob(*args):
+  return _pbs.pbs_holdjob(*args)
+pbs_holdjob = _pbs.pbs_holdjob
+
+def pbs_checkpointjob(*args):
+  return _pbs.pbs_checkpointjob(*args)
+pbs_checkpointjob = _pbs.pbs_checkpointjob
+
+def pbs_locjob(*args):
+  return _pbs.pbs_locjob(*args)
+pbs_locjob = _pbs.pbs_locjob
+
+def pbs_manager(*args):
+  return _pbs.pbs_manager(*args)
+pbs_manager = _pbs.pbs_manager
+
+def pbs_movejob(*args):
+  return _pbs.pbs_movejob(*args)
+pbs_movejob = _pbs.pbs_movejob
+
+def pbs_msgjob(*args):
+  return _pbs.pbs_msgjob(*args)
+pbs_msgjob = _pbs.pbs_msgjob
+
+def pbs_orderjob(*args):
+  return _pbs.pbs_orderjob(*args)
+pbs_orderjob = _pbs.pbs_orderjob
+
+def pbs_rescquery(*args):
+  return _pbs.pbs_rescquery(*args)
+pbs_rescquery = _pbs.pbs_rescquery
+
+def pbs_rescreserve(*args):
+  return _pbs.pbs_rescreserve(*args)
+pbs_rescreserve = _pbs.pbs_rescreserve
+
+def pbs_rescrelease(*args):
+  return _pbs.pbs_rescrelease(*args)
+pbs_rescrelease = _pbs.pbs_rescrelease
+
+def pbs_rerunjob(*args):
+  return _pbs.pbs_rerunjob(*args)
+pbs_rerunjob = _pbs.pbs_rerunjob
+
+def pbs_rlsjob(*args):
+  return _pbs.pbs_rlsjob(*args)
+pbs_rlsjob = _pbs.pbs_rlsjob
+
+def pbs_runjob(*args):
+  return _pbs.pbs_runjob(*args)
+pbs_runjob = _pbs.pbs_runjob
+
+def pbs_selectjob(*args):
+  return _pbs.pbs_selectjob(*args)
+pbs_selectjob = _pbs.pbs_selectjob
+
+def pbs_sigjob(*args):
+  return _pbs.pbs_sigjob(*args)
+pbs_sigjob = _pbs.pbs_sigjob
+
+def pbs_sigjobasync(*args):
+  return _pbs.pbs_sigjobasync(*args)
+pbs_sigjobasync = _pbs.pbs_sigjobasync
+
+def pbs_statfree(*args):
+  return _pbs.pbs_statfree(*args)
+pbs_statfree = _pbs.pbs_statfree
+
+def pbs_statjob(*args):
+  return _pbs.pbs_statjob(*args)
+pbs_statjob = _pbs.pbs_statjob
+
+def pbs_selstat(*args):
+  return _pbs.pbs_selstat(*args)
+pbs_selstat = _pbs.pbs_selstat
+
+def pbs_statque(*args):
+  return _pbs.pbs_statque(*args)
+pbs_statque = _pbs.pbs_statque
+
+def pbs_statserver(*args):
+  return _pbs.pbs_statserver(*args)
+pbs_statserver = _pbs.pbs_statserver
+
+def pbs_statnode(*args):
+  return _pbs.pbs_statnode(*args)
+pbs_statnode = _pbs.pbs_statnode
+
+def pbs_submit(*args):
+  return _pbs.pbs_submit(*args)
+pbs_submit = _pbs.pbs_submit
+
+def pbs_submit_hash(*args):
+  return _pbs.pbs_submit_hash(*args)
+pbs_submit_hash = _pbs.pbs_submit_hash
+
+def pbs_terminate(*args):
+  return _pbs.pbs_terminate(*args)
+pbs_terminate = _pbs.pbs_terminate
+
+def totpool(*args):
+  return _pbs.totpool(*args)
+totpool = _pbs.totpool
+
+def usepool(*args):
+  return _pbs.usepool(*args)
+usepool = _pbs.usepool
+
+def pbs_gpumode(*args):
+  return _pbs.pbs_gpumode(*args)
+pbs_gpumode = _pbs.pbs_gpumode
+
+def trq_set_preferred_network_interface(*args):
+  return _pbs.trq_set_preferred_network_interface(*args)
+trq_set_preferred_network_interface = _pbs.trq_set_preferred_network_interface
+
+def trq_get_if_name():
+  return _pbs.trq_get_if_name()
+trq_get_if_name = _pbs.trq_get_if_name
+
+def pbs_stagein(*args):
+  return _pbs.pbs_stagein(*args)
+pbs_stagein = _pbs.pbs_stagein
+
+def openrm(*args):
+  return _pbs.openrm(*args)
+openrm = _pbs.openrm
+
+def closerm_err(*args):
+  return _pbs.closerm_err(*args)
+closerm_err = _pbs.closerm_err
+
+def closerm(*args):
+  return _pbs.closerm(*args)
+closerm = _pbs.closerm
+
+def downrm(*args):
+  return _pbs.downrm(*args)
+downrm = _pbs.downrm
+
+def configrm(*args):
+  return _pbs.configrm(*args)
+configrm = _pbs.configrm
+
+def addreq_err(*args):
+  return _pbs.addreq_err(*args)
+addreq_err = _pbs.addreq_err
+
+def begin_rm_req(*args):
+  return _pbs.begin_rm_req(*args)
+begin_rm_req = _pbs.begin_rm_req
+
+def addreq(*args):
+  return _pbs.addreq(*args)
+addreq = _pbs.addreq
+
+def allreq(*args):
+  return _pbs.allreq(*args)
+allreq = _pbs.allreq
+
+def getreq_err(*args):
+  return _pbs.getreq_err(*args)
+getreq_err = _pbs.getreq_err
+
+def getreq(*args):
+  return _pbs.getreq(*args)
+getreq = _pbs.getreq
+
+def flushreq():
+  return _pbs.flushreq()
+flushreq = _pbs.flushreq
+
+def activereq():
+  return _pbs.activereq()
+activereq = _pbs.activereq
+
+def fullresp(*args):
+  return _pbs.fullresp(*args)
+fullresp = _pbs.fullresp
+LOG_BUF_SIZE = _pbs.LOG_BUF_SIZE
+LOCAL_LOG_BUF_SIZE = _pbs.LOCAL_LOG_BUF_SIZE
+LOG_EMERG = _pbs.LOG_EMERG
+LOG_ALERT = _pbs.LOG_ALERT
+LOG_CRIT = _pbs.LOG_CRIT
+LOG_ERR = _pbs.LOG_ERR
+LOG_WARNING = _pbs.LOG_WARNING
+LOG_NOTICE = _pbs.LOG_NOTICE
+LOG_INFO = _pbs.LOG_INFO
+LOG_DEBUG = _pbs.LOG_DEBUG
+MAXLINE = _pbs.MAXLINE
+GETV = _pbs.GETV
+SETV = _pbs.SETV
+
+def log_err(*args):
+  return _pbs.log_err(*args)
+log_err = _pbs.log_err
+
+def log_ext(*args):
+  return _pbs.log_ext(*args)
+log_ext = _pbs.log_ext
+
+def log_event(*args):
+  return _pbs.log_event(*args)
+log_event = _pbs.log_event
+
+def log_record(*args):
+  return _pbs.log_record(*args)
+log_record = _pbs.log_record
+
+def log_available(*args):
+  return _pbs.log_available(*args)
+log_available = _pbs.log_available
+PBSEVENT_ERROR = _pbs.PBSEVENT_ERROR
+PBSEVENT_SYSTEM = _pbs.PBSEVENT_SYSTEM
+PBSEVENT_ADMIN = _pbs.PBSEVENT_ADMIN
+PBSEVENT_JOB = _pbs.PBSEVENT_JOB
+PBSEVENT_JOB_USAGE = _pbs.PBSEVENT_JOB_USAGE
+PBSEVENT_SECURITY = _pbs.PBSEVENT_SECURITY
+PBSEVENT_SCHED = _pbs.PBSEVENT_SCHED
+PBSEVENT_DEBUG = _pbs.PBSEVENT_DEBUG
+PBSEVENT_DEBUG2 = _pbs.PBSEVENT_DEBUG2
+PBSEVENT_CLIENTAUTH = _pbs.PBSEVENT_CLIENTAUTH
+PBSEVENT_SYSLOG = _pbs.PBSEVENT_SYSLOG
+PBSEVENT_FORCE = _pbs.PBSEVENT_FORCE
+PBS_EVENTCLASS_SERVER = _pbs.PBS_EVENTCLASS_SERVER
+PBS_EVENTCLASS_QUEUE = _pbs.PBS_EVENTCLASS_QUEUE
+PBS_EVENTCLASS_JOB = _pbs.PBS_EVENTCLASS_JOB
+PBS_EVENTCLASS_REQUEST = _pbs.PBS_EVENTCLASS_REQUEST
+PBS_EVENTCLASS_FILE = _pbs.PBS_EVENTCLASS_FILE
+PBS_EVENTCLASS_ACCT = _pbs.PBS_EVENTCLASS_ACCT
+PBS_EVENTCLASS_NODE = _pbs.PBS_EVENTCLASS_NODE
+PBS_EVENTCLASS_TRQAUTHD = _pbs.PBS_EVENTCLASS_TRQAUTHD
+PBSEVENT_MASK = _pbs.PBSEVENT_MASK
+MAX_PATH_LEN = _pbs.MAX_PATH_LEN
+SECS_PER_DAY = _pbs.SECS_PER_DAY
+TRUE = _pbs.TRUE
+FALSE = _pbs.FALSE
+#  PBS python interface
+#  Author: Bas van der Vlies <basv@sara.nl>
+#  Date  : 27 Feb 2002
+#  Desc. : This is python wrapper class for getting the resource
+#          mom values.
+#
+# CVS info
+# $Id: resmom.py,v 1.6 2002/10/21 14:14:47 sscpbas Exp $
+# $Date: 2002/10/21 14:14:47 $
+# $Revision: 1.6 $
+#
+import string
+import types
+
+# Default linux resources to get from the mom
+#
+default_linux_res = [   
+    "availmem",	    # available memory size in KB
+    "ideal_load",	# static ideal_load value
+    "loadave",      # the current load average
+    "max_load",	    # static max_load value
+    "ncpus",        # number of cpus 
+    "physmem",      # physical memory size in KB
+    "resi",		    # resident memory size for a pid or session in KB
+    "totmem",	    # total memory size in KB
+    "walltime",	    # wall clock time for a pid
+]
+
+# Default irix6 resources to get from the mom
+#
+default_irix6_res = [   
+    "availmem",	# available memory size in KB
+    "loadave",      # the current load average
+    "ncpus",        # number of cpus
+    "physmem",      # physical memory size in KB
+    "resi",		# resident memory size for a pid or session in KB
+    "walltime",	# wall clock time for a pid
+    "quota",	# quota information (sizes in KB)
+]
+
+default_mom_res = [   
+    "arch",		# the architecture of the machine
+    "uname",	# the architecture of the machine
+    "cput",		# cpu time for a pid or session
+    "idletime",	# seconds of idle time
+    "mem",		# memory size for a pid or session in KB
+    "sessions",	# list of sessions in the system
+    "pids",         # list of pids in a session
+    "nsessions",	# number of sessions in the system
+    "nusers",	# number of users in the system
+    "size",		# size of a file or filesystem
+    "host",		# Name  of host on which job should be run 
+    "nodes",	# Number and/or type of nodes to be reserved for exclusive use by the job
+    "other",	# Allows a  user  to  specify  site  specific  information
+    "software",	# Allows a user to specify software required by the job
+]
+
+def check_resp(dict, str):
+  """
+  Check the daemon response. If we have no permission to
+  query the values then we got a 'None' response. Else
+  if we supplied a keyword that does not exits we get a
+  '?' response
+  """
+  if not str:
+    return
+  
+  ## Value can contain the '=' char :-(
+  #  
+  l =  string.split(str, '=')
+  key = string.strip(l[0])
+  if len(l) > 2:
+    val = string.strip( '='.join(l[1:]) )
+  else:
+    val = string.strip(l[1])
+
+  key = string.strip(key)
+  val = string.strip(val)
+
+  # Did we got a valid response
+  #
+  if not val[0] == '?':
+    dict[key] = val
+
+def use_default_keywords(id, d):
+  """
+  Get the default values from the mom daemon
+  """
+  for res in default_mom_res:
+    addreq(id, res)
+    resp = getreq(id)
+    check_resp(d, resp)
+
+  # Do not proceed if we have an empty dictionary
+  #
+  if not d:
+    return
+
+  if d['arch' ] == 'linux':
+    for res in default_linux_res:
+      addreq(id, res)
+      resp = getreq(id)
+      check_resp(d, resp)
+
+def use_user_keywords(id, d, l):
+  for res in l:
+    if type(res) is types.StringType:
+      addreq(id, res)
+      resp = getreq(id)
+      check_resp(d, resp)
+    else:
+      raise TypeError, 'Expected a string got %s :%s' %(type(res), res) 
+
+def get_mom_values(id, list = None):
+  """
+  This function will query the mom with a default resmon keywords
+  and 'arch' depended keywords. Supported archs are:
+    linux
+    irix6
+  User can also supply their own list of keywords as second parameter.
+  arguments:
+    id   : connection number with mom daemon on a node
+    list : optional parameter. If supplied then use this. A list
+           of mom keywords.
+  """
+
+  d = {}
+  if not list:
+    use_default_keywords(id, d)
+  else:
+    use_user_keywords(id, d , list)
+     
+  return d
+
+version_info = ( 4, 4, 1 )
+version = 'SARA pbs_python version 4.4.1'
+
+# A useful dict with error codes to text
+#
+# SVN Info:
+#	$Id: errors.py 429 2005-11-04 13:59:06Z bas $
+#
+errors_txt = { 
+	0 : 'no error',
+	15001 :	 'Unknown Job Identifier',
+	15002 : 'Undefined Attribute',
+	15003 : 'attempt to set READ ONLY attribute',
+	15004 : 'Invalid request',
+	15005 : 'Unknown batch request',
+	15006 : 'Too many submit retries',
+	15007 : 'No permission',
+	15008 : 'access from host not allowed',
+	15009 : 'job already exists',
+	15010 : 'system error occurred',
+	15011 : 'internal server error occurred',
+	15012 : 'parent job of dependent in rte que',
+	15013 : 'unknown signal name',
+	15014 : 'bad attribute value',
+	15015 : 'Cannot modify attrib in run state',
+	15016 : 'request invalid for job state',
+	15018 : 'Unknown queue name',
+	15019 : 'Invalid Credential in request',
+	15020 : 'Expired Credential in request',
+	15021 : 'Queue not enabled',
+	15022 : 'No access permission for queue',
+	15023 : 'Bad user - no password entry',
+	15024 : 'Max hop count exceeded',
+	15025 : 'Queue already exists',
+	15026 : 'incompatable queue attribute type',
+	15027 : 'Queue Busy (not empty)',
+	15028 : 'Queue name too long',
+	15029 : 'Feature',
+	15030 : 'Cannot enable queue,needs add def',
+	15031 : 'Protocol (ASN.1) error',
+	15032 : 'Bad attribute list structure',
+	15033 : 'No free connections',
+	15034 : 'No server to connect to',
+	15035 : 'Unknown resource',
+	15036 : 'Job exceeds Queue resource limits',
+	15037 : 'No Default Queue Defined',
+	15038 : 'Job Not Rerunnable',
+	15039 : 'Route rejected by all destinations',
+	15040 : 'Time in Route Queue Expired',
+	15041 : 'Request to MOM failed',
+	15042 : '(qsub) cannot access script file',
+	15043 : 'Stage In of files failed',
+	15044 : 'Resources temporarily unavailable',
+	15045 : 'Bad Group specified',
+	15046 : 'Max number of jobs in queue',
+	15047 : 'Checkpoint Busy, may be retries',
+	15048 : 'Limit exceeds allowable',
+	15049 : 'Bad Account attribute value',
+	15050 : 'Job already in exit state',
+	15051 : 'Job files not copied',
+	15052 : 'unknown job id after clean init',
+	15053 : 'No Master in Sync Set',
+	15054 : 'Invalid dependency',
+	15055 : 'Duplicate entry in List',
+	15056 : 'Bad DIS based Request Protocol',
+	15057 : 'cannot execute there',
+	15058 : 'sister rejected',
+	15059 : 'sister could not communicate',
+	15060 : 'req rejected -server shutting down',
+	15061 : 'not all tasks could checkpoint',
+	15062 : 'Named node is not in the list',
+	15063 : 'node-attribute not recognized',
+	15064 : 'Server has no node list',
+	15065 : 'Node name is too big',
+	15066 : 'Node name already exists',
+	15067 : 'Bad node-attribute value',
+	15068 : 'State values are mutually exclusive',
+	15069 : 'Error(s) during global modification of nodes',
+	15070 : 'could not contact Mom',
+	15071 : 'no time-shared nodes',
+	15201 : 'resource unknown',
+	15202 : 'parameter could not be used',
+	15203 : 'a parameter needed did not exist',
+	15204 : "something specified didn't exist",
+	15205 : 'a system error occured',
+	15206 : 'only part of reservation made'
+}
+
+def error():
+  """
+  Check if there is an error, if so fetch the error message string. 
+  It says more then a number!
+  """
+  e = get_error()
+  if errors_txt.has_key(e):
+     return (e, errors_txt[e])
+  else:
+     return (e, "Could not find a text for this error, uhhh")
+
+# This file is compatible with both classic and new-style classes.
+
+cvar = _pbs.cvar
+
Index: /tags/4.6.0/src/C++/pbs_error.h
===================================================================
--- /tags/4.6.0/src/C++/pbs_error.h	(revision 342)
+++ /tags/4.6.0/src/C++/pbs_error.h	(revision 342)
@@ -0,0 +1,137 @@
+/*
+*         OpenPBS (Portable Batch System) v2.3 Software License
+*
+* Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+* All rights reserved.
+*
+* ---------------------------------------------------------------------------
+* For a license to use or redistribute the OpenPBS software under conditions
+* other than those described below, or to purchase support for this software,
+* please contact Veridian Systems, PBS Products Department ("Licensor") at:
+*
+*    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+*                        877 902-4PBS (US toll-free)
+* ---------------------------------------------------------------------------
+*
+* This license covers use of the OpenPBS v2.3 software (the "Software") at
+* your site or location, and, for certain users, redistribution of the
+* Software to other sites and locations.  Use and redistribution of
+* OpenPBS v2.3 in source and binary forms, with or without modification,
+* are permitted provided that all of the following conditions are met.
+* After December 31, 2001, only conditions 3-6 must be met:
+*
+* 1. Commercial and/or non-commercial use of the Software is permitted
+*    provided a current software registration is on file at www.OpenPBS.org.
+*    If use of this software contributes to a publication, product, or
+*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
+*
+* 2. Redistribution in any form is only permitted for non-commercial,
+*    non-profit purposes.  There can be no charge for the Software or any
+*    software incorporating the Software.  Further, there can be no
+*    expectation of revenue generated as a consequence of redistributing
+*    the Software.
+*
+* 3. Any Redistribution of source code must retain the above copyright notice
+*    and the acknowledgment contained in paragraph 6, this list of conditions
+*    and the disclaimer contained in paragraph 7.
+*
+* 4. Any Redistribution in binary form must reproduce the above copyright
+*    notice and the acknowledgment contained in paragraph 6, this list of
+*    conditions and the disclaimer contained in paragraph 7 in the
+*    documentation and/or other materials provided with the distribution.
+*
+* 5. Redistributions in any form must be accompanied by information on how to
+*    obtain complete source code for the OpenPBS software and any
+*    modifications and/or additions to the OpenPBS software.  The source code
+*    must either be included in the distribution or be available for no more
+*    than the cost of distribution plus a nominal fee, and all modifications
+*    and additions to the Software must be freely redistributable by any party
+*    (including Licensor) without restriction.
+*
+* 6. All advertising materials mentioning features or use of the Software must
+*    display the following acknowledgment:
+*
+*     "This product includes software developed by NASA Ames Research Center,
+*     Lawrence Livermore National Laboratory, and Veridian Information
+*     Solutions, Inc.
+*     Visit www.OpenPBS.org for OpenPBS software support,
+*     products, and information."
+*
+* 7. DISCLAIMER OF WARRANTY
+*
+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+* ARE EXPRESSLY DISCLAIMED.
+*
+* IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+* U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* This license will be governed by the laws of the Commonwealth of Virginia,
+* without reference to its choice of law rules.
+*/
+
+/*
+ * The error returns possible to a Batch Request
+ *
+ * Each error is prefixed with the string PBSE_ for Portable (Posix)
+ * Batch System Error.  The numeric values start with 15000 since the
+ * POSIX Batch Extensions Working group is 1003.15
+ */
+#ifndef PBSE_
+#include <pbs_constants.h>
+
+#define FALSE 0
+#define TRUE 1
+
+/* pbs error constants generator */
+/** @see pbs_error_db.h */
+enum PBSE_Constants {
+
+#define PbsErrClient(id, txt) id,
+#include "pbs_error_db.h"
+#undef PbsErrClient
+
+#define PbsErrRm(id, txt) id,
+#include "pbs_error_db.h"
+#undef PbsErrRm
+
+PBSE_TOTAL_CEILING
+};
+/* END: pbs error constants generator */
+
+
+#define PBSE_ 15000
+#define PBSE_NONE       0  /* no error */
+#define RM_ERR_UNKNOWN PBSE_RMUNKNOWN
+#define RM_ERR_BADPARAM PBSE_RMBADPARAM
+#define RM_ERR_NOPARAM PBSE_RMNOPARAM
+#define RM_ERR_EXIST PBSE_RMEXIST
+#define RM_ERR_SYSTEM PBSE_RMSYSTEM
+
+#ifndef NULL
+#define NULL (char *)0
+#endif /* NULL */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+extern char *pbse_to_txt(int);
+
+extern char *pbs_strerror(int);
+#ifdef __cplusplus
+}
+#endif
+
+extern int pbs_errno;
+
+#endif  /* END PBSE_ */
+
+
Index: /tags/4.6.0/src/C++/pbs_ifl.h
===================================================================
--- /tags/4.6.0/src/C++/pbs_ifl.h	(revision 342)
+++ /tags/4.6.0/src/C++/pbs_ifl.h	(revision 342)
@@ -0,0 +1,679 @@
+/*
+*         OpenPBS (Portable Batch System) v2.3 Software License
+*
+* Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+* All rights reserved.
+*
+* ---------------------------------------------------------------------------
+* For a license to use or redistribute the OpenPBS software under conditions
+* other than those described below, or to purchase support for this software,
+* please contact Veridian Systems, PBS Products Department ("Licensor") at:
+*
+*    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+*                        877 902-4PBS (US toll-free)
+* ---------------------------------------------------------------------------
+*
+* This license covers use of the OpenPBS v2.3 software (the "Software") at
+* your site or location, and, for certain users, redistribution of the
+* Software to other sites and locations.  Use and redistribution of
+* OpenPBS v2.3 in source and binary forms, with or without modification,
+* are permitted provided that all of the following conditions are met.
+* After December 31, 2001, only conditions 3-6 must be met:
+*
+* 1. Commercial and/or non-commercial use of the Software is permitted
+*    provided a current software registration is on file at www.OpenPBS.org.
+*    If use of this software contributes to a publication, product, or
+*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
+*
+* 2. Redistribution in any form is only permitted for non-commercial,
+*    non-profit purposes.  There can be no charge for the Software or any
+*    software incorporating the Software.  Further, there can be no
+*    expectation of revenue generated as a consequence of redistributing
+*    the Software.
+*
+* 3. Any Redistribution of source code must retain the above copyright notice
+*    and the acknowledgment contained in paragraph 6, this list of conditions
+*    and the disclaimer contained in paragraph 7.
+*
+* 4. Any Redistribution in binary form must reproduce the above copyright
+*    notice and the acknowledgment contained in paragraph 6, this list of
+*    conditions and the disclaimer contained in paragraph 7 in the
+*    documentation and/or other materials provided with the distribution.
+*
+* 5. Redistributions in any form must be accompanied by information on how to
+*    obtain complete source code for the OpenPBS software and any
+*    modifications and/or additions to the OpenPBS software.  The source code
+*    must either be included in the distribution or be available for no more
+*    than the cost of distribution plus a nominal fee, and all modifications
+*    and additions to the Software must be freely redistributable by any party
+*    (including Licensor) without restriction.
+*
+* 6. All advertising materials mentioning features or use of the Software must
+*    display the following acknowledgment:
+*
+*     "This product includes software developed by NASA Ames Research Center,
+*     Lawrence Livermore National Laboratory, and Veridian Information
+*     Solutions, Inc.
+*     Visit www.OpenPBS.org for OpenPBS software support,
+*     products, and information."
+*
+* 7. DISCLAIMER OF WARRANTY
+*
+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+* ARE EXPRESSLY DISCLAIMED.
+*
+* IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+* U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* This license will be governed by the laws of the Commonwealth of Virginia,
+* without reference to its choice of law rules.
+*/
+
+/*
+ *
+ *  pbs_ifl.h
+ *
+ */
+
+#ifndef _PBS_IFL_DEF
+#define _PBS_IFL_DEF
+#include <sys/socket.h>
+
+#include "u_hash_map_structs.h"
+#include "u_memmgr.h"
+
+/* Attribute Names used by user commands */
+
+#define ATTR_a "Execution_Time"
+#define ATTR_c "Checkpoint"
+#define ATTR_e "Error_Path"
+#define ATTR_f "fault_tolerant"
+#define ATTR_g "group_list"
+#define ATTR_h "Hold_Types"
+#define ATTR_j "Join_Path"
+#define ATTR_k "Keep_Files"
+#define ATTR_l "Resource_List"
+#define ATTR_m "Mail_Points"
+#define ATTR_o "Output_Path"
+#define ATTR_p "Priority"
+#define ATTR_q "destination"
+#define ATTR_r "Rerunable"
+#define ATTR_t "job_array_request"
+#define ATTR_array_id "job_array_id"
+#define ATTR_u "User_List"
+#define ATTR_v "Variable_List"
+#define ATTR_A "Account_Name"
+#define ATTR_args "job_arguments"
+#define ATTR_reservation_id "reservation_id"
+#define ATTR_login_node_id "login_node_id"
+#define ATTR_login_prop "login_property"
+#define ATTR_external_nodes "external_nodes"
+#define ATTR_multi_req_alps "multi_req_alps"
+#define ATTR_M "Mail_Users"
+#define ATTR_N "Job_Name"
+#define ATTR_S "Shell_Path_List"
+#define ATTR_depend   "depend"
+#define ATTR_inter    "interactive"
+#define ATTR_stagein  "stagein"
+#define ATTR_stageout "stageout"
+#define ATTR_jobtype  "jobtype"
+#define ATTR_submit_host "submit_host"
+#define ATTR_init_work_dir "init_work_dir"
+/* The following were part of the variable_list */
+#define ATTR_pbs_o_initdir          "PBS_O_INITDIR"
+#define ATTR_pbs_o_rootdir          "PBS_O_ROOTDIR"
+#define ATTR_pbs_o_workdir          "PBS_O_WORKDIR" /* same as init_work_dir */
+#define ATTR_pbs_o_host             "PBS_O_HOST" /* same as submit_host */
+#define ATTR_pbs_o_server           "PBS_O_SERVER"
+#define ATTR_pbs_o_home             "PBS_O_HOME"
+#define ATTR_pbs_o_logname          "PBS_O_LOGNAME"
+#define ATTR_pbs_o_path             "PBS_O_PATH"
+#define ATTR_pbs_o_mail             "PBS_O_MAIL"
+#define ATTR_pbs_o_shell            "PBS_O_SHELL"
+#define ATTR_pbs_o_tz               "PBS_O_TZ"
+#define ATTR_pbs_o_lang             "PBS_O_LANG"
+#define ATTR_pbs_o_uid              "PBS_O_UID"
+#define ATTR_pbs_o_submit_filter    "PBS_O_SUBMIT_FILTER"
+
+/* additional job and general attribute names */
+
+#define ATTR_ctime      "ctime"
+#define ATTR_exechost   "exec_host"
+#define ATTR_execport	"exec_port"
+#define ATTR_mtime      "mtime"
+#define ATTR_qtime      "qtime"
+#define ATTR_session    "session_id"
+#define ATTR_euser      "euser"
+#define ATTR_egroup     "egroup"
+#define ATTR_hashname   "hashname"
+#define ATTR_hopcount   "hop_count"
+#define ATTR_security   "security"
+#define ATTR_sched_hint "sched_hint"
+#define ATTR_substate   "substate"
+#define ATTR_name       "Job_Name"
+#define ATTR_owner      "Job_Owner"
+#define ATTR_used       "resources_used"
+#define ATTR_state      "job_state"
+#define ATTR_queue      "queue"
+#define ATTR_server     "server"
+#define ATTR_maxrun     "max_running"
+#define ATTR_maxreport  "max_report"
+#define ATTR_total      "total_jobs"
+#define ATTR_comment    "comment"
+#define ATTR_cookie     "cookie"
+#define ATTR_qrank      "queue_rank"
+#define ATTR_altid      "alt_id"
+#define ATTR_etime      "etime"
+#define ATTR_exitstat   "exit_status"
+#define ATTR_forwardx11 "forward_x11"
+#define ATTR_submit_args "submit_args"
+#define ATTR_tokens     "tokens"
+#define ATTR_netcounter "net_counter"
+#define ATTR_umask      "umask"
+#define ATTR_start_time "start_time"
+#define ATTR_start_count "start_count"
+#define ATTR_checkpoint_dir  "checkpoint_dir"    /* user specified directory for checkpoint files */
+#define ATTR_checkpoint_name  "checkpoint_name"   /* user specified name of checkpoint file */
+#define ATTR_checkpoint_time  "checkpoint_time"   /* timestamp of start of last checkpoint */
+#define ATTR_checkpoint_restart_status  "checkpoint_restart_status"   /* checkpoint restart status */
+#define ATTR_restart_name	"restart_name"   /* saved name of checkpoint restart file */
+#define ATTR_comp_time   	"comp_time"
+#define ATTR_reported    	"reported"
+#define ATTR_intcmd      	"inter_cmd"
+#define ATTR_job_radix		"job_radix"
+#define ATTR_sister_list	"sister_list"
+#define ATTR_total_runtime  "total_runtime"
+#define ATTR_P           "proxy_user"
+#define ATTR_node_exclusive "node_exclusive"
+#define ATTR_exec_gpus   "exec_gpus"
+#define ATTR_exec_mics   "exec_mics"
+#define ATTR_J           "job_id"
+#define ATTR_pagg         "pagg_id"
+#define ATTR_system_start_time "system_start_time"
+  /* JOB_ATR_gpu_flags */
+#define ATTR_gpu_flags		"gpu_flags"
+
+/* additional queue attributes names */
+
+#define ATTR_aclgren    "acl_group_enable"
+#define ATTR_aclgroup   "acl_groups"
+#define ATTR_aclhten    "acl_host_enable"
+#define ATTR_aclhost    "acl_hosts"
+#define ATTR_acluren    "acl_user_enable"
+#define ATTR_acluser    "acl_users"
+#define ATTR_altrouter  "alt_router"
+#define ATTR_checkpoint_min  "checkpoint_min"
+#define ATTR_checkpoint_defaults  "checkpoint_defaults"
+#define ATTR_enable     "enabled"
+#define ATTR_fromroute  "from_route_only"
+#define ATTR_hostlist    "hostlist"         /* TORQUE only */
+#define ATTR_killdelay   "kill_delay"
+#define ATTR_maxgrprun   "max_group_run"
+#define ATTR_maxque      "max_queuable"
+#define ATTR_maxuserque  "max_user_queuable"
+#define ATTR_maxuserrun  "max_user_run"
+#define ATTR_qtype       "queue_type"
+#define ATTR_rescassn    "resources_assigned"
+#define ATTR_rescdflt    "resources_default"
+#define ATTR_rescmax     "resources_max"
+#define ATTR_rescmin     "resources_min"
+#define ATTR_featreqd    "features_required"
+#define ATTR_req_login_property "required_login_property"
+#define ATTR_rerunnable  "restartable"      /* TORQUE only */
+#define ATTR_rndzretry   "rendezvous_retry"
+#define ATTR_routedest   "route_destinations"
+#define ATTR_routeheld   "route_held_jobs"
+#define ATTR_routewait   "route_waiting_jobs"
+#define ATTR_routeretry  "route_retry_time"
+#define ATTR_routelife   "route_lifetime"
+#define ATTR_rsvexpdt    "reserved_expedite"
+#define ATTR_rsvsync     "reserved_sync"
+#define ATTR_start       "started"
+#define ATTR_count       "state_count"
+#define ATTR_number      "number_jobs"
+#define ATTR_acllogic    "acl_logic_or"
+#define ATTR_aclgrpslpy  "acl_group_sloppy"
+#define ATTR_keepcompleted "keep_completed"
+#define ATTR_disallowedtypes "disallowed_types"
+#define ATTR_is_transit  "is_transit"
+
+/* additional server attributes names */
+
+/* NOTE: steps for adding new attribute described in ??? */
+/*  - create #define ATTR_* in include/pbs_ifl.h
+    - insert SRV_ATR_* in include/server.h
+    - add ATTR_* in include/qmgr_svr_public.h
+    - insert structure in server/svr_attr_def.c
+        NOTE:  structure must be in same relative position as SRV_ATR_*
+    - insert usage code in proper location
+*/
+
+#define ATTR_aclroot     "acl_roots"
+#define ATTR_managers    "managers"
+#define ATTR_dfltque     "default_queue"
+#define ATTR_dispsvrsuffix "display_job_server_suffix"
+#define ATTR_jobsuffixalias "job_suffix_alias"
+#define ATTR_defnode     "default_node"
+#define ATTR_locsvrs     "location_servers"
+#define ATTR_logevents   "log_events"
+#define ATTR_logfile     "log_file"
+#define ATTR_loglevel    "log_level"
+#define ATTR_mailfrom    "mail_from"
+#define ATTR_nodepack    "node_pack"
+#define ATTR_nodesuffix  "node_suffix"
+#define ATTR_operators   "operators"
+#define ATTR_queryother  "query_other_jobs"
+#define ATTR_resccost    "resources_cost"
+#define ATTR_rescavail   "resources_available"
+#define ATTR_schedit     "scheduler_iteration"
+#define ATTR_scheduling  "scheduling"
+#define ATTR_status      "server_state"
+#define ATTR_syscost     "system_cost"
+#define ATTR_pingrate    "node_ping_rate"
+#define ATTR_ndchkrate   "node_check_rate"
+#define ATTR_tcptimeout  "tcp_timeout"
+#define ATTR_jobstatrate "job_stat_rate"
+#define ATTR_polljobs    "poll_jobs"
+#define ATTR_downonerror "down_on_error"
+#define ATTR_disableserveridcheck "disable_server_id_check"
+#define ATTR_jobnanny    "job_nanny"
+#define ATTR_ownerpurge  "owner_purge"
+#define ATTR_qcqlimits   "queue_centric_limits"
+#define ATTR_momjobsync  "mom_job_sync"
+#define ATTR_maildomain  "mail_domain"
+#define ATTR_pbsversion  "pbs_version"
+#define ATTR_submithosts "submit_hosts"
+#define ATTR_allownodesubmit  "allow_node_submit"
+#define ATTR_allowproxyuser   "allow_proxy_user"
+#define ATTR_autonodenp  "auto_node_np"
+#define ATTR_servername  "server_name"
+#define ATTR_logfilemaxsize "log_file_max_size"
+#define ATTR_logfilerolldepth "log_file_roll_depth"
+#define ATTR_logkeepdays  "log_keep_days"
+#define ATTR_nextjobnum   "next_job_number"
+#define ATTR_extraresc    "extra_resc"
+#define ATTR_schedversion "sched_version"
+#define ATTR_acctkeepdays "accounting_keep_days"
+#define ATTR_lockfile "lock_file"
+#define ATTR_credentiallifetime "credential_lifetime"
+#define ATTR_jobmustreport "job_must_report"
+#define ATTR_LockfileUpdateTime "lock_file_update_time"
+#define ATTR_LockfileCheckTime "lock_file_check_time"
+#define ATTR_npdefault  "np_default"
+#define ATTR_clonebatchsize "clone_batch_size"
+#define ATTR_clonebatchdelay "clone_batch_delay"
+#define ATTR_jobstarttimeout "job_start_timeout"
+#define ATTR_jobforcecanceltime "job_force_cancel_time"
+#define ATTR_maxarraysize    "max_job_array_size"
+#define ATTR_maxslotlimit    "max_slot_limit"
+#define ATTR_recordjobinfo   "record_job_info"
+#define ATTR_recordjobscript   "record_job_script"
+#define ATTR_joblogfilemaxsize "job_log_file_max_size"
+#define ATTR_joblogfilerolldepth "job_log_file_roll_depth"
+#define ATTR_joblogkeepdays  "job_log_keep_days"
+#ifdef MUNGE_AUTH
+  #define ATTR_authusers       "authorized_users"
+#endif
+#define ATTR_minthreads          "min_threads"
+#define ATTR_maxthreads          "max_threads"
+#define ATTR_threadidleseconds   "thread_idle_seconds"
+#define ATTR_moabarraycompatible "moab_array_compatible"
+#define ATTR_nomailforce             "no_mail_force"
+#define ATTR_interactivejobscanroam  "interactive_jobs_can_roam" 
+#define ATTR_crayenabled             "cray_enabled"
+#define ATTR_nppcu                   "nppcu"
+#define ATTR_maxuserqueuable         "max_user_queuable"
+#define ATTR_automaticrequeueexitcode "automatic_requeue_exit_code"
+#define ATTR_jobsynctimeout           "job_sync_timeout"
+/* additional node "attributes" names */
+
+#define ATTR_NODE_state            "state"
+#define ATTR_NODE_np               "np"
+#define ATTR_NODE_properties       "properties"
+#define ATTR_NODE_ntype            "ntype"
+#define ATTR_NODE_jobs             "jobs"
+#define ATTR_NODE_status           "status"
+#define ATTR_NODE_note             "note"
+#define ATTR_NODE_mom_port	       "mom_service_port"
+#define ATTR_NODE_mom_rm_port      "mom_manager_port" 
+#define ATTR_NODE_num_node_boards  "num_node_boards"
+#define ATTR_NODE_numa_str         "numa_board_str"
+#define ATTR_NODE_gpus             "gpus"
+#define ATTR_NODE_gpustatus        "gpu_status"
+#define ATTR_NODE_gpus_str         "numa_gpu_node_str"
+#define ATTR_NODE_mics             "mics"
+#define ATTR_NODE_micstatus        "mic_status"
+
+/* notification email formating */
+#define ATTR_mailsubjectfmt "mail_subject_fmt"
+#define ATTR_mailbodyfmt    "mail_body_fmt"
+
+
+/* various attribute values */
+
+#define CHECKPOINT_UNSPECIFIED "u"
+#define NO_HOLD "n"
+#define NO_JOIN "n"
+#define NO_KEEP "n"
+#define MAIL_AT_ABORT "a"
+#define DEFAULT_PRIORITY "0"
+
+
+
+#define ARRAY_RANGE  "array_range=" /* see qdel.c */
+#define DELDELAY     "deldelay=" /* see qdel.c */
+#define DELPURGE     "delpurge="   /* see qdel.c */
+#define DELASYNC     "delasync"   /* see req_delete.c */
+#define PURGECOMP    "purgecomplete="   /* see req_delete.c */
+#define EXECQUEONLY  "exec_queue_only"   /* see req_stat.c */
+#define RERUNFORCE   "force"
+
+#define USER_HOLD   "u"
+#define OTHER_HOLD  "o"
+#define SYSTEM_HOLD "s"
+
+/* node-attribute values (state,ntype) */
+
+#define ND_free          "free"
+#define ND_offline       "offline"
+#define ND_down          "down"
+#define ND_reserve       "reserve"
+#define ND_job_exclusive "job-exclusive"
+#define ND_job_sharing   "job-sharing"
+#define ND_busy          "busy"
+#define ND_state_unknown "state-unknown"
+
+/* these are not state values, they describe states and are used in pbsnodes */
+/* active = job-exclusive, job-sharing, or busy */
+#define ND_active        "active"
+/* all = all */
+#define ND_all           "all"
+/* up = job-execlusive, job-sharing, reserve, free, busy and time-shared */
+#define ND_up            "up"
+
+/* this specifies the type of node */
+#define ND_timeshared    "time-shared"
+#define ND_cluster       "cluster"
+
+/* queue disallowed types */
+#define Q_DT_batch              "batch"
+#define Q_DT_interactive        "interactive"
+#define Q_DT_rerunable          "rerunable"
+#define Q_DT_nonrerunable       "nonrerunable"
+#define Q_DT_fault_tolerant     "fault_tolerant"
+#define Q_DT_fault_intolerant   "fault_intolerant"
+#define Q_DT_job_array          "job_array"
+
+/*constant related to sum of string lengths for above strings*/
+#define MAX_ENCODE_BFR  150
+
+#define MGR_CMD_CREATE 0
+#define MGR_CMD_DELETE 1
+#define MGR_CMD_SET 2
+#define MGR_CMD_UNSET 3
+#define MGR_CMD_LIST 4
+#define MGR_CMD_PRINT 5
+#define MGR_CMD_ACTIVE 6
+
+#define MGR_OBJ_NONE -1
+#define MGR_OBJ_SERVER  0
+#define MGR_OBJ_QUEUE   1
+#define MGR_OBJ_JOB 2
+#define MGR_OBJ_NODE 3
+
+/* Misc defines for various requests */
+
+#define MSG_OUT 1
+#define MSG_ERR 2
+
+#define SHUT_SIG -1
+#define SHUT_IMMEDIATE 0
+#define SHUT_DELAY 1
+#define SHUT_QUICK 2
+
+#define SIG_RESUME "resume"
+#define SIG_SUSPEND "suspend"
+
+
+/* WARNING: be careful changing these PBS_MAX* values.  They can result in a
+   change in the structure of the .JB file, and binary incompatibilities between
+   versions of TORQUE.  Do not change in a -fixes branch, avoid changing in
+   a minor release if possible */
+
+
+
+#define PBS_MAXHOSTNAME  1024 /* max host name length */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN  1024 /* max path name length */
+#endif
+
+#ifndef MAXPORTLEN
+#define MAXPORTLEN  5
+#endif
+
+#ifndef MAXNAMLEN
+#define MAXNAMLEN  255
+#endif
+#define MAX_NOTE  256 /* max node note length */
+#define MAX_NOTE_STR  "256" /* max node note length as a string literal (this MUST match MAX_NOTE) */
+
+#define PBS_MAXUSER  32 /* max user name length */
+#define PBS_MAXGRPN  16 /* max group name length */
+#define PBS_MAXGPUID 16 /* max gpu id length */
+#define PBS_MAXQUEUENAME 15 /* max queue name length */
+#define PBS_MAXSERVERNAME PBS_MAXHOSTNAME /* max server name length */
+#define PBS_MAXJOBARRAYLEN      7       /* number of characters allowed in jobarray portion of job id, including '[]' */
+#ifdef USE_MAXINT_JOBIDS
+#define PBS_MAXSEQNUM  12 /* max sequence number length */
+#else
+#define PBS_MAXSEQNUM  8 /* max sequence number length */
+#endif
+#define PBS_MAXPORTNUM  5 /* udp/tcp port numbers max=16 bits */
+#define PBS_MAXJOBARRAY  99999
+#define PBS_MAXSVRJOBID  (PBS_MAXSEQNUM + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + PBS_MAXJOBARRAYLEN + 2 ) /* server job id size */
+#define PBS_MAXCLTJOBID  (PBS_MAXSVRJOBID + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + PBS_MAXJOBARRAYLEN + 2) /* client job id size */
+#define PBS_MAXDEST  1024  /* destination size -- increased from 256 */
+#define PBS_MAXROUTEDEST (PBS_MAXQUEUENAME + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* destination size */
+#define PBS_USE_IFF  1 /* pbs_connect() to call pbs_iff */
+#define PBS_INTERACTIVE  1 /* Support of Interactive jobs */
+#define PBS_TERM_BUF_SZ  80 /* Interactive term buffer size */
+#define PBS_TERM_CCA  6 /* Interactive term cntl char array */
+
+#define PBS_MAXCREDENTIAL_LEN 2048 /* Maximum authentication credential length. */
+/* constants used to indicate version of job ji_qs struct written to disk.
+   starting with 2.4.0 we stopped encoding the torque version number into the
+   hex value e.g. 0x00020300 for torque v2.3.0. Now we just increment a value
+   which is added to the last version encoded that way */
+#define PBS_QS_VERSION_BASE 0x00020300 /* magic number do not change */
+#define PBS_QS_VERSION_INT 2 /* increment this version number with every change to the ji_qs struct */
+#define PBS_QS_VERSION  (PBS_QS_VERSION_BASE + PBS_QS_VERSION_INT) /* version number saved in the ji_qs struct */
+
+/* someday the PBS_*_PORT definition will go away and only the */
+/* PBS_*_SERVICE_NAME form will be used, maybe   */
+
+#define PBS_BATCH_SERVICE_NAME  "pbs"
+
+#ifndef PBS_BATCH_SERVICE_PORT
+#define PBS_BATCH_SERVICE_PORT  15001
+#endif /* PBS_BATCH_SERVICE_PORT */
+
+#define PBS_BATCH_SERVICE_NAME_DIS "pbs_dis" /* new DIS port   */
+
+#define PBS_MOM_SERVICE_NAME  "pbs_mom"
+
+#ifndef PBS_MOM_SERVICE_PORT
+#define PBS_MOM_SERVICE_PORT  15002
+#endif /* PBS_MOM_SERVICE_PORT */
+
+#define PBS_MANAGER_SERVICE_NAME "pbs_resmon"
+
+#ifndef PBS_MANAGER_SERVICE_PORT
+#define PBS_MANAGER_SERVICE_PORT 15003
+#endif /* PBS_MANAGER_SERVICE_PORT */
+
+#define PBS_SCHEDULER_SERVICE_NAME "pbs_sched"
+
+#ifndef PBS_SCHEDULER_SERVICE_PORT
+#define PBS_SCHEDULER_SERVICE_PORT 15004
+#endif /* PBS_SCHEDULER_SERVICE_PORT */
+
+#ifndef TRQ_AUTHD_SERVICE_PORT
+#define TRQ_AUTHD_SERVICE_PORT 15005
+#endif /* TRQ_AUTHD_SERVICE_PORT */
+
+/*
+ * Other misc checkpoint defines
+ */
+#define CHECKPOINTHOLD "checkpoint_hold"
+#define CHECKPOINTCONT "checkpoint_cont"
+#define MOM_DEFAULT_CHECKPOINT_DIR "$MOMDEFAULTCHECKPOINTDIR$"
+
+#define NO_MOM_RELAY 1
+
+enum batch_op { SET, UNSET, INCR, DECR, EQ, NE, GE, GT, LE, LT, DFLT, MERGE, INCR_OLD };
+
+/* ALPS nppcu values */
+enum nppcu_values { NPPCU_ALPS_CHOOSES = 0, NPPCU_NO_USE_HT, NPPCU_USE_HT };
+
+/*
+** This structure is identical to attropl so they can be used
+** interchangably.  The op field is not used.
+*/
+
+struct attrl
+  {
+
+  struct attrl  *next;
+  char          *name;
+  char          *resource;
+  char          *value;
+  enum batch_op  op; /* not used */
+  };
+
+struct attropl
+  {
+
+  struct attropl *next;
+  char   *name;
+  char   *resource;
+  char   *value;
+  enum batch_op   op;
+  };
+
+struct batch_status
+  {
+
+  struct batch_status *next;
+  char                *name;
+
+  struct attrl        *attribs;
+  char                *text;
+  };
+
+
+
+
+/* Resource Reservation Information */
+typedef int resource_t;  /* resource reservation handle */
+
+#define RESOURCE_T_NULL  (resource_t)0
+#define RESOURCE_T_ALL  (resource_t)-1
+
+extern char *pbs_server; /* server attempted to connect | connected to */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* see pbs_connect(3B)         */
+
+char *avail(int connect, char *resc);
+int pbs_asyrunjob(int c, char *jobid, char *location, char *extend);
+int pbs_alterjob_async(int connect, char *job_id, struct attrl *ATTRL, char *extend);
+int pbs_alterjob(int connect, char *job_id, struct attrl *ATTRL, char *extend);
+int pbs_connect(char *server);
+/* HvB
+int pbs_query_max_connections();
+*/
+char *pbs_default(void);
+char *pbs_fbserver(void);
+char *pbs_get_server_list(void);
+
+int pbs_deljob(int connect, char *job_id, char *extend);
+int pbs_disconnect(int connect);
+char *pbs_geterrmsg(int connect);
+int pbs_holdjob(int connect, char *job_id, char *hold_type, char *extend);
+int pbs_checkpointjob(int connect, char *job_id, char *extend);
+char *pbs_locjob(int connect, char *job_id, char *extend);
+
+int pbs_manager(int connect, int command, int obj_type, char *obj_name, struct attropl *ATTROPL, char *extend);
+
+int pbs_movejob(int connect, char *job_id, char *destination, char *extend);
+
+int pbs_msgjob(int connect, char *job_id, int file, char *message, char *extend);
+
+int pbs_orderjob(int connect, char *job1, char *job2, char *extend);
+
+int pbs_rescquery(int connect, char **rlist, int nresc, int *avail,
+                    int *alloc, int *resv, int *down);
+
+int pbs_rescreserve(int connect, char **rlist, int nresc, resource_t *phandle);
+
+int pbs_rescrelease(int connect, resource_t rhandle);
+
+int pbs_rerunjob(int connect, char *job_id, char *extend);
+
+int pbs_rlsjob(int connect, char *job_id, char *hold_type, char *extend);
+
+int pbs_runjob(int connect, char *jobid, char *loc, char *extend);
+
+char **pbs_selectjob(int connect, struct attropl *ATTROPL, char *extend);
+
+int pbs_sigjob(int connect, char *job_id, char *signal, char *extend);
+
+int pbs_sigjobasync(int connect, char *job_id, char *signal, char *extend);
+
+void pbs_statfree(struct batch_status *BATCH_STATUS);
+
+struct batch_status *pbs_statjob(int connect, char *id, struct attrl *ATTRL, char *extend);
+
+struct batch_status *pbs_selstat(int connect, struct attropl *ATTROPL, char *extend);
+
+struct batch_status *pbs_statque(int connect, char *id, struct attrl *ATTRL, char *extend);
+
+struct batch_status *pbs_statserver(int connect, struct attrl *ATTRL, char *extend);
+
+struct batch_status *pbs_statnode(int connect, char *id, struct attrl *ATTRL, char *extend);
+
+char *pbs_submit(int connect, struct attropl *ATTROPL, char *script, char *destination, char *extend);
+
+int pbs_submit_hash(int connect, memmgr **mm, job_data *job_attr, job_data *res_attr, char *script, char *destination, char *extend, char **job_id, char **msg);
+
+int pbs_terminate(int connect, int manner, char *extend);
+
+int totpool(int connect, int update);
+
+int usepool(int connect, int update);
+
+int pbs_gpumode(int connect, char *node, char *gpuid, int gpumode);
+
+int trq_set_preferred_network_interface(char *if_name, struct sockaddr *preferred_addr);
+char *trq_get_if_name(void);
+
+/* used by Moab */
+int pbs_stagein(int, char *, char *, char *);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _PBS_IFL_DEF */
+
+/*  end of pbs_ifl.h  */
Index: /tags/4.6.0/src/C++/pbs_wrap.cxx
===================================================================
--- /tags/4.6.0/src/C++/pbs_wrap.cxx	(revision 342)
+++ /tags/4.6.0/src/C++/pbs_wrap.cxx	(revision 342)
@@ -0,0 +1,9574 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.7
+ * 
+ * This file is not intended to be easily readable and contains a number of 
+ * coding conventions designed to improve portability and efficiency. Do not make
+ * changes to this file unless you know what you are doing--modify the SWIG 
+ * interface file instead. 
+ * ----------------------------------------------------------------------------- */
+
+#define SWIGPYTHON
+#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+
+/* -----------------------------------------------------------------------------
+ *  This section contains generic SWIG labels for method/variable
+ *  declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+#  define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+#   define SWIGINLINE inline
+# else
+#   define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define SWIGUNUSED __attribute__ ((__unused__)) 
+#   else
+#     define SWIGUNUSED
+#   endif
+# elif defined(__ICC)
+#   define SWIGUNUSED __attribute__ ((__unused__)) 
+# else
+#   define SWIGUNUSED 
+# endif
+#endif
+
+#ifndef SWIG_MSC_UNSUPPRESS_4505
+# if defined(_MSC_VER)
+#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
+# endif 
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+#   define SWIGUNUSEDPARM(p)
+# else
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#  ifndef GCC_HASCLASSVISIBILITY
+#    define GCC_HASCLASSVISIBILITY
+#  endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define SWIGEXPORT
+#   else
+#     define SWIGEXPORT __declspec(dllexport)
+#   endif
+# else
+#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+#     define SWIGEXPORT __attribute__ ((visibility("default")))
+#   else
+#     define SWIGEXPORT
+#   endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   define SWIGSTDCALL __stdcall
+# else
+#   define SWIGSTDCALL
+# endif 
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
+
+/* Python.h has to appear first */
+#include <Python.h>
+
+/* -----------------------------------------------------------------------------
+ * swigrun.swg
+ *
+ * This file contains generic C API SWIG runtime support for pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* This should only be incremented when either the layout of swig_type_info changes,
+   or for whatever reason, the runtime changes incompatibly */
+#define SWIG_RUNTIME_VERSION "4"
+
+/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
+#ifdef SWIG_TYPE_TABLE
+# define SWIG_QUOTE_STRING(x) #x
+# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
+# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
+#else
+# define SWIG_TYPE_TABLE_NAME
+#endif
+
+/*
+  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
+  creating a static or dynamic library from the SWIG runtime code.
+  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
+  
+  But only do this if strictly necessary, ie, if you have problems
+  with your compiler or suchlike.
+*/
+
+#ifndef SWIGRUNTIME
+# define SWIGRUNTIME SWIGINTERN
+#endif
+
+#ifndef SWIGRUNTIMEINLINE
+# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
+#endif
+
+/*  Generic buffer size */
+#ifndef SWIG_BUFFER_SIZE
+# define SWIG_BUFFER_SIZE 1024
+#endif
+
+/* Flags for pointer conversions */
+#define SWIG_POINTER_DISOWN        0x1
+#define SWIG_CAST_NEW_MEMORY       0x2
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_OWN           0x1
+
+
+/* 
+   Flags/methods for returning states.
+   
+   The SWIG conversion methods, as ConvertPtr, return an integer 
+   that tells if the conversion was successful or not. And if not,
+   an error code can be returned (see swigerrors.swg for the codes).
+   
+   Use the following macros/flags to set or process the returning
+   states.
+   
+   In old versions of SWIG, code such as the following was usually written:
+
+     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
+       // success code
+     } else {
+       //fail code
+     }
+
+   Now you can be more explicit:
+
+    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+    } else {
+      // fail code
+    }
+
+   which is the same really, but now you can also do
+
+    Type *ptr;
+    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+      if (SWIG_IsNewObj(res) {
+        ...
+	delete *ptr;
+      } else {
+        ...
+      }
+    } else {
+      // fail code
+    }
+    
+   I.e., now SWIG_ConvertPtr can return new objects and you can
+   identify the case and take care of the deallocation. Of course that
+   also requires SWIG_ConvertPtr to return new result values, such as
+
+      int SWIG_ConvertPtr(obj, ptr,...) {         
+        if (<obj is ok>) {			       
+          if (<need new object>) {		       
+            *ptr = <ptr to new allocated object>; 
+            return SWIG_NEWOBJ;		       
+          } else {				       
+            *ptr = <ptr to old object>;	       
+            return SWIG_OLDOBJ;		       
+          } 				       
+        } else {				       
+          return SWIG_BADOBJ;		       
+        }					       
+      }
+
+   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
+   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
+   SWIG errors code.
+
+   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
+   allows to return the 'cast rank', for example, if you have this
+
+       int food(double)
+       int fooi(int);
+
+   and you call
+ 
+      food(1)   // cast rank '1'  (1 -> 1.0)
+      fooi(1)   // cast rank '0'
+
+   just use the SWIG_AddCast()/SWIG_CheckState()
+*/
+
+#define SWIG_OK                    (0) 
+#define SWIG_ERROR                 (-1)
+#define SWIG_IsOK(r)               (r >= 0)
+#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
+
+/* The CastRankLimit says how many bits are used for the cast rank */
+#define SWIG_CASTRANKLIMIT         (1 << 8)
+/* The NewMask denotes the object was created (using new/malloc) */
+#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
+/* The TmpMask is for in/out typemaps that use temporal objects */
+#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
+/* Simple returning values */
+#define SWIG_BADOBJ                (SWIG_ERROR)
+#define SWIG_OLDOBJ                (SWIG_OK)
+#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
+#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
+/* Check, add and del mask methods */
+#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
+#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
+#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
+#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
+#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
+#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
+
+/* Cast-Rank Mode */
+#if defined(SWIG_CASTRANK_MODE)
+#  ifndef SWIG_TypeRank
+#    define SWIG_TypeRank             unsigned long
+#  endif
+#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
+#    define SWIG_MAXCASTRANK          (2)
+#  endif
+#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
+#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
+SWIGINTERNINLINE int SWIG_AddCast(int r) { 
+  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
+}
+SWIGINTERNINLINE int SWIG_CheckState(int r) { 
+  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
+}
+#else /* no cast-rank mode */
+#  define SWIG_AddCast
+#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
+#endif
+
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *(*swig_converter_func)(void *, int *);
+typedef struct swig_type_info *(*swig_dycast_func)(void **);
+
+/* Structure to store information on one type */
+typedef struct swig_type_info {
+  const char             *name;			/* mangled name of this type */
+  const char             *str;			/* human readable name of this type */
+  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
+  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
+  void                   *clientdata;		/* language specific type data */
+  int                    owndata;		/* flag if the structure owns the clientdata */
+} swig_type_info;
+
+/* Structure to store a type and conversion function used for casting */
+typedef struct swig_cast_info {
+  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
+  swig_converter_func     converter;		/* function to cast the void pointers */
+  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
+  struct swig_cast_info  *prev;			/* pointer to the previous cast */
+} swig_cast_info;
+
+/* Structure used to store module information
+ * Each module generates one structure like this, and the runtime collects
+ * all of these structures and stores them in a circularly linked list.*/
+typedef struct swig_module_info {
+  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
+  size_t                 size;		        /* Number of types in this module */
+  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
+  swig_type_info         **type_initial;	/* Array of initially generated type structures */
+  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
+  void                    *clientdata;		/* Language specific module data */
+} swig_module_info;
+
+/* 
+  Compare two type names skipping the space characters, therefore
+  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
+
+  Return 0 when the two name types are equivalent, as in
+  strncmp, but skipping ' '.
+*/
+SWIGRUNTIME int
+SWIG_TypeNameComp(const char *f1, const char *l1,
+		  const char *f2, const char *l2) {
+  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
+    while ((*f1 == ' ') && (f1 != l1)) ++f1;
+    while ((*f2 == ' ') && (f2 != l2)) ++f2;
+    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
+  }
+  return (int)((l1 - f1) - (l2 - f2));
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if not equal, 1 if equal
+*/
+SWIGRUNTIME int
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
+*/
+SWIGRUNTIME int
+SWIG_TypeCompare(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+
+/*
+  Check the typename
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheck(const char *c, swig_type_info *ty) {
+  if (ty) {
+    swig_cast_info *iter = ty->cast;
+    while (iter) {
+      if (strcmp(iter->type->name, c) == 0) {
+        if (iter == ty->cast)
+          return iter;
+        /* Move iter to the top of the linked list */
+        iter->prev->next = iter->next;
+        if (iter->next)
+          iter->next->prev = iter->prev;
+        iter->next = ty->cast;
+        iter->prev = 0;
+        if (ty->cast) ty->cast->prev = iter;
+        ty->cast = iter;
+        return iter;
+      }
+      iter = iter->next;
+    }
+  }
+  return 0;
+}
+
+/* 
+  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
+  if (ty) {
+    swig_cast_info *iter = ty->cast;
+    while (iter) {
+      if (iter->type == from) {
+        if (iter == ty->cast)
+          return iter;
+        /* Move iter to the top of the linked list */
+        iter->prev->next = iter->next;
+        if (iter->next)
+          iter->next->prev = iter->prev;
+        iter->next = ty->cast;
+        iter->prev = 0;
+        if (ty->cast) ty->cast->prev = iter;
+        ty->cast = iter;
+        return iter;
+      }
+      iter = iter->next;
+    }
+  }
+  return 0;
+}
+
+/*
+  Cast a pointer up an inheritance hierarchy
+*/
+SWIGRUNTIMEINLINE void *
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
+}
+
+/* 
+   Dynamic pointer casting. Down an inheritance hierarchy
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
+  swig_type_info *lastty = ty;
+  if (!ty || !ty->dcast) return ty;
+  while (ty && (ty->dcast)) {
+    ty = (*ty->dcast)(ptr);
+    if (ty) lastty = ty;
+  }
+  return lastty;
+}
+
+/*
+  Return the name associated with this type
+*/
+SWIGRUNTIMEINLINE const char *
+SWIG_TypeName(const swig_type_info *ty) {
+  return ty->name;
+}
+
+/*
+  Return the pretty name associated with this type,
+  that is an unmangled type name in a form presentable to the user.
+*/
+SWIGRUNTIME const char *
+SWIG_TypePrettyName(const swig_type_info *type) {
+  /* The "str" field contains the equivalent pretty names of the
+     type, separated by vertical-bar characters.  We choose
+     to print the last name, as it is often (?) the most
+     specific. */
+  if (!type) return NULL;
+  if (type->str != NULL) {
+    const char *last_name = type->str;
+    const char *s;
+    for (s = type->str; *s; s++)
+      if (*s == '|') last_name = s+1;
+    return last_name;
+  }
+  else
+    return type->name;
+}
+
+/* 
+   Set the clientdata field for a type
+*/
+SWIGRUNTIME void
+SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+  swig_cast_info *cast = ti->cast;
+  /* if (ti->clientdata == clientdata) return; */
+  ti->clientdata = clientdata;
+  
+  while (cast) {
+    if (!cast->converter) {
+      swig_type_info *tc = cast->type;
+      if (!tc->clientdata) {
+	SWIG_TypeClientData(tc, clientdata);
+      }
+    }    
+    cast = cast->next;
+  }
+}
+SWIGRUNTIME void
+SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
+  SWIG_TypeClientData(ti, clientdata);
+  ti->owndata = 1;
+}
+  
+/*
+  Search for a swig_type_info structure only by mangled name
+  Search is a O(log #types)
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_MangledTypeQueryModule(swig_module_info *start, 
+                            swig_module_info *end, 
+		            const char *name) {
+  swig_module_info *iter = start;
+  do {
+    if (iter->size) {
+      register size_t l = 0;
+      register size_t r = iter->size - 1;
+      do {
+	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
+	register size_t i = (l + r) >> 1; 
+	const char *iname = iter->types[i]->name;
+	if (iname) {
+	  register int compare = strcmp(name, iname);
+	  if (compare == 0) {	    
+	    return iter->types[i];
+	  } else if (compare < 0) {
+	    if (i) {
+	      r = i - 1;
+	    } else {
+	      break;
+	    }
+	  } else if (compare > 0) {
+	    l = i + 1;
+	  }
+	} else {
+	  break; /* should never happen */
+	}
+      } while (l <= r);
+    }
+    iter = iter->next;
+  } while (iter != end);
+  return 0;
+}
+
+/*
+  Search for a swig_type_info structure for either a mangled name or a human readable name.
+  It first searches the mangled names of the types, which is a O(log #types)
+  If a type is not found it then searches the human readable names, which is O(#types).
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeQueryModule(swig_module_info *start, 
+                     swig_module_info *end, 
+		     const char *name) {
+  /* STEP 1: Search the name field using binary search */
+  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
+  if (ret) {
+    return ret;
+  } else {
+    /* STEP 2: If the type hasn't been found, do a complete search
+       of the str field (the human readable name) */
+    swig_module_info *iter = start;
+    do {
+      register size_t i = 0;
+      for (; i < iter->size; ++i) {
+	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
+	  return iter->types[i];
+      }
+      iter = iter->next;
+    } while (iter != end);
+  }
+  
+  /* neither found a match */
+  return 0;
+}
+
+/* 
+   Pack binary data into a string
+*/
+SWIGRUNTIME char *
+SWIG_PackData(char *c, void *ptr, size_t sz) {
+  static const char hex[17] = "0123456789abcdef";
+  register const unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu =  u + sz;
+  for (; u != eu; ++u) {
+    register unsigned char uu = *u;
+    *(c++) = hex[(uu & 0xf0) >> 4];
+    *(c++) = hex[uu & 0xf];
+  }
+  return c;
+}
+
+/* 
+   Unpack binary data from a string
+*/
+SWIGRUNTIME const char *
+SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
+  register unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu = u + sz;
+  for (; u != eu; ++u) {
+    register char d = *(c++);
+    register unsigned char uu;
+    if ((d >= '0') && (d <= '9'))
+      uu = ((d - '0') << 4);
+    else if ((d >= 'a') && (d <= 'f'))
+      uu = ((d - ('a'-10)) << 4);
+    else 
+      return (char *) 0;
+    d = *(c++);
+    if ((d >= '0') && (d <= '9'))
+      uu |= (d - '0');
+    else if ((d >= 'a') && (d <= 'f'))
+      uu |= (d - ('a'-10));
+    else 
+      return (char *) 0;
+    *u = uu;
+  }
+  return c;
+}
+
+/* 
+   Pack 'void *' into a string buffer.
+*/
+SWIGRUNTIME char *
+SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
+  char *r = buff;
+  if ((2*sizeof(void *) + 2) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,&ptr,sizeof(void *));
+  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
+  strcpy(r,name);
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      *ptr = (void *) 0;
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sizeof(void *));
+}
+
+SWIGRUNTIME char *
+SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
+  char *r = buff;
+  size_t lname = (name ? strlen(name) : 0);
+  if ((2*sz + 2 + lname) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,ptr,sz);
+  if (lname) {
+    strncpy(r,name,lname+1);
+  } else {
+    *r = 0;
+  }
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      memset(ptr,0,sz);
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sz);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/*  Errors in SWIG */
+#define  SWIG_UnknownError    	   -1 
+#define  SWIG_IOError        	   -2 
+#define  SWIG_RuntimeError   	   -3 
+#define  SWIG_IndexError     	   -4 
+#define  SWIG_TypeError      	   -5 
+#define  SWIG_DivisionByZero 	   -6 
+#define  SWIG_OverflowError  	   -7 
+#define  SWIG_SyntaxError    	   -8 
+#define  SWIG_ValueError     	   -9 
+#define  SWIG_SystemError    	   -10
+#define  SWIG_AttributeError 	   -11
+#define  SWIG_MemoryError    	   -12 
+#define  SWIG_NullReferenceError   -13
+
+
+
+/* Compatibility macros for Python 3 */
+#if PY_VERSION_HEX >= 0x03000000
+
+#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
+#define PyInt_Check(x) PyLong_Check(x)
+#define PyInt_AsLong(x) PyLong_AsLong(x)
+#define PyInt_FromLong(x) PyLong_FromLong(x)
+#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
+#define PyString_Check(name) PyBytes_Check(name)
+#define PyString_FromString(x) PyUnicode_FromString(x)
+#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
+#define PyString_AsString(str) PyBytes_AsString(str)
+#define PyString_Size(str) PyBytes_Size(str)	
+#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
+#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
+#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
+#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
+
+#endif
+
+#ifndef Py_TYPE
+#  define Py_TYPE(op) ((op)->ob_type)
+#endif
+
+/* SWIG APIs for compatibility of both Python 2 & 3 */
+
+#if PY_VERSION_HEX >= 0x03000000
+#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
+#else
+#  define SWIG_Python_str_FromFormat PyString_FromFormat
+#endif
+
+
+/* Warning: This function will allocate a new string in Python 3,
+ * so please call SWIG_Python_str_DelForPy3(x) to free the space.
+ */
+SWIGINTERN char*
+SWIG_Python_str_AsChar(PyObject *str)
+{
+#if PY_VERSION_HEX >= 0x03000000
+  char *cstr;
+  char *newstr;
+  Py_ssize_t len;
+  str = PyUnicode_AsUTF8String(str);
+  PyBytes_AsStringAndSize(str, &cstr, &len);
+  newstr = (char *) malloc(len+1);
+  memcpy(newstr, cstr, len+1);
+  Py_XDECREF(str);
+  return newstr;
+#else
+  return PyString_AsString(str);
+#endif
+}
+
+#if PY_VERSION_HEX >= 0x03000000
+#  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
+#else
+#  define SWIG_Python_str_DelForPy3(x) 
+#endif
+
+
+SWIGINTERN PyObject*
+SWIG_Python_str_FromChar(const char *c)
+{
+#if PY_VERSION_HEX >= 0x03000000
+  return PyUnicode_FromString(c); 
+#else
+  return PyString_FromString(c);
+#endif
+}
+
+/* Add PyOS_snprintf for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
+#  define PyOS_snprintf _snprintf
+# else
+#  define PyOS_snprintf snprintf
+# endif
+#endif
+
+/* A crude PyString_FromFormat implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+
+#ifndef SWIG_PYBUFFER_SIZE
+# define SWIG_PYBUFFER_SIZE 1024
+#endif
+
+static PyObject *
+PyString_FromFormat(const char *fmt, ...) {
+  va_list ap;
+  char buf[SWIG_PYBUFFER_SIZE * 2];
+  int res;
+  va_start(ap, fmt);
+  res = vsnprintf(buf, sizeof(buf), fmt, ap);
+  va_end(ap);
+  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
+}
+#endif
+
+/* Add PyObject_Del for old Pythons */
+#if PY_VERSION_HEX < 0x01060000
+# define PyObject_Del(op) PyMem_DEL((op))
+#endif
+#ifndef PyObject_DEL
+# define PyObject_DEL PyObject_Del
+#endif
+
+/* A crude PyExc_StopIteration exception for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# ifndef PyExc_StopIteration
+#  define PyExc_StopIteration PyExc_RuntimeError
+# endif
+# ifndef PyObject_GenericGetAttr
+#  define PyObject_GenericGetAttr 0
+# endif
+#endif
+
+/* Py_NotImplemented is defined in 2.1 and up. */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef Py_NotImplemented
+#  define Py_NotImplemented PyExc_RuntimeError
+# endif
+#endif
+
+/* A crude PyString_AsStringAndSize implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef PyString_AsStringAndSize
+#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
+# endif
+#endif
+
+/* PySequence_Size for old Pythons */
+#if PY_VERSION_HEX < 0x02000000
+# ifndef PySequence_Size
+#  define PySequence_Size PySequence_Length
+# endif
+#endif
+
+/* PyBool_FromLong for old Pythons */
+#if PY_VERSION_HEX < 0x02030000
+static
+PyObject *PyBool_FromLong(long ok)
+{
+  PyObject *result = ok ? Py_True : Py_False;
+  Py_INCREF(result);
+  return result;
+}
+#endif
+
+/* Py_ssize_t for old Pythons */
+/* This code is as recommended by: */
+/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+# define PY_SSIZE_T_MAX INT_MAX
+# define PY_SSIZE_T_MIN INT_MIN
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+typedef intintargfunc ssizessizeargfunc;
+typedef intobjargproc ssizeobjargproc;
+typedef intintobjargproc ssizessizeobjargproc;
+typedef getreadbufferproc readbufferproc;
+typedef getwritebufferproc writebufferproc;
+typedef getsegcountproc segcountproc;
+typedef getcharbufferproc charbufferproc;
+static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
+{
+  long result = 0;
+  PyObject *i = PyNumber_Int(x);
+  if (i) {
+    result = PyInt_AsLong(i);
+    Py_DECREF(i);
+  }
+  return result;
+}
+#endif
+
+#if PY_VERSION_HEX < 0x02040000
+#define Py_VISIT(op)				\
+  do { 						\
+    if (op) {					\
+      int vret = visit((op), arg);		\
+      if (vret)					\
+        return vret;				\
+    }						\
+  } while (0)
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef struct {
+  PyTypeObject type;
+  PyNumberMethods as_number;
+  PyMappingMethods as_mapping;
+  PySequenceMethods as_sequence;
+  PyBufferProcs as_buffer;
+  PyObject *name, *slots;
+} PyHeapTypeObject;
+#endif
+
+#if PY_VERSION_HEX < 0x02030000
+typedef destructor freefunc;
+#endif
+
+#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
+     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
+     (PY_MAJOR_VERSION > 3))
+# define SWIGPY_USE_CAPSULE
+# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
+#endif
+
+#if PY_VERSION_HEX < 0x03020000
+#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
+#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
+#endif
+
+/* -----------------------------------------------------------------------------
+ * error manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIME PyObject*
+SWIG_Python_ErrorType(int code) {
+  PyObject* type = 0;
+  switch(code) {
+  case SWIG_MemoryError:
+    type = PyExc_MemoryError;
+    break;
+  case SWIG_IOError:
+    type = PyExc_IOError;
+    break;
+  case SWIG_RuntimeError:
+    type = PyExc_RuntimeError;
+    break;
+  case SWIG_IndexError:
+    type = PyExc_IndexError;
+    break;
+  case SWIG_TypeError:
+    type = PyExc_TypeError;
+    break;
+  case SWIG_DivisionByZero:
+    type = PyExc_ZeroDivisionError;
+    break;
+  case SWIG_OverflowError:
+    type = PyExc_OverflowError;
+    break;
+  case SWIG_SyntaxError:
+    type = PyExc_SyntaxError;
+    break;
+  case SWIG_ValueError:
+    type = PyExc_ValueError;
+    break;
+  case SWIG_SystemError:
+    type = PyExc_SystemError;
+    break;
+  case SWIG_AttributeError:
+    type = PyExc_AttributeError;
+    break;
+  default:
+    type = PyExc_RuntimeError;
+  }
+  return type;
+}
+
+
+SWIGRUNTIME void
+SWIG_Python_AddErrorMsg(const char* mesg)
+{
+  PyObject *type = 0;
+  PyObject *value = 0;
+  PyObject *traceback = 0;
+
+  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
+  if (value) {
+    char *tmp;
+    PyObject *old_str = PyObject_Str(value);
+    PyErr_Clear();
+    Py_XINCREF(type);
+
+    PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
+    SWIG_Python_str_DelForPy3(tmp);
+    Py_DECREF(old_str);
+    Py_DECREF(value);
+  } else {
+    PyErr_SetString(PyExc_RuntimeError, mesg);
+  }
+}
+
+#if defined(SWIG_PYTHON_NO_THREADS)
+#  if defined(SWIG_PYTHON_THREADS)
+#    undef SWIG_PYTHON_THREADS
+#  endif
+#endif
+#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
+#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
+#    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
+#      define SWIG_PYTHON_USE_GIL
+#    endif
+#  endif
+#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
+#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
+#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
+#    endif
+#    ifdef __cplusplus /* C++ code */
+       class SWIG_Python_Thread_Block {
+         bool status;
+         PyGILState_STATE state;
+       public:
+         void end() { if (status) { PyGILState_Release(state); status = false;} }
+         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
+         ~SWIG_Python_Thread_Block() { end(); }
+       };
+       class SWIG_Python_Thread_Allow {
+         bool status;
+         PyThreadState *save;
+       public:
+         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
+         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
+         ~SWIG_Python_Thread_Allow() { end(); }
+       };
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
+#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
+#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
+#    else /* C code */
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
+#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
+#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
+#    endif
+#  else /* Old thread way, not implemented, user must provide it */
+#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
+#      define SWIG_PYTHON_INITIALIZE_THREADS
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
+#      define SWIG_PYTHON_THREAD_END_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
+#      define SWIG_PYTHON_THREAD_END_ALLOW
+#    endif
+#  endif
+#else /* No thread support */
+#  define SWIG_PYTHON_INITIALIZE_THREADS
+#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#  define SWIG_PYTHON_THREAD_END_BLOCK
+#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#  define SWIG_PYTHON_THREAD_END_ALLOW
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Python API portion that goes into the runtime
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Constant declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Constant Types */
+#define SWIG_PY_POINTER 4
+#define SWIG_PY_BINARY  5
+
+/* Constant information structure */
+typedef struct swig_const_info {
+  int type;
+  char *name;
+  long lvalue;
+  double dvalue;
+  void   *pvalue;
+  swig_type_info **ptype;
+} swig_const_info;
+
+
+/* -----------------------------------------------------------------------------
+ * Wrapper of PyInstanceMethod_New() used in Python 3
+ * It is exported to the generated module, used for -fastproxy
+ * ----------------------------------------------------------------------------- */
+#if PY_VERSION_HEX >= 0x03000000
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
+{
+  return PyInstanceMethod_New(func);
+}
+#else
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
+{
+  return NULL;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/* -----------------------------------------------------------------------------
+ * pyrun.swg
+ *
+ * This file contains the runtime support for Python modules
+ * and includes code for managing global variables and pointer
+ * type checking.
+ *
+ * ----------------------------------------------------------------------------- */
+
+/* Common SWIG API */
+
+/* for raw pointers */
+#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
+#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
+
+#ifdef SWIGPYTHON_BUILTIN
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
+#else
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+#endif
+
+#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
+
+#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
+#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
+#define swig_owntype                                    int
+
+/* for raw packed data */
+#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+/* for class or struct pointers */
+#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
+
+/* for C or C++ function pointers */
+#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
+
+/* for C++ member pointers, ie, member methods */
+#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+
+/* Runtime API */
+
+#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
+#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
+#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
+
+#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
+#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
+#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
+#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
+#define SWIG_fail                        		goto fail					   
+
+
+/* Runtime API implementation */
+
+/* Error manipulation */
+
+SWIGINTERN void 
+SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
+  PyErr_SetObject(errtype, obj);
+  Py_DECREF(obj);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+SWIGINTERN void 
+SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
+  PyErr_SetString(errtype, msg);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
+
+/* Set a constant value */
+
+#if defined(SWIGPYTHON_BUILTIN)
+
+SWIGINTERN void
+SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
+  PyObject *s = PyString_InternFromString(key);
+  PyList_Append(seq, s);
+  Py_DECREF(s);
+}
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
+  Py_DECREF(obj);
+  if (public_interface)
+    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
+}
+
+#else
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
+#if PY_VERSION_HEX < 0x02030000
+  PyDict_SetItemString(d, (char *)name, obj);
+#else
+  PyDict_SetItemString(d, name, obj);
+#endif
+  Py_DECREF(obj);                            
+}
+
+#endif
+
+/* Append a value to the result obj */
+
+SWIGINTERN PyObject*
+SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
+#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyList_Check(result)) {
+      PyObject *o2 = result;
+      result = PyList_New(1);
+      PyList_SetItem(result, 0, o2);
+    }
+    PyList_Append(result,obj);
+    Py_DECREF(obj);
+  }
+  return result;
+#else
+  PyObject*   o2;
+  PyObject*   o3;
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyTuple_Check(result)) {
+      o2 = result;
+      result = PyTuple_New(1);
+      PyTuple_SET_ITEM(result, 0, o2);
+    }
+    o3 = PyTuple_New(1);
+    PyTuple_SET_ITEM(o3, 0, obj);
+    o2 = result;
+    result = PySequence_Concat(o2, o3);
+    Py_DECREF(o2);
+    Py_DECREF(o3);
+  }
+  return result;
+#endif
+}
+
+/* Unpack the argument tuple */
+
+SWIGINTERN int
+SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
+{
+  if (!args) {
+    if (!min && !max) {
+      return 1;
+    } else {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
+		   name, (min == max ? "" : "at least "), (int)min);
+      return 0;
+    }
+  }  
+  if (!PyTuple_Check(args)) {
+    if (min <= 1 && max >= 1) {
+      register int i;
+      objs[0] = args;
+      for (i = 1; i < max; ++i) {
+	objs[i] = 0;
+      }
+      return 2;
+    }
+    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
+    return 0;
+  } else {
+    register Py_ssize_t l = PyTuple_GET_SIZE(args);
+    if (l < min) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at least "), (int)min, (int)l);
+      return 0;
+    } else if (l > max) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at most "), (int)max, (int)l);
+      return 0;
+    } else {
+      register int i;
+      for (i = 0; i < l; ++i) {
+	objs[i] = PyTuple_GET_ITEM(args, i);
+      }
+      for (; l < max; ++l) {
+	objs[l] = 0;
+      }
+      return i + 1;
+    }    
+  }
+}
+
+/* A functor is a function object with one single object argument */
+#if PY_VERSION_HEX >= 0x02020000
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);
+#else
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunction(functor, "O", obj);
+#endif
+
+/*
+  Helper for static pointer initialization for both C and C++ code, for example
+  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
+*/
+#ifdef __cplusplus
+#define SWIG_STATIC_POINTER(var)  var
+#else
+#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Pointer declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
+#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
+
+#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
+
+#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
+#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*  How to access Py_None */
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#  ifndef SWIG_PYTHON_NO_BUILD_NONE
+#    ifndef SWIG_PYTHON_BUILD_NONE
+#      define SWIG_PYTHON_BUILD_NONE
+#    endif
+#  endif
+#endif
+
+#ifdef SWIG_PYTHON_BUILD_NONE
+#  ifdef Py_None
+#   undef Py_None
+#   define Py_None SWIG_Py_None()
+#  endif
+SWIGRUNTIMEINLINE PyObject * 
+_SWIG_Py_None(void)
+{
+  PyObject *none = Py_BuildValue((char*)"");
+  Py_DECREF(none);
+  return none;
+}
+SWIGRUNTIME PyObject * 
+SWIG_Py_None(void)
+{
+  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
+  return none;
+}
+#endif
+
+/* The python void return value */
+
+SWIGRUNTIMEINLINE PyObject * 
+SWIG_Py_Void(void)
+{
+  PyObject *none = Py_None;
+  Py_INCREF(none);
+  return none;
+}
+
+/* SwigPyClientData */
+
+typedef struct {
+  PyObject *klass;
+  PyObject *newraw;
+  PyObject *newargs;
+  PyObject *destroy;
+  int delargs;
+  int implicitconv;
+  PyTypeObject *pytype;
+} SwigPyClientData;
+
+SWIGRUNTIMEINLINE int 
+SWIG_Python_CheckImplicit(swig_type_info *ty)
+{
+  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
+  return data ? data->implicitconv : 0;
+}
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_ExceptionType(swig_type_info *desc) {
+  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
+  PyObject *klass = data ? data->klass : 0;
+  return (klass ? klass : PyExc_RuntimeError);
+}
+
+
+SWIGRUNTIME SwigPyClientData * 
+SwigPyClientData_New(PyObject* obj)
+{
+  if (!obj) {
+    return 0;
+  } else {
+    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
+    /* the klass element */
+    data->klass = obj;
+    Py_INCREF(data->klass);
+    /* the newraw method and newargs arguments used to create a new raw instance */
+    if (PyClass_Check(obj)) {
+      data->newraw = 0;
+      data->newargs = obj;
+      Py_INCREF(obj);
+    } else {
+#if (PY_VERSION_HEX < 0x02020000)
+      data->newraw = 0;
+#else
+      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
+#endif
+      if (data->newraw) {
+	Py_INCREF(data->newraw);
+	data->newargs = PyTuple_New(1);
+	PyTuple_SetItem(data->newargs, 0, obj);
+      } else {
+	data->newargs = obj;
+      }
+      Py_INCREF(data->newargs);
+    }
+    /* the destroy method, aka as the C++ delete method */
+    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      data->destroy = 0;
+    }
+    if (data->destroy) {
+      int flags;
+      Py_INCREF(data->destroy);
+      flags = PyCFunction_GET_FLAGS(data->destroy);
+#ifdef METH_O
+      data->delargs = !(flags & (METH_O));
+#else
+      data->delargs = 0;
+#endif
+    } else {
+      data->delargs = 0;
+    }
+    data->implicitconv = 0;
+    data->pytype = 0;
+    return data;
+  }
+}
+
+SWIGRUNTIME void 
+SwigPyClientData_Del(SwigPyClientData *data) {
+  Py_XDECREF(data->newraw);
+  Py_XDECREF(data->newargs);
+  Py_XDECREF(data->destroy);
+}
+
+/* =============== SwigPyObject =====================*/
+
+typedef struct {
+  PyObject_HEAD
+  void *ptr;
+  swig_type_info *ty;
+  int own;
+  PyObject *next;
+#ifdef SWIGPYTHON_BUILTIN
+  PyObject *dict;
+#endif
+} SwigPyObject;
+
+SWIGRUNTIME PyObject *
+SwigPyObject_long(SwigPyObject *v)
+{
+  return PyLong_FromVoidPtr(v->ptr);
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_format(const char* fmt, SwigPyObject *v)
+{
+  PyObject *res = NULL;
+  PyObject *args = PyTuple_New(1);
+  if (args) {
+    if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
+      PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
+      if (ofmt) {
+#if PY_VERSION_HEX >= 0x03000000
+	res = PyUnicode_Format(ofmt,args);
+#else
+	res = PyString_Format(ofmt,args);
+#endif
+	Py_DECREF(ofmt);
+      }
+      Py_DECREF(args);
+    }
+  }
+  return res;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_oct(SwigPyObject *v)
+{
+  return SwigPyObject_format("%o",v);
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_hex(SwigPyObject *v)
+{
+  return SwigPyObject_format("%x",v);
+}
+
+SWIGRUNTIME PyObject *
+#ifdef METH_NOARGS
+SwigPyObject_repr(SwigPyObject *v)
+#else
+SwigPyObject_repr(SwigPyObject *v, PyObject *args)
+#endif
+{
+  const char *name = SWIG_TypePrettyName(v->ty);
+  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
+  if (v->next) {
+# ifdef METH_NOARGS
+    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
+# else
+    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
+# endif
+# if PY_VERSION_HEX >= 0x03000000
+    PyObject *joined = PyUnicode_Concat(repr, nrep);
+    Py_DecRef(repr);
+    Py_DecRef(nrep);
+    repr = joined;
+# else
+    PyString_ConcatAndDel(&repr,nrep);
+# endif
+  }
+  return repr;  
+}
+
+SWIGRUNTIME int
+SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+  char *str;
+#ifdef METH_NOARGS
+  PyObject *repr = SwigPyObject_repr(v);
+#else
+  PyObject *repr = SwigPyObject_repr(v, NULL);
+#endif
+  if (repr) {
+    str = SWIG_Python_str_AsChar(repr); 
+    fputs(str, fp);
+    SWIG_Python_str_DelForPy3(str);
+    Py_DECREF(repr);
+    return 0; 
+  } else {
+    return 1; 
+  }
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_str(SwigPyObject *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
+    SWIG_Python_str_FromChar(result) : 0;
+}
+
+SWIGRUNTIME int
+SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
+{
+  void *i = v->ptr;
+  void *j = w->ptr;
+  return (i < j) ? -1 : ((i > j) ? 1 : 0);
+}
+
+/* Added for Python 3.x, would it also be useful for Python 2.x? */
+SWIGRUNTIME PyObject*
+SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
+{
+  PyObject* res;
+  if( op != Py_EQ && op != Py_NE ) {
+    Py_INCREF(Py_NotImplemented);
+    return Py_NotImplemented;
+  }
+  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
+  return res;  
+}
+
+
+SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
+
+#ifdef SWIGPYTHON_BUILTIN
+static swig_type_info *SwigPyObject_stype = 0;
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_type(void) {
+    SwigPyClientData *cd;
+    assert(SwigPyObject_stype);
+    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+    assert(cd);
+    assert(cd->pytype);
+    return cd->pytype;
+}
+#else
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
+  return type;
+}
+#endif
+
+SWIGRUNTIMEINLINE int
+SwigPyObject_Check(PyObject *op) {
+#ifdef SWIGPYTHON_BUILTIN
+  PyTypeObject *target_tp = SwigPyObject_type();
+  if (PyType_IsSubtype(op->ob_type, target_tp))
+    return 1;
+  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
+#else
+  return (Py_TYPE(op) == SwigPyObject_type())
+    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
+#endif
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
+
+SWIGRUNTIME void
+SwigPyObject_dealloc(PyObject *v)
+{
+  SwigPyObject *sobj = (SwigPyObject *) v;
+  PyObject *next = sobj->next;
+  if (sobj->own == SWIG_POINTER_OWN) {
+    swig_type_info *ty = sobj->ty;
+    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+    PyObject *destroy = data ? data->destroy : 0;
+    if (destroy) {
+      /* destroy is always a VARARGS method */
+      PyObject *res;
+      if (data->delargs) {
+	/* we need to create a temporary object to carry the destroy operation */
+	PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
+	res = SWIG_Python_CallFunctor(destroy, tmp);
+	Py_DECREF(tmp);
+      } else {
+	PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
+	PyObject *mself = PyCFunction_GET_SELF(destroy);
+	res = ((*meth)(mself, v));
+      }
+      Py_XDECREF(res);
+    } 
+#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
+    else {
+      const char *name = SWIG_TypePrettyName(ty);
+      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
+    }
+#endif
+  } 
+  Py_XDECREF(next);
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyObject* 
+SwigPyObject_append(PyObject* v, PyObject* next)
+{
+  SwigPyObject *sobj = (SwigPyObject *) v;
+#ifndef METH_O
+  PyObject *tmp = 0;
+  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
+  next = tmp;
+#endif
+  if (!SwigPyObject_Check(next)) {
+    return NULL;
+  }
+  sobj->next = next;
+  Py_INCREF(next);
+  return SWIG_Py_Void();
+}
+
+SWIGRUNTIME PyObject* 
+#ifdef METH_NOARGS
+SwigPyObject_next(PyObject* v)
+#else
+SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  SwigPyObject *sobj = (SwigPyObject *) v;
+  if (sobj->next) {    
+    Py_INCREF(sobj->next);
+    return sobj->next;
+  } else {
+    return SWIG_Py_Void();
+  }
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+SwigPyObject_disown(PyObject *v)
+#else
+SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  SwigPyObject *sobj = (SwigPyObject *)v;
+  sobj->own = 0;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+SwigPyObject_acquire(PyObject *v)
+#else
+SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  SwigPyObject *sobj = (SwigPyObject *)v;
+  sobj->own = SWIG_POINTER_OWN;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+SwigPyObject_own(PyObject *v, PyObject *args)
+{
+  PyObject *val = 0;
+#if (PY_VERSION_HEX < 0x02020000)
+  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
+#elif (PY_VERSION_HEX < 0x02050000)
+  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#else
+  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
+#endif
+    {
+      return NULL;
+    } 
+  else
+    {
+      SwigPyObject *sobj = (SwigPyObject *)v;
+      PyObject *obj = PyBool_FromLong(sobj->own);
+      if (val) {
+#ifdef METH_NOARGS
+	if (PyObject_IsTrue(val)) {
+	  SwigPyObject_acquire(v);
+	} else {
+	  SwigPyObject_disown(v);
+	}
+#else
+	if (PyObject_IsTrue(val)) {
+	  SwigPyObject_acquire(v,args);
+	} else {
+	  SwigPyObject_disown(v,args);
+	}
+#endif
+      } 
+      return obj;
+    }
+}
+
+#ifdef METH_O
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#else
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#endif
+
+#if PY_VERSION_HEX < 0x02020000
+SWIGINTERN PyObject *
+SwigPyObject_getattr(SwigPyObject *sobj,char *name)
+{
+  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
+}
+#endif
+
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_TypeOnce(void) {
+  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
+
+  static PyNumberMethods SwigPyObject_as_number = {
+    (binaryfunc)0, /*nb_add*/
+    (binaryfunc)0, /*nb_subtract*/
+    (binaryfunc)0, /*nb_multiply*/
+    /* nb_divide removed in Python 3 */
+#if PY_VERSION_HEX < 0x03000000
+    (binaryfunc)0, /*nb_divide*/
+#endif
+    (binaryfunc)0, /*nb_remainder*/
+    (binaryfunc)0, /*nb_divmod*/
+    (ternaryfunc)0,/*nb_power*/
+    (unaryfunc)0,  /*nb_negative*/
+    (unaryfunc)0,  /*nb_positive*/
+    (unaryfunc)0,  /*nb_absolute*/
+    (inquiry)0,    /*nb_nonzero*/
+    0,		   /*nb_invert*/
+    0,		   /*nb_lshift*/
+    0,		   /*nb_rshift*/
+    0,		   /*nb_and*/
+    0,		   /*nb_xor*/
+    0,		   /*nb_or*/
+#if PY_VERSION_HEX < 0x03000000
+    0,   /*nb_coerce*/
+#endif
+    (unaryfunc)SwigPyObject_long, /*nb_int*/
+#if PY_VERSION_HEX < 0x03000000
+    (unaryfunc)SwigPyObject_long, /*nb_long*/
+#else
+    0, /*nb_reserved*/
+#endif
+    (unaryfunc)0,                 /*nb_float*/
+#if PY_VERSION_HEX < 0x03000000
+    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
+    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
+#endif
+#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
+#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
+#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
+#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
+    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
+#endif
+  };
+
+  static PyTypeObject swigpyobject_type;
+  static int type_init = 0;
+  if (!type_init) {
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
+#if PY_VERSION_HEX >= 0x03000000
+      PyVarObject_HEAD_INIT(NULL, 0)
+#else
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
+#endif
+      (char *)"SwigPyObject",               /* tp_name */
+      sizeof(SwigPyObject),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyObject_print,        /* tp_print */
+#if PY_VERSION_HEX < 0x02020000
+      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
+#else
+      (getattrfunc)0,                       /* tp_getattr */
+#endif
+      (setattrfunc)0,                       /* tp_setattr */
+#if PY_VERSION_HEX >= 0x03000000
+    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
+#else
+      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
+#endif
+      (reprfunc)SwigPyObject_repr,          /* tp_repr */
+      &SwigPyObject_as_number,              /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyObject_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigobject_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      swigobject_methods,                   /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
+#endif
+#ifdef COUNT_ALLOCS
+      0,0,0,0                               /* tp_alloc -> tp_next */
+#endif
+    };
+    swigpyobject_type = tmp;
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
+    swigpyobject_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpyobject_type) < 0)
+      return NULL;
+#endif
+  }
+  return &swigpyobject_type;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
+{
+  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
+  if (sobj) {
+    sobj->ptr  = ptr;
+    sobj->ty   = ty;
+    sobj->own  = own;
+    sobj->next = 0;
+  }
+  return (PyObject *)sobj;
+}
+
+/* -----------------------------------------------------------------------------
+ * Implements a simple Swig Packed type, and use it instead of string
+ * ----------------------------------------------------------------------------- */
+
+typedef struct {
+  PyObject_HEAD
+  void *pack;
+  swig_type_info *ty;
+  size_t size;
+} SwigPyPacked;
+
+SWIGRUNTIME int
+SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+  char result[SWIG_BUFFER_SIZE];
+  fputs("<Swig Packed ", fp); 
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    fputs("at ", fp); 
+    fputs(result, fp); 
+  }
+  fputs(v->ty->name,fp); 
+  fputs(">", fp);
+  return 0; 
+}
+  
+SWIGRUNTIME PyObject *
+SwigPyPacked_repr(SwigPyPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
+  } else {
+    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
+  }  
+}
+
+SWIGRUNTIME PyObject *
+SwigPyPacked_str(SwigPyPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
+    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
+  } else {
+    return SWIG_Python_str_FromChar(v->ty->name);
+  }  
+}
+
+SWIGRUNTIME int
+SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
+{
+  size_t i = v->size;
+  size_t j = w->size;
+  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
+  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
+}
+
+SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
+
+SWIGRUNTIME PyTypeObject*
+SwigPyPacked_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
+  return type;
+}
+
+SWIGRUNTIMEINLINE int
+SwigPyPacked_Check(PyObject *op) {
+  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
+    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
+}
+
+SWIGRUNTIME void
+SwigPyPacked_dealloc(PyObject *v)
+{
+  if (SwigPyPacked_Check(v)) {
+    SwigPyPacked *sobj = (SwigPyPacked *) v;
+    free(sobj->pack);
+  }
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyTypeObject*
+SwigPyPacked_TypeOnce(void) {
+  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
+  static PyTypeObject swigpypacked_type;
+  static int type_init = 0;
+  if (!type_init) {
+    const PyTypeObject tmp = {
+      /* PyObject header changed in Python 3 */
+#if PY_VERSION_HEX>=0x03000000
+      PyVarObject_HEAD_INIT(NULL, 0)
+#else
+      PyObject_HEAD_INIT(NULL)
+      0,                                    /* ob_size */
+#endif
+      (char *)"SwigPyPacked",               /* tp_name */
+      sizeof(SwigPyPacked),                 /* tp_basicsize */
+      0,                                    /* tp_itemsize */
+      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
+      (printfunc)SwigPyPacked_print,        /* tp_print */
+      (getattrfunc)0,                       /* tp_getattr */
+      (setattrfunc)0,                       /* tp_setattr */
+#if PY_VERSION_HEX>=0x03000000
+      0, /* tp_reserved in 3.0.1 */
+#else
+      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
+#endif
+      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
+      0,                                    /* tp_as_number */
+      0,                                    /* tp_as_sequence */
+      0,                                    /* tp_as_mapping */
+      (hashfunc)0,                          /* tp_hash */
+      (ternaryfunc)0,                       /* tp_call */
+      (reprfunc)SwigPyPacked_str,           /* tp_str */
+      PyObject_GenericGetAttr,              /* tp_getattro */
+      0,                                    /* tp_setattro */
+      0,                                    /* tp_as_buffer */
+      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+      swigpacked_doc,                       /* tp_doc */
+      0,                                    /* tp_traverse */
+      0,                                    /* tp_clear */
+      0,                                    /* tp_richcompare */
+      0,                                    /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+      0,                                    /* tp_iter */
+      0,                                    /* tp_iternext */
+      0,                                    /* tp_methods */
+      0,                                    /* tp_members */
+      0,                                    /* tp_getset */
+      0,                                    /* tp_base */
+      0,                                    /* tp_dict */
+      0,                                    /* tp_descr_get */
+      0,                                    /* tp_descr_set */
+      0,                                    /* tp_dictoffset */
+      0,                                    /* tp_init */
+      0,                                    /* tp_alloc */
+      0,                                    /* tp_new */
+      0,                                    /* tp_free */
+      0,                                    /* tp_is_gc */
+      0,                                    /* tp_bases */
+      0,                                    /* tp_mro */
+      0,                                    /* tp_cache */
+      0,                                    /* tp_subclasses */
+      0,                                    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+      0,                                    /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+      0,                                    /* tp_version */
+#endif
+#ifdef COUNT_ALLOCS
+      0,0,0,0                               /* tp_alloc -> tp_next */
+#endif
+    };
+    swigpypacked_type = tmp;
+    type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
+    swigpypacked_type.ob_type = &PyType_Type;
+#else
+    if (PyType_Ready(&swigpypacked_type) < 0)
+      return NULL;
+#endif
+  }
+  return &swigpypacked_type;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
+{
+  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
+  if (sobj) {
+    void *pack = malloc(size);
+    if (pack) {
+      memcpy(pack, ptr, size);
+      sobj->pack = pack;
+      sobj->ty   = ty;
+      sobj->size = size;
+    } else {
+      PyObject_DEL((PyObject *) sobj);
+      sobj = 0;
+    }
+  }
+  return (PyObject *) sobj;
+}
+
+SWIGRUNTIME swig_type_info *
+SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
+{
+  if (SwigPyPacked_Check(obj)) {
+    SwigPyPacked *sobj = (SwigPyPacked *)obj;
+    if (sobj->size != size) return 0;
+    memcpy(ptr, sobj->pack, size);
+    return sobj->ty;
+  } else {
+    return 0;
+  }
+}
+
+/* -----------------------------------------------------------------------------
+ * pointers/data manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIMEINLINE PyObject *
+_SWIG_This(void)
+{
+    return SWIG_Python_str_FromChar("this");
+}
+
+static PyObject *swig_this = NULL;
+
+SWIGRUNTIME PyObject *
+SWIG_This(void)
+{
+  if (swig_this == NULL)
+    swig_this = _SWIG_This();
+  return swig_this;
+}
+
+/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
+
+/* TODO: I don't know how to implement the fast getset in Python 3 right now */
+#if PY_VERSION_HEX>=0x03000000
+#define SWIG_PYTHON_SLOW_GETSET_THIS 
+#endif
+
+SWIGRUNTIME SwigPyObject *
+SWIG_Python_GetSwigThis(PyObject *pyobj) 
+{
+  PyObject *obj;
+
+  if (SwigPyObject_Check(pyobj))
+    return (SwigPyObject *) pyobj;
+
+#ifdef SWIGPYTHON_BUILTIN
+  (void)obj;
+# ifdef PyWeakref_CheckProxy
+  if (PyWeakref_CheckProxy(pyobj)) {
+    pyobj = PyWeakref_GET_OBJECT(pyobj);
+    if (pyobj && SwigPyObject_Check(pyobj))
+      return (SwigPyObject*) pyobj;
+  }
+# endif
+  return NULL;
+#else
+
+  obj = 0;
+
+#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
+  if (PyInstance_Check(pyobj)) {
+    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+  } else {
+    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+    if (dictptr != NULL) {
+      PyObject *dict = *dictptr;
+      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
+    } else {
+#ifdef PyWeakref_CheckProxy
+      if (PyWeakref_CheckProxy(pyobj)) {
+	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+      }
+#endif
+      obj = PyObject_GetAttr(pyobj,SWIG_This());
+      if (obj) {
+	Py_DECREF(obj);
+      } else {
+	if (PyErr_Occurred()) PyErr_Clear();
+	return 0;
+      }
+    }
+  }
+#else
+  obj = PyObject_GetAttr(pyobj,SWIG_This());
+  if (obj) {
+    Py_DECREF(obj);
+  } else {
+    if (PyErr_Occurred()) PyErr_Clear();
+    return 0;
+  }
+#endif
+  if (obj && !SwigPyObject_Check(obj)) {
+    /* a PyObject is called 'this', try to get the 'real this'
+       SwigPyObject from it */ 
+    return SWIG_Python_GetSwigThis(obj);
+  }
+  return (SwigPyObject *)obj;
+#endif
+}
+
+/* Acquire a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_AcquirePtr(PyObject *obj, int own) {
+  if (own == SWIG_POINTER_OWN) {
+    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
+    if (sobj) {
+      int oldown = sobj->own;
+      sobj->own = own;
+      return oldown;
+    }
+  }
+  return 0;
+}
+
+/* Convert a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
+  int res;
+  SwigPyObject *sobj;
+
+  if (!obj)
+    return SWIG_ERROR;
+  if (obj == Py_None) {
+    if (ptr)
+      *ptr = 0;
+    return SWIG_OK;
+  }
+
+  res = SWIG_ERROR;
+
+  sobj = SWIG_Python_GetSwigThis(obj);
+  if (own)
+    *own = 0;
+  while (sobj) {
+    void *vptr = sobj->ptr;
+    if (ty) {
+      swig_type_info *to = sobj->ty;
+      if (to == ty) {
+        /* no type cast needed */
+        if (ptr) *ptr = vptr;
+        break;
+      } else {
+        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+        if (!tc) {
+          sobj = (SwigPyObject *)sobj->next;
+        } else {
+          if (ptr) {
+            int newmemory = 0;
+            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+            if (newmemory == SWIG_CAST_NEW_MEMORY) {
+              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
+              if (own)
+                *own = *own | SWIG_CAST_NEW_MEMORY;
+            }
+          }
+          break;
+        }
+      }
+    } else {
+      if (ptr) *ptr = vptr;
+      break;
+    }
+  }
+  if (sobj) {
+    if (own)
+      *own = *own | sobj->own;
+    if (flags & SWIG_POINTER_DISOWN) {
+      sobj->own = 0;
+    }
+    res = SWIG_OK;
+  } else {
+    if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+      if (data && !data->implicitconv) {
+        PyObject *klass = data->klass;
+        if (klass) {
+          PyObject *impconv;
+          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+          impconv = SWIG_Python_CallFunctor(klass, obj);
+          data->implicitconv = 0;
+          if (PyErr_Occurred()) {
+            PyErr_Clear();
+            impconv = 0;
+          }
+          if (impconv) {
+            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
+            if (iobj) {
+              void *vptr;
+              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+              if (SWIG_IsOK(res)) {
+                if (ptr) {
+                  *ptr = vptr;
+                  /* transfer the ownership to 'ptr' */
+                  iobj->own = 0;
+                  res = SWIG_AddCast(res);
+                  res = SWIG_AddNewMask(res);
+                } else {
+                  res = SWIG_AddCast(res);		    
+                }
+              }
+            }
+            Py_DECREF(impconv);
+          }
+        }
+      }
+    }
+  }
+  return res;
+}
+
+/* Convert a function ptr value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
+  if (!PyCFunction_Check(obj)) {
+    return SWIG_ConvertPtr(obj, ptr, ty, 0);
+  } else {
+    void *vptr = 0;
+    
+    /* here we get the method pointer for callbacks */
+    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
+    if (desc)
+      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
+    if (!desc) 
+      return SWIG_ERROR;
+    if (ty) {
+      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
+      if (tc) {
+        int newmemory = 0;
+        *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+        assert(!newmemory); /* newmemory handling not yet implemented */
+      } else {
+        return SWIG_ERROR;
+      }
+    } else {
+      *ptr = vptr;
+    }
+    return SWIG_OK;
+  }
+}
+
+/* Convert a packed value value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
+  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
+  if (!to) return SWIG_ERROR;
+  if (ty) {
+    if (to != ty) {
+      /* check type cast? */
+      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+      if (!tc) return SWIG_ERROR;
+    }
+  }
+  return SWIG_OK;
+}  
+
+/* -----------------------------------------------------------------------------
+ * Create a new pointer object
+ * ----------------------------------------------------------------------------- */
+
+/*
+  Create a new instance object, without calling __init__, and set the
+  'this' attribute.
+*/
+
+SWIGRUNTIME PyObject* 
+SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
+{
+#if (PY_VERSION_HEX >= 0x02020000)
+  PyObject *inst = 0;
+  PyObject *newraw = data->newraw;
+  if (newraw) {
+    inst = PyObject_Call(newraw, data->newargs, NULL);
+    if (inst) {
+#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+      PyObject **dictptr = _PyObject_GetDictPtr(inst);
+      if (dictptr != NULL) {
+	PyObject *dict = *dictptr;
+	if (dict == NULL) {
+	  dict = PyDict_New();
+	  *dictptr = dict;
+	  PyDict_SetItem(dict, SWIG_This(), swig_this);
+	}
+      }
+#else
+      PyObject *key = SWIG_This();
+      PyObject_SetAttr(inst, key, swig_this);
+#endif
+    }
+  } else {
+#if PY_VERSION_HEX >= 0x03000000
+    inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
+    PyObject_SetAttr(inst, SWIG_This(), swig_this);
+    Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
+#else
+    PyObject *dict = PyDict_New();
+    PyDict_SetItem(dict, SWIG_This(), swig_this);
+    inst = PyInstance_NewRaw(data->newargs, dict);
+    Py_DECREF(dict);
+#endif
+  }
+  return inst;
+#else
+#if (PY_VERSION_HEX >= 0x02010000)
+  PyObject *inst;
+  PyObject *dict = PyDict_New();
+  PyDict_SetItem(dict, SWIG_This(), swig_this);
+  inst = PyInstance_NewRaw(data->newargs, dict);
+  Py_DECREF(dict);
+  return (PyObject *) inst;
+#else
+  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
+  if (inst == NULL) {
+    return NULL;
+  }
+  inst->in_class = (PyClassObject *)data->newargs;
+  Py_INCREF(inst->in_class);
+  inst->in_dict = PyDict_New();
+  if (inst->in_dict == NULL) {
+    Py_DECREF(inst);
+    return NULL;
+  }
+#ifdef Py_TPFLAGS_HAVE_WEAKREFS
+  inst->in_weakreflist = NULL;
+#endif
+#ifdef Py_TPFLAGS_GC
+  PyObject_GC_Init(inst);
+#endif
+  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
+  return (PyObject *) inst;
+#endif
+#endif
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
+{
+ PyObject *dict;
+#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+ PyObject **dictptr = _PyObject_GetDictPtr(inst);
+ if (dictptr != NULL) {
+   dict = *dictptr;
+   if (dict == NULL) {
+     dict = PyDict_New();
+     *dictptr = dict;
+   }
+   PyDict_SetItem(dict, SWIG_This(), swig_this);
+   return;
+ }
+#endif
+ dict = PyObject_GetAttrString(inst, (char*)"__dict__");
+ PyDict_SetItem(dict, SWIG_This(), swig_this);
+ Py_DECREF(dict);
+} 
+
+
+SWIGINTERN PyObject *
+SWIG_Python_InitShadowInstance(PyObject *args) {
+  PyObject *obj[2];
+  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
+    return NULL;
+  } else {
+    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
+    if (sthis) {
+      SwigPyObject_append((PyObject*) sthis, obj[1]);
+    } else {
+      SWIG_Python_SetSwigThis(obj[0], obj[1]);
+    }
+    return SWIG_Py_Void();
+  }
+}
+
+/* Create a new pointer object */
+
+SWIGRUNTIME PyObject *
+SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
+  SwigPyClientData *clientdata;
+  PyObject * robj;
+  int own;
+
+  if (!ptr)
+    return SWIG_Py_Void();
+
+  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
+  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+  if (clientdata && clientdata->pytype) {
+    SwigPyObject *newobj;
+    if (flags & SWIG_BUILTIN_TP_INIT) {
+      newobj = (SwigPyObject*) self;
+      if (newobj->ptr) {
+        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
+        while (newobj->next)
+	  newobj = (SwigPyObject *) newobj->next;
+        newobj->next = next_self;
+        newobj = (SwigPyObject *)next_self;
+      }
+    } else {
+      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
+    }
+    if (newobj) {
+      newobj->ptr = ptr;
+      newobj->ty = type;
+      newobj->own = own;
+      newobj->next = 0;
+#ifdef SWIGPYTHON_BUILTIN
+      newobj->dict = 0;
+#endif
+      return (PyObject*) newobj;
+    }
+    return SWIG_Py_Void();
+  }
+
+  assert(!(flags & SWIG_BUILTIN_TP_INIT));
+
+  robj = SwigPyObject_New(ptr, type, own);
+  if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+    if (inst) {
+      Py_DECREF(robj);
+      robj = inst;
+    }
+  }
+  return robj;
+}
+
+/* Create a new packed object */
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
+  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
+}
+
+/* -----------------------------------------------------------------------------*
+ *  Get type list 
+ * -----------------------------------------------------------------------------*/
+
+#ifdef SWIG_LINK_RUNTIME
+void *SWIG_ReturnGlobalTypeList(void *);
+#endif
+
+SWIGRUNTIME swig_module_info *
+SWIG_Python_GetModule(void) {
+  static void *type_pointer = (void *)0;
+  /* first check if module already created */
+  if (!type_pointer) {
+#ifdef SWIG_LINK_RUNTIME
+    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
+#else
+# ifdef SWIGPY_USE_CAPSULE
+    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
+# else
+    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
+# endif
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      type_pointer = (void *)0;
+    }
+#endif
+  }
+  return (swig_module_info *) type_pointer;
+}
+
+#if PY_MAJOR_VERSION < 2
+/* PyModule_AddObject function was introduced in Python 2.0.  The following function
+   is copied out of Python/modsupport.c in python version 2.3.4 */
+SWIGINTERN int
+PyModule_AddObject(PyObject *m, char *name, PyObject *o)
+{
+  PyObject *dict;
+  if (!PyModule_Check(m)) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs module as first arg");
+    return SWIG_ERROR;
+  }
+  if (!o) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs non-NULL value");
+    return SWIG_ERROR;
+  }
+  
+  dict = PyModule_GetDict(m);
+  if (dict == NULL) {
+    /* Internal error -- modules must have a dict! */
+    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
+		 PyModule_GetName(m));
+    return SWIG_ERROR;
+  }
+  if (PyDict_SetItemString(dict, name, o))
+    return SWIG_ERROR;
+  Py_DECREF(o);
+  return SWIG_OK;
+}
+#endif
+
+SWIGRUNTIME void
+#ifdef SWIGPY_USE_CAPSULE
+SWIG_Python_DestroyModule(PyObject *obj)
+#else
+SWIG_Python_DestroyModule(void *vptr)
+#endif
+{
+#ifdef SWIGPY_USE_CAPSULE
+  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
+#else
+  swig_module_info *swig_module = (swig_module_info *) vptr;
+#endif
+  swig_type_info **types = swig_module->types;
+  size_t i;
+  for (i =0; i < swig_module->size; ++i) {
+    swig_type_info *ty = types[i];
+    if (ty->owndata) {
+      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
+      if (data) SwigPyClientData_Del(data);
+    }
+  }
+  Py_DECREF(SWIG_This());
+  swig_this = NULL;
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetModule(swig_module_info *swig_module) {
+#if PY_VERSION_HEX >= 0x03000000
+ /* Add a dummy module object into sys.modules */
+  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
+#else
+  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
+  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
+#endif
+#ifdef SWIGPY_USE_CAPSULE
+  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
+  if (pointer && module) {
+    PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
+#else
+  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  if (pointer && module) {
+    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
+#endif
+}
+
+/* The python cached type query */
+SWIGRUNTIME PyObject *
+SWIG_Python_TypeCache(void) {
+  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
+  return cache;
+}
+
+SWIGRUNTIME swig_type_info *
+SWIG_Python_TypeQuery(const char *type)
+{
+  PyObject *cache = SWIG_Python_TypeCache();
+  PyObject *key = SWIG_Python_str_FromChar(type); 
+  PyObject *obj = PyDict_GetItem(cache, key);
+  swig_type_info *descriptor;
+  if (obj) {
+#ifdef SWIGPY_USE_CAPSULE
+    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
+#else
+    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
+#endif
+  } else {
+    swig_module_info *swig_module = SWIG_Python_GetModule();
+    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
+    if (descriptor) {
+#ifdef SWIGPY_USE_CAPSULE
+      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
+#else
+      obj = PyCObject_FromVoidPtr(descriptor, NULL);
+#endif
+      PyDict_SetItem(cache, key, obj);
+      Py_DECREF(obj);
+    }
+  }
+  Py_DECREF(key);
+  return descriptor;
+}
+
+/* 
+   For backward compatibility only
+*/
+#define SWIG_POINTER_EXCEPTION  0
+#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
+#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
+
+SWIGRUNTIME int
+SWIG_Python_AddErrMesg(const char* mesg, int infront)
+{  
+  if (PyErr_Occurred()) {
+    PyObject *type = 0;
+    PyObject *value = 0;
+    PyObject *traceback = 0;
+    PyErr_Fetch(&type, &value, &traceback);
+    if (value) {
+      char *tmp;
+      PyObject *old_str = PyObject_Str(value);
+      Py_XINCREF(type);
+      PyErr_Clear();
+      if (infront) {
+	PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
+      } else {
+	PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
+      }
+      SWIG_Python_str_DelForPy3(tmp);
+      Py_DECREF(old_str);
+    }
+    return 1;
+  } else {
+    return 0;
+  }
+}
+  
+SWIGRUNTIME int
+SWIG_Python_ArgFail(int argnum)
+{
+  if (PyErr_Occurred()) {
+    /* add information about failing argument */
+    char mesg[256];
+    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
+    return SWIG_Python_AddErrMesg(mesg, 1);
+  } else {
+    return 0;
+  }
+}
+
+SWIGRUNTIMEINLINE const char *
+SwigPyObject_GetDesc(PyObject *self)
+{
+  SwigPyObject *v = (SwigPyObject *)self;
+  swig_type_info *ty = v ? v->ty : 0;
+  return ty ? ty->str : "";
+}
+
+SWIGRUNTIME void
+SWIG_Python_TypeError(const char *type, PyObject *obj)
+{
+  if (type) {
+#if defined(SWIG_COBJECT_TYPES)
+    if (obj && SwigPyObject_Check(obj)) {
+      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
+      if (otype) {
+	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
+		     type, otype);
+	return;
+      }
+    } else 
+#endif      
+    {
+      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
+      if (otype) {
+	PyObject *str = PyObject_Str(obj);
+	const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
+	if (cstr) {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
+		       type, otype, cstr);
+          SWIG_Python_str_DelForPy3(cstr);
+	} else {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
+		       type, otype);
+	}
+	Py_XDECREF(str);
+	return;
+      }
+    }   
+    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
+  } else {
+    PyErr_Format(PyExc_TypeError, "unexpected type is received");
+  }
+}
+
+
+/* Convert a pointer value, signal an exception on a type mismatch */
+SWIGRUNTIME void *
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
+  void *result;
+  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
+    PyErr_Clear();
+#if SWIG_POINTER_EXCEPTION
+    if (flags) {
+      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
+      SWIG_Python_ArgFail(argnum);
+    }
+#endif
+  }
+  return result;
+}
+
+#ifdef SWIGPYTHON_BUILTIN
+SWIGRUNTIME int
+SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
+  PyTypeObject *tp = obj->ob_type;
+  PyObject *descr;
+  PyObject *encoded_name;
+  descrsetfunc f;
+  int res;
+
+# ifdef Py_USING_UNICODE
+  if (PyString_Check(name)) {
+    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
+    if (!name)
+      return -1;
+  } else if (!PyUnicode_Check(name))
+# else
+  if (!PyString_Check(name))
+# endif
+  {
+    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
+    return -1;
+  } else {
+    Py_INCREF(name);
+  }
+
+  if (!tp->tp_dict) {
+    if (PyType_Ready(tp) < 0)
+      goto done;
+  }
+
+  res = -1;
+  descr = _PyType_Lookup(tp, name);
+  f = NULL;
+  if (descr != NULL)
+    f = descr->ob_type->tp_descr_set;
+  if (!f) {
+    if (PyString_Check(name)) {
+      encoded_name = name;
+      Py_INCREF(name);
+    } else {
+      encoded_name = PyUnicode_AsUTF8String(name);
+    }
+    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
+    Py_DECREF(encoded_name);
+  } else {
+    res = f(descr, obj, value);
+  }
+  
+  done:
+  Py_DECREF(name);
+  return res;
+}
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
+
+#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
+
+
+
+/* -------- TYPES TABLE (BEGIN) -------- */
+
+#define SWIGTYPE_p_attrl swig_types[0]
+#define SWIGTYPE_p_attrlArray swig_types[1]
+#define SWIGTYPE_p_attropl swig_types[2]
+#define SWIGTYPE_p_batch_status swig_types[3]
+#define SWIGTYPE_p_char swig_types[4]
+#define SWIGTYPE_p_getter_setter swig_types[5]
+#define SWIGTYPE_p_int swig_types[6]
+#define SWIGTYPE_p_job_data swig_types[7]
+#define SWIGTYPE_p_long swig_types[8]
+#define SWIGTYPE_p_p_char swig_types[9]
+#define SWIGTYPE_p_p_memmgr swig_types[10]
+#define SWIGTYPE_p_pthread_mutex_t swig_types[11]
+#define SWIGTYPE_p_sockaddr swig_types[12]
+static swig_type_info *swig_types[14];
+static swig_module_info swig_module = {swig_types, 13, 0, 0, 0, 0};
+#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
+#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
+
+/* -------- TYPES TABLE (END) -------- */
+
+#if (PY_VERSION_HEX <= 0x02000000)
+# if !defined(SWIG_PYTHON_CLASSIC)
+#  error "This python version requires swig to be run with the '-classic' option"
+# endif
+#endif
+
+/*-----------------------------------------------
+              @(target):= _pbs.so
+  ------------------------------------------------*/
+#if PY_VERSION_HEX >= 0x03000000
+#  define SWIG_init    PyInit__pbs
+
+#else
+#  define SWIG_init    init_pbs
+
+#endif
+#define SWIG_name    "_pbs"
+
+#define SWIGVERSION 0x020007 
+#define SWIG_VERSION SWIGVERSION
+
+
+#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
+#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 
+
+
+
+#include "pbs_ifl.h"
+#include "pbs_error.h"
+#include "rm.h"
+#include "log.h"
+
+#define SARA_DEBUG 0
+
+//extern int pbs_errno;
+
+
+
+int Get_List_Size(PyObject *src)
+{
+  if (PyList_Check(src))
+    return(PyList_Size(src));
+
+  /* check if valid NULL pointer */
+  if ( PyString_Check(src) ) {
+    if ( ! strcmp(PyString_AsString(src), "NULL") )
+      return(0);
+  }
+  return(-1);
+
+} // end Get_List_Size()
+
+
+
+
+// The default constructor for struct attrl
+//
+struct attrl *new_attrl(int number)
+{
+  struct attrl *ptr;
+  struct attrl *prev, *current;
+  int i;
+
+  /* 
+    allocate memory as a one block is handy for Python scripts 
+    and fill in the next fields so it also works for the C-library
+  */
+  printf("basje \n");
+  ptr = (struct attrl *) malloc(number * sizeof(struct attrl));
+
+  prev = NULL;
+  current = ptr + (number - 1);
+  for (i=0; i < number; i++)
+  { 
+    printf("constructor called\n");
+    current->name     = (char *) malloc(MAXNAMLEN * sizeof(char));
+    current->resource = (char *) malloc(MAXNAMLEN * sizeof(char));
+    current->value    = (char *) malloc(MAXNAMLEN * sizeof(char));
+
+    bzero( (void*) current->name, sizeof(current->name));
+    bzero( (void*) current->resource, sizeof(current->resource));
+    bzero( (void*) current->value, sizeof(current->value));
+
+    current->next     = prev;
+    prev = current;
+    current--;
+  }
+  return (struct attrl *)ptr;
+
+} // end new_attrl()
+
+
+
+// The default constructor for struct attropl
+//
+struct attropl *new_attropl(int number)
+{
+  struct attropl *ptr;
+  struct attropl *prev, *current;
+  int i;
+
+  /* 
+    allocate memory as a one block is handy for Python scripts 
+    and fill in the next fields so it also works for the C-library
+  */
+  ptr = (struct attropl *) malloc(number * sizeof(struct attropl));
+
+  prev = NULL;
+  current = ptr + (number - 1);
+  for (i=0; i < number; i++)
+  { 
+    printf("constructor called\n");
+    current->name     = (char *) malloc(MAXNAMLEN * sizeof(char));
+    current->resource = (char *) malloc(MAXNAMLEN * sizeof(char));
+    current->value    = (char *) malloc(MAXNAMLEN * sizeof(char));
+
+    bzero( (void*) current->name, sizeof(current->name));
+    bzero( (void*) current->resource, sizeof(current->resource));
+    bzero( (void*) current->value, sizeof(current->value));
+    // current->op = 0;
+
+    current->next     = prev;
+    prev = current;
+    current--;
+  }
+  return (struct attropl *)ptr;
+
+} // end new_attropl()
+
+/* Not used only returned */
+struct batch_status *new_batch_status()
+{
+   struct batch_status *ptr;
+
+   ptr = (struct batch_status *) malloc(sizeof(struct batch_status));
+   return (struct batch_status *)ptr;
+} // end new struct batch_status
+
+int get_error()
+{
+   char *errmsg;
+
+   errmsg = pbse_to_txt(pbs_errno);
+   if (SARA_DEBUG)
+   {
+      printf("Bas = %d\n", pbs_errno);
+      printf("Bas = %d, text = %s\n", pbs_errno, errmsg);
+   }
+   return (pbs_errno);
+}
+
+
+
+
+#include <limits.h>
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+#   define LLONG_MAX __LONG_LONG_MAX__
+#   define LLONG_MIN (-LLONG_MAX - 1LL)
+#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
+#endif
+
+
+SWIGINTERN int
+SWIG_AsVal_double (PyObject *obj, double *val)
+{
+  int res = SWIG_TypeError;
+  if (PyFloat_Check(obj)) {
+    if (val) *val = PyFloat_AsDouble(obj);
+    return SWIG_OK;
+  } else if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    double v = PyLong_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    double d = PyFloat_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = d;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      long v = PyLong_AsLong(obj);
+      if (!PyErr_Occurred()) {
+	if (val) *val = v;
+	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
+      } else {
+	PyErr_Clear();
+      }
+    }
+  }
+#endif
+  return res;
+}
+
+
+#include <float.h>
+
+
+#include <math.h>
+
+
+SWIGINTERNINLINE int
+SWIG_CanCastAsInteger(double *d, double min, double max) {
+  double x = *d;
+  if ((min <= x && x <= max)) {
+   double fx = floor(x);
+   double cx = ceil(x);
+   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
+   if ((errno == EDOM) || (errno == ERANGE)) {
+     errno = 0;
+   } else {
+     double summ, reps, diff;
+     if (rd < x) {
+       diff = x - rd;
+     } else if (rd > x) {
+       diff = rd - x;
+     } else {
+       return 1;
+     }
+     summ = rd + x;
+     reps = diff/summ;
+     if (reps < 8*DBL_EPSILON) {
+       *d = rd;
+       return 1;
+     }
+   }
+  }
+  return 0;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_long (PyObject *obj, long* val)
+{
+  if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    long v = PyLong_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    long v = PyInt_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
+	if (val) *val = (long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_int (PyObject * obj, int *val)
+{
+  long v;
+  int res = SWIG_AsVal_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < INT_MIN || v > INT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (int)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERNINLINE PyObject*
+  SWIG_From_int  (int value)
+{
+  return PyInt_FromLong((long) value);
+}
+
+
+typedef struct attrl attrlArray;
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
+{
+  if (PyInt_Check(obj)) {
+    long v = PyInt_AsLong(obj);
+    if (v >= 0) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      return SWIG_OverflowError;
+    }
+  } else if (PyLong_Check(obj)) {
+    unsigned long v = PyLong_AsUnsignedLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    unsigned long v = PyLong_AsUnsignedLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
+	if (val) *val = (unsigned long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERNINLINE int
+SWIG_AsVal_size_t (PyObject * obj, size_t *val)
+{
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
+  if (SWIG_IsOK(res) && val) *val = (size_t)(v);
+  return res;
+}
+
+SWIGINTERN attrlArray *new_attrlArray(size_t nelements){
+    return (struct attrl *)malloc((nelements)*sizeof(struct attrl));
+  }
+SWIGINTERN void delete_attrlArray(attrlArray *self){
+    free((char*)self);
+  }
+SWIGINTERN struct attrl attrlArray___getitem__(attrlArray *self,size_t index){
+    return self[index];
+  }
+SWIGINTERN void attrlArray___setitem__(attrlArray *self,size_t index,struct attrl value){
+    self[index] = value;
+  }
+SWIGINTERN struct attrl *attrlArray_cast(attrlArray *self){
+    return self;
+  }
+SWIGINTERN attrlArray *attrlArray_frompointer(struct attrl *t){
+    return (attrlArray *)(t);
+  }
+
+SWIGINTERN swig_type_info*
+SWIG_pchar_descriptor(void)
+{
+  static int init = 0;
+  static swig_type_info* info = 0;
+  if (!init) {
+    info = SWIG_TypeQuery("_p_char");
+    init = 1;
+  }
+  return info;
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_FromCharPtrAndSize(const char* carray, size_t size)
+{
+  if (carray) {
+    if (size > INT_MAX) {
+      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+      return pchar_descriptor ? 
+	SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
+    } else {
+#if PY_VERSION_HEX >= 0x03000000
+      return PyUnicode_FromStringAndSize(carray, (int)(size));
+#else
+      return PyString_FromStringAndSize(carray, (int)(size));
+#endif
+    }
+  } else {
+    return SWIG_Py_Void();
+  }
+}
+
+
+SWIGINTERNINLINE PyObject * 
+SWIG_FromCharPtr(const char *cptr)
+{ 
+  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
+}
+
+
+SWIGINTERN int
+SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
+{
+#if PY_VERSION_HEX>=0x03000000
+  if (PyUnicode_Check(obj))
+#else  
+  if (PyString_Check(obj))
+#endif
+  {
+    char *cstr; Py_ssize_t len;
+#if PY_VERSION_HEX>=0x03000000
+    if (!alloc && cptr) {
+        /* We can't allow converting without allocation, since the internal
+           representation of string in Python 3 is UCS-2/UCS-4 but we require
+           a UTF-8 representation.
+           TODO(bhy) More detailed explanation */
+        return SWIG_RuntimeError;
+    }
+    obj = PyUnicode_AsUTF8String(obj);
+    PyBytes_AsStringAndSize(obj, &cstr, &len);
+    if(alloc) *alloc = SWIG_NEWOBJ;
+#else
+    PyString_AsStringAndSize(obj, &cstr, &len);
+#endif
+    if (cptr) {
+      if (alloc) {
+	/* 
+	   In python the user should not be able to modify the inner
+	   string representation. To warranty that, if you define
+	   SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
+	   buffer is always returned.
+
+	   The default behavior is just to return the pointer value,
+	   so, be careful.
+	*/ 
+#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
+	if (*alloc != SWIG_OLDOBJ) 
+#else
+	if (*alloc == SWIG_NEWOBJ) 
+#endif
+	  {
+	    *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
+	    *alloc = SWIG_NEWOBJ;
+	  }
+	else {
+	  *cptr = cstr;
+	  *alloc = SWIG_OLDOBJ;
+	}
+      } else {
+        #if PY_VERSION_HEX>=0x03000000
+        assert(0); /* Should never reach here in Python 3 */
+        #endif
+	*cptr = SWIG_Python_str_AsChar(obj);
+      }
+    }
+    if (psize) *psize = len + 1;
+#if PY_VERSION_HEX>=0x03000000
+    Py_XDECREF(obj);
+#endif
+    return SWIG_OK;
+  } else {
+    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+    if (pchar_descriptor) {
+      void* vptr = 0;
+      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
+	if (cptr) *cptr = (char *) vptr;
+	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
+	if (alloc) *alloc = SWIG_OLDOBJ;
+	return SWIG_OK;
+      }
+    }
+  }
+  return SWIG_TypeError;
+}
+
+
+
+
+SWIGINTERN char *attrl___str__(struct attrl *self){
+    static char temp[4 * 255] ;
+    snprintf(temp, sizeof(temp), "(%s,%s,%s)", 
+      self->name, self->resource, self->value);
+    
+    return &temp[0];
+  }
+SWIGINTERN void delete_attrl(struct attrl *self){
+    if (SARA_DEBUG)
+       printf("Bas free attrl\n");
+
+    /*
+  	free(self);
+    */
+  }
+SWIGINTERN char *attropl___str__(struct attropl *self){
+    static char temp[4 * 255] ;
+    snprintf(temp, sizeof(temp), "(%s,%s,%s)", 
+      self->name, self->resource, self->value);
+    
+    return &temp[0];
+  }
+SWIGINTERN void delete_attropl(struct attropl *self){
+    if (SARA_DEBUG)
+       printf("Bas free attropl\n");
+
+    /*
+  	free(self);
+    */
+  }
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
+{
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v > UINT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (unsigned int)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERNINLINE PyObject*
+  SWIG_From_bool  (bool value)
+{
+  return PyBool_FromLong(value ? 1 : 0);
+}
+
+
+SWIGINTERN int
+SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
+{ 
+  char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
+  int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
+  if (SWIG_IsOK(res)) {
+    if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize;
+    if (csize <= size) {
+      if (val) {
+	if (csize) memcpy(val, cptr, csize*sizeof(char));
+	if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
+      }
+      if (alloc == SWIG_NEWOBJ) {
+	free((char*)cptr);
+	res = SWIG_DelNewMask(res);
+      }      
+      return res;
+    }
+    if (alloc == SWIG_NEWOBJ) free((char*)cptr);
+  }
+  return SWIG_TypeError;
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+SWIGINTERN PyObject *_wrap_new_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attrl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:new_attrl",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attrl" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (struct attrl *)new_attrl(arg1);
+  {
+    PyObject      *obj_batch;
+    struct attrl  *ptr;
+    int           i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attropl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:new_attropl",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attropl" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (struct attropl *)new_attropl(arg1);
+  {
+    PyObject          *obj_batch;
+    struct attropl    *ptr;
+    int               i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Converteren c (struct attropl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); 
+      PyList_SetItem(resultobj, i, obj_batch); 
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_batch_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":new_batch_status")) SWIG_fail;
+  result = (struct batch_status *)new_batch_status();
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_get_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":get_error")) SWIG_fail;
+  result = (int)get_error();
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_attrlArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  size_t arg1 ;
+  size_t val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  attrlArray *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:new_attrlArray",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attrlArray" "', argument " "1"" of type '" "size_t""'");
+  } 
+  arg1 = (size_t)(val1);
+  result = (attrlArray *)new_attrlArray(arg1);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_attrlArray, SWIG_POINTER_NEW |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_delete_attrlArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  attrlArray *arg1 = (attrlArray *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:delete_attrlArray",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrlArray, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attrlArray" "', argument " "1"" of type '" "attrlArray *""'"); 
+  }
+  arg1 = (attrlArray *)(argp1);
+  delete_attrlArray(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrlArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  attrlArray *arg1 = (attrlArray *) 0 ;
+  size_t arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  size_t val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  struct attrl result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrlArray___getitem__",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrlArray, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrlArray___getitem__" "', argument " "1"" of type '" "attrlArray *""'"); 
+  }
+  arg1 = (attrlArray *)(argp1);
+  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrlArray___getitem__" "', argument " "2"" of type '" "size_t""'");
+  } 
+  arg2 = (size_t)(val2);
+  result = attrlArray___getitem__(arg1,arg2);
+  resultobj = SWIG_NewPointerObj((struct attrl *)memcpy((struct attrl *)malloc(sizeof(struct attrl)),&result,sizeof(struct attrl)), SWIGTYPE_p_attrl, SWIG_POINTER_OWN |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrlArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  attrlArray *arg1 = (attrlArray *) 0 ;
+  size_t arg2 ;
+  struct attrl arg3 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  size_t val2 ;
+  int ecode2 = 0 ;
+  void *argp3 ;
+  int res3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:attrlArray___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrlArray, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrlArray___setitem__" "', argument " "1"" of type '" "attrlArray *""'"); 
+  }
+  arg1 = (attrlArray *)(argp1);
+  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrlArray___setitem__" "', argument " "2"" of type '" "size_t""'");
+  } 
+  arg2 = (size_t)(val2);
+  {
+    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_attrl,  0 );
+    if (!SWIG_IsOK(res3)) {
+      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "attrlArray___setitem__" "', argument " "3"" of type '" "struct attrl""'"); 
+    }  
+    if (!argp3) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "attrlArray___setitem__" "', argument " "3"" of type '" "struct attrl""'");
+    } else {
+      arg3 = *((struct attrl *)(argp3));
+    }
+  }
+  attrlArray___setitem__(arg1,arg2,arg3);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrlArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  attrlArray *arg1 = (attrlArray *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attrl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrlArray_cast",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrlArray, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrlArray_cast" "', argument " "1"" of type '" "attrlArray *""'"); 
+  }
+  arg1 = (attrlArray *)(argp1);
+  result = (struct attrl *)attrlArray_cast(arg1);
+  {
+    PyObject      *obj_batch;
+    struct attrl  *ptr;
+    int           i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrlArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  attrlArray *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrlArray_frompointer",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrlArray_frompointer" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (attrlArray *)attrlArray_frompointer(arg1);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_attrlArray, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *attrlArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p_attrlArray, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject *_wrap_attrl_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  struct attrl *arg2 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_next_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_next_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_next_set" "', argument " "2"" of type '" "struct attrl *""'"); 
+  }
+  arg2 = (struct attrl *)(argp2);
+  if (arg1) (arg1)->next = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attrl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_next_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_next_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (struct attrl *) ((arg1)->next);
+  {
+    PyObject      *obj_batch;
+    struct attrl  *ptr;
+    int           i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_name_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_name_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->name) free((char*)arg1->name);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->name = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_name_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (char *) ((arg1)->name);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_resource_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_resource_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->resource) free((char*)arg1->resource);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->resource = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->resource = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_resource_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (char *) ((arg1)->resource);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_value_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_value_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->value) free((char*)arg1->value);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->value = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->value = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_value_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (char *) ((arg1)->value);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  enum batch_op arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_op_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrl_op_set" "', argument " "2"" of type '" "enum batch_op""'");
+  } 
+  arg2 = (enum batch_op)(val2);
+  if (arg1) (arg1)->op = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  enum batch_op result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_op_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (enum batch_op) ((arg1)->op);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl___str__",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl___str__" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (char *)attrl___str__(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_delete_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:delete_attrl",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attrl" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  delete_attrl(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *attrl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p_attrl, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject *_wrap_attropl_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  struct attropl *arg2 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_next_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_next_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_next_set" "', argument " "2"" of type '" "struct attropl *""'"); 
+  }
+  arg2 = (struct attropl *)(argp2);
+  if (arg1) (arg1)->next = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attropl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_next_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_next_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (struct attropl *) ((arg1)->next);
+  {
+    PyObject          *obj_batch;
+    struct attropl    *ptr;
+    int               i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Converteren c (struct attropl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); 
+      PyList_SetItem(resultobj, i, obj_batch); 
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_name_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_name_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->name) free((char*)arg1->name);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->name = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_name_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (char *) ((arg1)->name);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_resource_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_resource_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->resource) free((char*)arg1->resource);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->resource = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->resource = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_resource_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (char *) ((arg1)->resource);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_value_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_value_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->value) free((char*)arg1->value);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->value = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->value = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_value_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (char *) ((arg1)->value);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  enum batch_op arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_op_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attropl_op_set" "', argument " "2"" of type '" "enum batch_op""'");
+  } 
+  arg2 = (enum batch_op)(val2);
+  if (arg1) (arg1)->op = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  enum batch_op result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_op_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (enum batch_op) ((arg1)->op);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl___str__",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl___str__" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (char *)attropl___str__(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_delete_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:delete_attropl",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attropl" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  delete_attropl(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *attropl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p_attropl, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject *_wrap_batch_status_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  struct batch_status *arg2 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_next_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_next_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_batch_status, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_next_set" "', argument " "2"" of type '" "struct batch_status *""'"); 
+  }
+  arg2 = (struct batch_status *)(argp2);
+  if (arg1) (arg1)->next = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_next_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_next_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  result = (struct batch_status *) ((arg1)->next);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_name_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_name_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->name) free((char*)arg1->name);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->name = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_name_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  result = (char *) ((arg1)->name);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_attribs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  struct attrl *arg2 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_attribs_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_attribs_set" "', argument " "2"" of type '" "struct attrl *""'"); 
+  }
+  arg2 = (struct attrl *)(argp2);
+  if (arg1) (arg1)->attribs = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_attribs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attrl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_attribs_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  result = (struct attrl *) ((arg1)->attribs);
+  {
+    PyObject      *obj_batch;
+    struct attrl  *ptr;
+    int           i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_text_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_text_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_text_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->text) free((char*)arg1->text);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->text = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->text = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_text_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_text_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  result = (char *) ((arg1)->text);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *batch_status_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p_batch_status, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN int Swig_var_pbs_server_set(PyObject *_val) {
+  {
+    char *cptr = 0; size_t csize = 0; int alloc = SWIG_NEWOBJ;
+    int res = SWIG_AsCharPtrAndSize(_val, &cptr, &csize, &alloc);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_server""' of type '""char *""'");
+    }
+    if (pbs_server) free((char*)pbs_server);
+    if (alloc == SWIG_NEWOBJ) {
+      pbs_server = cptr;
+    } else {
+      pbs_server = csize ? (char *)(char *)memcpy((char *)malloc((csize)*sizeof(char)), cptr, sizeof(char)*(csize)) : 0;
+    }
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_pbs_server_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_FromCharPtr(pbs_server);
+  return pyobj;
+}
+
+
+SWIGINTERN PyObject *_wrap_avail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:avail",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "avail" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avail" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  result = (char *)avail(arg1,arg2);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_asyrunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_asyrunjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_asyrunjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_asyrunjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_asyrunjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_asyrunjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_asyrunjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_alterjob_async(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob_async",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_alterjob_async" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_alterjob_async" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_alterjob_async" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_alterjob_async(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_alterjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_alterjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_alterjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_alterjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_alterjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_connect",&obj0)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pbs_connect" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  result = (int)pbs_connect(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":pbs_default")) SWIG_fail;
+  result = (char *)pbs_default();
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_fbserver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":pbs_fbserver")) SWIG_fail;
+  result = (char *)pbs_fbserver();
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_get_server_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":pbs_get_server_list")) SWIG_fail;
+  result = (char *)pbs_get_server_list();
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_deljob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_deljob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_deljob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_deljob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_deljob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)pbs_deljob(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_disconnect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_disconnect",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_disconnect" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (int)pbs_disconnect(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_geterrmsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_geterrmsg",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_geterrmsg" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (char *)pbs_geterrmsg(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_holdjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_holdjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_holdjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_holdjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_holdjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_holdjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_holdjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_checkpointjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_checkpointjob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_checkpointjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_checkpointjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_checkpointjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)pbs_checkpointjob(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_locjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_locjob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_locjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_locjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_locjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (char *)pbs_locjob(arg1,arg2,arg3);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_manager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int arg3 ;
+  char *arg4 = (char *) 0 ;
+  struct attropl *arg5 = (struct attropl *) 0 ;
+  char *arg6 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  int res6 ;
+  char *buf6 = 0 ;
+  int alloc6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:pbs_manager",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_manager" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_manager" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_manager" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_manager" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  {
+    PyObject          *py_obj;
+    struct attropl    *ptr, *prev;
+    char              s[255];
+    int               i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n");
+    
+    size = Get_List_Size(obj4);
+    
+    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    //printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg5 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj4, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg5 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
+  if (!SWIG_IsOK(res6)) {
+    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_manager" "', argument " "6"" of type '" "char *""'");
+  }
+  arg6 = (char *)(buf6);
+  result = (int)pbs_manager(arg1,arg2,arg3,arg4,arg5,arg6);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  return resultobj;
+fail:
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_movejob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_movejob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_movejob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_movejob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_movejob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_movejob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_movejob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_msgjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  int arg3 ;
+  char *arg4 = (char *) 0 ;
+  char *arg5 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  int res5 ;
+  char *buf5 = 0 ;
+  int alloc5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_msgjob",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_msgjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_msgjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_msgjob" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_msgjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_msgjob" "', argument " "5"" of type '" "char *""'");
+  }
+  arg5 = (char *)(buf5);
+  result = (int)pbs_msgjob(arg1,arg2,arg3,arg4,arg5);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_orderjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_orderjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_orderjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_orderjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_orderjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_orderjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_orderjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rescquery(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char **arg2 = (char **) 0 ;
+  int arg3 ;
+  int *arg4 = (int *) 0 ;
+  int *arg5 = (int *) 0 ;
+  int *arg6 = (int *) 0 ;
+  int *arg7 = (int *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  void *argp5 = 0 ;
+  int res5 = 0 ;
+  void *argp6 = 0 ;
+  int res6 = 0 ;
+  void *argp7 = 0 ;
+  int res7 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:pbs_rescquery",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescquery" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_char, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rescquery" "', argument " "2"" of type '" "char **""'"); 
+  }
+  arg2 = (char **)(argp2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_rescquery" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rescquery" "', argument " "4"" of type '" "int *""'"); 
+  }
+  arg4 = (int *)(argp4);
+  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_rescquery" "', argument " "5"" of type '" "int *""'"); 
+  }
+  arg5 = (int *)(argp5);
+  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res6)) {
+    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_rescquery" "', argument " "6"" of type '" "int *""'"); 
+  }
+  arg6 = (int *)(argp6);
+  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res7)) {
+    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "pbs_rescquery" "', argument " "7"" of type '" "int *""'"); 
+  }
+  arg7 = (int *)(argp7);
+  result = (int)pbs_rescquery(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
+  resultobj = SWIG_From_int((int)(result));
+  {
+    free( (char *) arg2);
+  }
+  return resultobj;
+fail:
+  {
+    free( (char *) arg2);
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rescreserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char **arg2 = (char **) 0 ;
+  int arg3 ;
+  resource_t *arg4 = (resource_t *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rescreserve",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescreserve" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_char, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rescreserve" "', argument " "2"" of type '" "char **""'"); 
+  }
+  arg2 = (char **)(argp2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_rescreserve" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rescreserve" "', argument " "4"" of type '" "resource_t *""'"); 
+  }
+  arg4 = (resource_t *)(argp4);
+  result = (int)pbs_rescreserve(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  {
+    free( (char *) arg2);
+  }
+  return resultobj;
+fail:
+  {
+    free( (char *) arg2);
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rescrelease(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  resource_t arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:pbs_rescrelease",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescrelease" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_rescrelease" "', argument " "2"" of type '" "resource_t""'");
+  } 
+  arg2 = (resource_t)(val2);
+  result = (int)pbs_rescrelease(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rerunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_rerunjob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rerunjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rerunjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_rerunjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)pbs_rerunjob(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rlsjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rlsjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rlsjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rlsjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_rlsjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rlsjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_rlsjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_runjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_runjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_runjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_runjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_runjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_runjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_runjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_selectjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  struct attropl *arg2 = (struct attropl *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  char **result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_selectjob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_selectjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    PyObject          *py_obj;
+    struct attropl    *ptr, *prev;
+    char              s[255];
+    int               i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n");
+    
+    size = Get_List_Size(obj1);
+    
+    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    //printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg2 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_selectjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (char **)pbs_selectjob(arg1,arg2,arg3);
+  {
+    int len=0, i;
+    
+    if (SARA_DEBUG) 
+    printf("Converteren char ** -> python list\n");
+    
+    
+    if (result == NULL) 
+    resultobj = PyList_New(0);
+    else {
+      while (result[len]) 
+      len++;
+    }
+    
+    if (SARA_DEBUG) 
+    printf("\tSize of List: %d\n", len);
+    
+    resultobj = PyList_New(len);
+    if (SARA_DEBUG) 
+    printf("\t<Contents>\n");
+    for (i=0; i < len; i++ ) {
+      PyList_SetItem(resultobj, i , PyString_FromString(result[i])); 
+      if (SARA_DEBUG) 
+      printf("\t\t- %s\n", result[i]);
+    }
+    if (SARA_DEBUG) 
+    printf("\t</Contents>\n");
+  }
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_sigjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_sigjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_sigjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_sigjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_sigjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_sigjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_sigjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_sigjobasync(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_sigjobasync",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_sigjobasync" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_sigjobasync" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_sigjobasync" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_sigjobasync" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_sigjobasync(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statfree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_statfree",&obj0)) SWIG_fail;
+  {
+    PyObject              *py_obj;
+    struct batch_status   *ptr, *prev;
+    char                  s[255];
+    int                   i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct batch_status *):\n");
+    
+    size = Get_List_Size(obj0);
+    if (SARA_DEBUG) printf("\tSize of batch_status list: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    // printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg1 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj0, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_batch_status, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg1 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      prev = ptr;
+      
+    } // end for
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  pbs_statfree(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_statjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_statjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (struct batch_status *)pbs_statjob(arg1,arg2,arg3,arg4);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_selstat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  struct attropl *arg2 = (struct attropl *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_selstat",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_selstat" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    PyObject          *py_obj;
+    struct attropl    *ptr, *prev;
+    char              s[255];
+    int               i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n");
+    
+    size = Get_List_Size(obj1);
+    
+    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    //printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg2 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_selstat" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (struct batch_status *)pbs_selstat(arg1,arg2,arg3);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statque(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statque",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statque" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_statque" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_statque" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (struct batch_status *)pbs_statque(arg1,arg2,arg3,arg4);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statserver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  struct attrl *arg2 = (struct attrl *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_statserver",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statserver" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj1);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg2 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_statserver" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (struct batch_status *)pbs_statserver(arg1,arg2,arg3);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statnode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statnode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statnode" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_statnode" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_statnode" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (struct batch_status *)pbs_statnode(arg1,arg2,arg3,arg4);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_submit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  struct attropl *arg2 = (struct attropl *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  char *arg5 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  int res5 ;
+  char *buf5 = 0 ;
+  int alloc5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_submit",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_submit" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    PyObject          *py_obj;
+    struct attropl    *ptr, *prev;
+    char              s[255];
+    int               i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n");
+    
+    size = Get_List_Size(obj1);
+    
+    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    //printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg2 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_submit" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_submit" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_submit" "', argument " "5"" of type '" "char *""'");
+  }
+  arg5 = (char *)(buf5);
+  result = (char *)pbs_submit(arg1,arg2,arg3,arg4,arg5);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_submit_hash(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  memmgr **arg2 = (memmgr **) 0 ;
+  job_data *arg3 = (job_data *) 0 ;
+  job_data *arg4 = (job_data *) 0 ;
+  char *arg5 = (char *) 0 ;
+  char *arg6 = (char *) 0 ;
+  char *arg7 = (char *) 0 ;
+  char **arg8 = (char **) 0 ;
+  char **arg9 = (char **) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  void *argp3 = 0 ;
+  int res3 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  int res5 ;
+  char *buf5 = 0 ;
+  int alloc5 = 0 ;
+  int res6 ;
+  char *buf6 = 0 ;
+  int alloc6 = 0 ;
+  int res7 ;
+  char *buf7 = 0 ;
+  int alloc7 = 0 ;
+  void *argp8 = 0 ;
+  int res8 = 0 ;
+  void *argp9 = 0 ;
+  int res9 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  PyObject * obj7 = 0 ;
+  PyObject * obj8 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:pbs_submit_hash",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_submit_hash" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_memmgr, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_submit_hash" "', argument " "2"" of type '" "memmgr **""'"); 
+  }
+  arg2 = (memmgr **)(argp2);
+  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_job_data, 0 |  0 );
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_submit_hash" "', argument " "3"" of type '" "job_data *""'"); 
+  }
+  arg3 = (job_data *)(argp3);
+  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_job_data, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_submit_hash" "', argument " "4"" of type '" "job_data *""'"); 
+  }
+  arg4 = (job_data *)(argp4);
+  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_submit_hash" "', argument " "5"" of type '" "char *""'");
+  }
+  arg5 = (char *)(buf5);
+  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
+  if (!SWIG_IsOK(res6)) {
+    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_submit_hash" "', argument " "6"" of type '" "char *""'");
+  }
+  arg6 = (char *)(buf6);
+  res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
+  if (!SWIG_IsOK(res7)) {
+    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "pbs_submit_hash" "', argument " "7"" of type '" "char *""'");
+  }
+  arg7 = (char *)(buf7);
+  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_p_char, 0 |  0 );
+  if (!SWIG_IsOK(res8)) {
+    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "pbs_submit_hash" "', argument " "8"" of type '" "char **""'"); 
+  }
+  arg8 = (char **)(argp8);
+  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_p_char, 0 |  0 );
+  if (!SWIG_IsOK(res9)) {
+    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "pbs_submit_hash" "', argument " "9"" of type '" "char **""'"); 
+  }
+  arg9 = (char **)(argp9);
+  result = (int)pbs_submit_hash(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  if (alloc7 == SWIG_NEWOBJ) free((char*)buf7);
+  {
+    free( (char *) arg8);
+  }
+  {
+    free( (char *) arg9);
+  }
+  return resultobj;
+fail:
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  if (alloc7 == SWIG_NEWOBJ) free((char*)buf7);
+  {
+    free( (char *) arg8);
+  }
+  {
+    free( (char *) arg9);
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_terminate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_terminate",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_terminate" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_terminate" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_terminate" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)pbs_terminate(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_totpool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:totpool",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "totpool" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "totpool" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  result = (int)totpool(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_usepool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:usepool",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "usepool" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "usepool" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  result = (int)usepool(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_gpumode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int arg4 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_gpumode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_gpumode" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_gpumode" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_gpumode" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pbs_gpumode" "', argument " "4"" of type '" "int""'");
+  } 
+  arg4 = (int)(val4);
+  result = (int)pbs_gpumode(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_trq_set_preferred_network_interface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  struct sockaddr *arg2 = (struct sockaddr *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:trq_set_preferred_network_interface",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "trq_set_preferred_network_interface" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_sockaddr, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "trq_set_preferred_network_interface" "', argument " "2"" of type '" "struct sockaddr *""'"); 
+  }
+  arg2 = (struct sockaddr *)(argp2);
+  result = (int)trq_set_preferred_network_interface(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_trq_get_if_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":trq_get_if_name")) SWIG_fail;
+  result = (char *)trq_get_if_name();
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_stagein(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_stagein",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_stagein" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_stagein" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_stagein" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_stagein" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_stagein(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_openrm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  unsigned int arg2 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:openrm",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "openrm" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "openrm" "', argument " "2"" of type '" "unsigned int""'");
+  } 
+  arg2 = (unsigned int)(val2);
+  result = (int)openrm(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_closerm_err(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int *arg1 = (int *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:closerm_err",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "closerm_err" "', argument " "1"" of type '" "int *""'"); 
+  }
+  arg1 = (int *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "closerm_err" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  result = (int)closerm_err(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_closerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:closerm",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "closerm" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (int)closerm(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_downrm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int *arg1 = (int *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:downrm",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "downrm" "', argument " "1"" of type '" "int *""'"); 
+  }
+  arg1 = (int *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "downrm" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  result = (int)downrm(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_configrm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int *arg2 = (int *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:configrm",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "configrm" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "configrm" "', argument " "2"" of type '" "int *""'"); 
+  }
+  arg2 = (int *)(argp2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "configrm" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)configrm(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_addreq_err(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int *arg2 = (int *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:addreq_err",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "addreq_err" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "addreq_err" "', argument " "2"" of type '" "int *""'"); 
+  }
+  arg2 = (int *)(argp2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "addreq_err" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)addreq_err(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_begin_rm_req(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int *arg2 = (int *) 0 ;
+  int arg3 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:begin_rm_req",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "begin_rm_req" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "begin_rm_req" "', argument " "2"" of type '" "int *""'"); 
+  }
+  arg2 = (int *)(argp2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "begin_rm_req" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  result = (int)begin_rm_req(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_addreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:addreq",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "addreq" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "addreq" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  result = (int)addreq(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_allreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:allreq",&obj0)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "allreq" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  result = (int)allreq(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_getreq_err(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int *arg1 = (int *) 0 ;
+  int arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:getreq_err",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getreq_err" "', argument " "1"" of type '" "int *""'"); 
+  }
+  arg1 = (int *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "getreq_err" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  result = (char *)getreq_err(arg1,arg2);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_getreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:getreq",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getreq" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (char *)getreq(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_flushreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":flushreq")) SWIG_fail;
+  result = (int)flushreq();
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_activereq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":activereq")) SWIG_fail;
+  result = (int)activereq();
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_fullresp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:fullresp",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fullresp" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  fullresp(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN int Swig_var_log_event_mask_set(PyObject *_val) {
+  {
+    void *argp = 0;
+    int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_long,  0 );  
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""log_event_mask""' of type '""long *""'");
+    }
+    log_event_mask = (long *)(argp);
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_log_event_mask_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(log_event_mask), SWIGTYPE_p_long,  0 );
+  return pyobj;
+}
+
+
+SWIGINTERN int Swig_var_log_mutex_set(PyObject *_val) {
+  {
+    void *argp = 0;
+    int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_pthread_mutex_t,  0 );
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""log_mutex""' of type '""pthread_mutex_t""'");
+    }
+    if (!argp) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""log_mutex""' of type '""pthread_mutex_t""'");
+    } else {
+      log_mutex = *((pthread_mutex_t *)(argp));
+    }
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_log_mutex_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&log_mutex), SWIGTYPE_p_pthread_mutex_t,  0 );
+  return pyobj;
+}
+
+
+SWIGINTERN int Swig_var_job_log_mutex_set(PyObject *_val) {
+  {
+    void *argp = 0;
+    int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_pthread_mutex_t,  0 );
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""job_log_mutex""' of type '""pthread_mutex_t""'");
+    }
+    if (!argp) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""job_log_mutex""' of type '""pthread_mutex_t""'");
+    } else {
+      job_log_mutex = *((pthread_mutex_t *)(argp));
+    }
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_job_log_mutex_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&job_log_mutex), SWIGTYPE_p_pthread_mutex_t,  0 );
+  return pyobj;
+}
+
+
+SWIGINTERN int Swig_var_chk_file_sec_stderr_set(PyObject *_val) {
+  {
+    int val;
+    int res = SWIG_AsVal_int(_val, &val);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""chk_file_sec_stderr""' of type '""int""'");
+    }
+    chk_file_sec_stderr = (int)(val);
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_chk_file_sec_stderr_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_From_int((int)(chk_file_sec_stderr));
+  return pyobj;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_err(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:log_err",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_err" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "log_err" "', argument " "2"" of type '" "char const *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_err" "', argument " "3"" of type '" "char const *""'");
+  }
+  arg3 = (char *)(buf3);
+  log_err(arg1,(char const *)arg2,(char const *)arg3);
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_ext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int arg4 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:log_ext",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_ext" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "log_ext" "', argument " "2"" of type '" "char const *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_ext" "', argument " "3"" of type '" "char const *""'");
+  }
+  arg3 = (char *)(buf3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "log_ext" "', argument " "4"" of type '" "int""'");
+  } 
+  arg4 = (int)(val4);
+  log_ext(arg1,(char const *)arg2,(char const *)arg3,arg4);
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:log_event",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_event" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "log_event" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_event" "', argument " "3"" of type '" "char const *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "log_event" "', argument " "4"" of type '" "char const *""'");
+  }
+  arg4 = (char *)(buf4);
+  log_event(arg1,arg2,(char const *)arg3,(char const *)arg4);
+  resultobj = SWIG_Py_Void();
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_record(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:log_record",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_record" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "log_record" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_record" "', argument " "3"" of type '" "char const *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "log_record" "', argument " "4"" of type '" "char const *""'");
+  }
+  arg4 = (char *)(buf4);
+  log_record(arg1,arg2,(char const *)arg3,(char const *)arg4);
+  resultobj = SWIG_Py_Void();
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_available(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  bool result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:log_available",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_available" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (bool)log_available(arg1);
+  resultobj = SWIG_From_bool((bool)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN int Swig_var_log_buffer_set(PyObject *_val) {
+  {
+    int res = SWIG_AsCharArray(_val, log_buffer, 16384);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""log_buffer""' of type '""char [16384]""'");
+    }
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_log_buffer_get(void) {
+  PyObject *pyobj = 0;
+  
+  size_t size = 16384;
+  
+  while (size && (log_buffer[size - 1] == '\0')) --size;
+  
+  pyobj = SWIG_FromCharPtrAndSize(log_buffer, size);
+  return pyobj;
+}
+
+
+static PyMethodDef SwigMethods[] = {
+	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
+	 { (char *)"new_attrl", _wrap_new_attrl, METH_VARARGS, NULL},
+	 { (char *)"new_attropl", _wrap_new_attropl, METH_VARARGS, NULL},
+	 { (char *)"new_batch_status", _wrap_new_batch_status, METH_VARARGS, NULL},
+	 { (char *)"get_error", _wrap_get_error, METH_VARARGS, NULL},
+	 { (char *)"new_attrlArray", _wrap_new_attrlArray, METH_VARARGS, NULL},
+	 { (char *)"delete_attrlArray", _wrap_delete_attrlArray, METH_VARARGS, NULL},
+	 { (char *)"attrlArray___getitem__", _wrap_attrlArray___getitem__, METH_VARARGS, NULL},
+	 { (char *)"attrlArray___setitem__", _wrap_attrlArray___setitem__, METH_VARARGS, NULL},
+	 { (char *)"attrlArray_cast", _wrap_attrlArray_cast, METH_VARARGS, NULL},
+	 { (char *)"attrlArray_frompointer", _wrap_attrlArray_frompointer, METH_VARARGS, NULL},
+	 { (char *)"attrlArray_swigregister", attrlArray_swigregister, METH_VARARGS, NULL},
+	 { (char *)"attrl_next_set", _wrap_attrl_next_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_next_get", _wrap_attrl_next_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_name_set", _wrap_attrl_name_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_name_get", _wrap_attrl_name_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_resource_set", _wrap_attrl_resource_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_resource_get", _wrap_attrl_resource_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_value_set", _wrap_attrl_value_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_value_get", _wrap_attrl_value_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_op_set", _wrap_attrl_op_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_op_get", _wrap_attrl_op_get, METH_VARARGS, NULL},
+	 { (char *)"attrl___str__", _wrap_attrl___str__, METH_VARARGS, NULL},
+	 { (char *)"delete_attrl", _wrap_delete_attrl, METH_VARARGS, NULL},
+	 { (char *)"attrl_swigregister", attrl_swigregister, METH_VARARGS, NULL},
+	 { (char *)"attropl_next_set", _wrap_attropl_next_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_next_get", _wrap_attropl_next_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_name_set", _wrap_attropl_name_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_name_get", _wrap_attropl_name_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_resource_set", _wrap_attropl_resource_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_resource_get", _wrap_attropl_resource_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_value_set", _wrap_attropl_value_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_value_get", _wrap_attropl_value_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_op_set", _wrap_attropl_op_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_op_get", _wrap_attropl_op_get, METH_VARARGS, NULL},
+	 { (char *)"attropl___str__", _wrap_attropl___str__, METH_VARARGS, NULL},
+	 { (char *)"delete_attropl", _wrap_delete_attropl, METH_VARARGS, NULL},
+	 { (char *)"attropl_swigregister", attropl_swigregister, METH_VARARGS, NULL},
+	 { (char *)"batch_status_next_set", _wrap_batch_status_next_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_next_get", _wrap_batch_status_next_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_name_set", _wrap_batch_status_name_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_name_get", _wrap_batch_status_name_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_attribs_set", _wrap_batch_status_attribs_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_attribs_get", _wrap_batch_status_attribs_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_text_set", _wrap_batch_status_text_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_text_get", _wrap_batch_status_text_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_swigregister", batch_status_swigregister, METH_VARARGS, NULL},
+	 { (char *)"avail", _wrap_avail, METH_VARARGS, NULL},
+	 { (char *)"pbs_asyrunjob", _wrap_pbs_asyrunjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_alterjob_async", _wrap_pbs_alterjob_async, METH_VARARGS, NULL},
+	 { (char *)"pbs_alterjob", _wrap_pbs_alterjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_connect", _wrap_pbs_connect, METH_VARARGS, NULL},
+	 { (char *)"pbs_default", _wrap_pbs_default, METH_VARARGS, NULL},
+	 { (char *)"pbs_fbserver", _wrap_pbs_fbserver, METH_VARARGS, NULL},
+	 { (char *)"pbs_get_server_list", _wrap_pbs_get_server_list, METH_VARARGS, NULL},
+	 { (char *)"pbs_deljob", _wrap_pbs_deljob, METH_VARARGS, NULL},
+	 { (char *)"pbs_disconnect", _wrap_pbs_disconnect, METH_VARARGS, NULL},
+	 { (char *)"pbs_geterrmsg", _wrap_pbs_geterrmsg, METH_VARARGS, NULL},
+	 { (char *)"pbs_holdjob", _wrap_pbs_holdjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_checkpointjob", _wrap_pbs_checkpointjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_locjob", _wrap_pbs_locjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_manager", _wrap_pbs_manager, METH_VARARGS, NULL},
+	 { (char *)"pbs_movejob", _wrap_pbs_movejob, METH_VARARGS, NULL},
+	 { (char *)"pbs_msgjob", _wrap_pbs_msgjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_orderjob", _wrap_pbs_orderjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_rescquery", _wrap_pbs_rescquery, METH_VARARGS, NULL},
+	 { (char *)"pbs_rescreserve", _wrap_pbs_rescreserve, METH_VARARGS, NULL},
+	 { (char *)"pbs_rescrelease", _wrap_pbs_rescrelease, METH_VARARGS, NULL},
+	 { (char *)"pbs_rerunjob", _wrap_pbs_rerunjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_rlsjob", _wrap_pbs_rlsjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_runjob", _wrap_pbs_runjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_selectjob", _wrap_pbs_selectjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_sigjob", _wrap_pbs_sigjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_sigjobasync", _wrap_pbs_sigjobasync, METH_VARARGS, NULL},
+	 { (char *)"pbs_statfree", _wrap_pbs_statfree, METH_VARARGS, NULL},
+	 { (char *)"pbs_statjob", _wrap_pbs_statjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_selstat", _wrap_pbs_selstat, METH_VARARGS, NULL},
+	 { (char *)"pbs_statque", _wrap_pbs_statque, METH_VARARGS, NULL},
+	 { (char *)"pbs_statserver", _wrap_pbs_statserver, METH_VARARGS, NULL},
+	 { (char *)"pbs_statnode", _wrap_pbs_statnode, METH_VARARGS, NULL},
+	 { (char *)"pbs_submit", _wrap_pbs_submit, METH_VARARGS, NULL},
+	 { (char *)"pbs_submit_hash", _wrap_pbs_submit_hash, METH_VARARGS, NULL},
+	 { (char *)"pbs_terminate", _wrap_pbs_terminate, METH_VARARGS, NULL},
+	 { (char *)"totpool", _wrap_totpool, METH_VARARGS, NULL},
+	 { (char *)"usepool", _wrap_usepool, METH_VARARGS, NULL},
+	 { (char *)"pbs_gpumode", _wrap_pbs_gpumode, METH_VARARGS, NULL},
+	 { (char *)"trq_set_preferred_network_interface", _wrap_trq_set_preferred_network_interface, METH_VARARGS, NULL},
+	 { (char *)"trq_get_if_name", _wrap_trq_get_if_name, METH_VARARGS, NULL},
+	 { (char *)"pbs_stagein", _wrap_pbs_stagein, METH_VARARGS, NULL},
+	 { (char *)"openrm", _wrap_openrm, METH_VARARGS, NULL},
+	 { (char *)"closerm_err", _wrap_closerm_err, METH_VARARGS, NULL},
+	 { (char *)"closerm", _wrap_closerm, METH_VARARGS, NULL},
+	 { (char *)"downrm", _wrap_downrm, METH_VARARGS, NULL},
+	 { (char *)"configrm", _wrap_configrm, METH_VARARGS, NULL},
+	 { (char *)"addreq_err", _wrap_addreq_err, METH_VARARGS, NULL},
+	 { (char *)"begin_rm_req", _wrap_begin_rm_req, METH_VARARGS, NULL},
+	 { (char *)"addreq", _wrap_addreq, METH_VARARGS, NULL},
+	 { (char *)"allreq", _wrap_allreq, METH_VARARGS, NULL},
+	 { (char *)"getreq_err", _wrap_getreq_err, METH_VARARGS, NULL},
+	 { (char *)"getreq", _wrap_getreq, METH_VARARGS, NULL},
+	 { (char *)"flushreq", _wrap_flushreq, METH_VARARGS, NULL},
+	 { (char *)"activereq", _wrap_activereq, METH_VARARGS, NULL},
+	 { (char *)"fullresp", _wrap_fullresp, METH_VARARGS, NULL},
+	 { (char *)"log_err", _wrap_log_err, METH_VARARGS, NULL},
+	 { (char *)"log_ext", _wrap_log_ext, METH_VARARGS, NULL},
+	 { (char *)"log_event", _wrap_log_event, METH_VARARGS, NULL},
+	 { (char *)"log_record", _wrap_log_record, METH_VARARGS, NULL},
+	 { (char *)"log_available", _wrap_log_available, METH_VARARGS, NULL},
+	 { NULL, NULL, 0, NULL }
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
+
+static void *_p_attrlArrayTo_p_attrl(void *x, int *SWIGUNUSEDPARM(newmemory)) {
+    return (void *)((struct attrl *)  ((attrlArray *) x));
+}
+static swig_type_info _swigt__p_attrl = {"_p_attrl", "struct attrl *|attrl *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_attrlArray = {"_p_attrlArray", "attrlArray *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_attropl = {"_p_attropl", "struct attropl *|attropl *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_batch_status = {"_p_batch_status", "struct batch_status *|batch_status *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_getter_setter = {"_p_getter_setter", "enum getter_setter *|SGetter *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_int = {"_p_int", "int *|resource_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_job_data = {"_p_job_data", "job_data *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_p_memmgr = {"_p_p_memmgr", "memmgr **", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_pthread_mutex_t = {"_p_pthread_mutex_t", "pthread_mutex_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_sockaddr = {"_p_sockaddr", "struct sockaddr *", 0, 0, (void*)0, 0};
+
+static swig_type_info *swig_type_initial[] = {
+  &_swigt__p_attrl,
+  &_swigt__p_attrlArray,
+  &_swigt__p_attropl,
+  &_swigt__p_batch_status,
+  &_swigt__p_char,
+  &_swigt__p_getter_setter,
+  &_swigt__p_int,
+  &_swigt__p_job_data,
+  &_swigt__p_long,
+  &_swigt__p_p_char,
+  &_swigt__p_p_memmgr,
+  &_swigt__p_pthread_mutex_t,
+  &_swigt__p_sockaddr,
+};
+
+static swig_cast_info _swigc__p_attrl[] = {  {&_swigt__p_attrlArray, _p_attrlArrayTo_p_attrl, 0, 0},  {&_swigt__p_attrl, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_attrlArray[] = {  {&_swigt__p_attrlArray, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_attropl[] = {  {&_swigt__p_attropl, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_batch_status[] = {  {&_swigt__p_batch_status, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_getter_setter[] = {  {&_swigt__p_getter_setter, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_job_data[] = {  {&_swigt__p_job_data, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_long[] = {  {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_p_memmgr[] = {  {&_swigt__p_p_memmgr, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_pthread_mutex_t[] = {  {&_swigt__p_pthread_mutex_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_sockaddr[] = {  {&_swigt__p_sockaddr, 0, 0, 0},{0, 0, 0, 0}};
+
+static swig_cast_info *swig_cast_initial[] = {
+  _swigc__p_attrl,
+  _swigc__p_attrlArray,
+  _swigc__p_attropl,
+  _swigc__p_batch_status,
+  _swigc__p_char,
+  _swigc__p_getter_setter,
+  _swigc__p_int,
+  _swigc__p_job_data,
+  _swigc__p_long,
+  _swigc__p_p_char,
+  _swigc__p_p_memmgr,
+  _swigc__p_pthread_mutex_t,
+  _swigc__p_sockaddr,
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
+
+static swig_const_info swig_const_table[] = {
+{0, 0, 0, 0.0, 0, 0}};
+
+#ifdef __cplusplus
+}
+#endif
+/* -----------------------------------------------------------------------------
+ * Type initialization:
+ * This problem is tough by the requirement that no dynamic 
+ * memory is used. Also, since swig_type_info structures store pointers to 
+ * swig_cast_info structures and swig_cast_info structures store pointers back
+ * to swig_type_info structures, we need some lookup code at initialization. 
+ * The idea is that swig generates all the structures that are needed. 
+ * The runtime then collects these partially filled structures. 
+ * The SWIG_InitializeModule function takes these initial arrays out of 
+ * swig_module, and does all the lookup, filling in the swig_module.types
+ * array with the correct data and linking the correct swig_cast_info
+ * structures together.
+ *
+ * The generated swig_type_info structures are assigned staticly to an initial 
+ * array. We just loop through that array, and handle each type individually.
+ * First we lookup if this type has been already loaded, and if so, use the
+ * loaded structure instead of the generated one. Then we have to fill in the
+ * cast linked list. The cast data is initially stored in something like a
+ * two-dimensional array. Each row corresponds to a type (there are the same
+ * number of rows as there are in the swig_type_initial array). Each entry in
+ * a column is one of the swig_cast_info structures for that type.
+ * The cast_initial array is actually an array of arrays, because each row has
+ * a variable number of columns. So to actually build the cast linked list,
+ * we find the array of casts associated with the type, and loop through it 
+ * adding the casts to the list. The one last trick we need to do is making
+ * sure the type pointer in the swig_cast_info struct is correct.
+ *
+ * First off, we lookup the cast->type name to see if it is already loaded. 
+ * There are three cases to handle:
+ *  1) If the cast->type has already been loaded AND the type we are adding
+ *     casting info to has not been loaded (it is in this module), THEN we
+ *     replace the cast->type pointer with the type pointer that has already
+ *     been loaded.
+ *  2) If BOTH types (the one we are adding casting info to, and the 
+ *     cast->type) are loaded, THEN the cast info has already been loaded by
+ *     the previous module so we just ignore it.
+ *  3) Finally, if cast->type has not already been loaded, then we add that
+ *     swig_cast_info to the linked list (because the cast->type) pointer will
+ *     be correct.
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* c-mode */
+#endif
+#endif
+
+#if 0
+#define SWIGRUNTIME_DEBUG
+#endif
+
+
+SWIGRUNTIME void
+SWIG_InitializeModule(void *clientdata) {
+  size_t i;
+  swig_module_info *module_head, *iter;
+  int found, init;
+  
+  clientdata = clientdata;
+  
+  /* check to see if the circular list has been setup, if not, set it up */
+  if (swig_module.next==0) {
+    /* Initialize the swig_module */
+    swig_module.type_initial = swig_type_initial;
+    swig_module.cast_initial = swig_cast_initial;
+    swig_module.next = &swig_module;
+    init = 1;
+  } else {
+    init = 0;
+  }
+  
+  /* Try and load any already created modules */
+  module_head = SWIG_GetModule(clientdata);
+  if (!module_head) {
+    /* This is the first module loaded for this interpreter */
+    /* so set the swig module into the interpreter */
+    SWIG_SetModule(clientdata, &swig_module);
+    module_head = &swig_module;
+  } else {
+    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
+    found=0;
+    iter=module_head;
+    do {
+      if (iter==&swig_module) {
+        found=1;
+        break;
+      }
+      iter=iter->next;
+    } while (iter!= module_head);
+    
+    /* if the is found in the list, then all is done and we may leave */
+    if (found) return;
+    /* otherwise we must add out module into the list */
+    swig_module.next = module_head->next;
+    module_head->next = &swig_module;
+  }
+  
+  /* When multiple interpeters are used, a module could have already been initialized in
+       a different interpreter, but not yet have a pointer in this interpreter.
+       In this case, we do not want to continue adding types... everything should be
+       set up already */
+  if (init == 0) return;
+  
+  /* Now work on filling in swig_module.types */
+#ifdef SWIGRUNTIME_DEBUG
+  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
+#endif
+  for (i = 0; i < swig_module.size; ++i) {
+    swig_type_info *type = 0;
+    swig_type_info *ret;
+    swig_cast_info *cast;
+    
+#ifdef SWIGRUNTIME_DEBUG
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+#endif
+    
+    /* if there is another module already loaded */
+    if (swig_module.next != &swig_module) {
+      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
+    }
+    if (type) {
+      /* Overwrite clientdata field */
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: found type %s\n", type->name);
+#endif
+      if (swig_module.type_initial[i]->clientdata) {
+        type->clientdata = swig_module.type_initial[i]->clientdata;
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
+#endif
+      }
+    } else {
+      type = swig_module.type_initial[i];
+    }
+    
+    /* Insert casting types */
+    cast = swig_module.cast_initial[i];
+    while (cast->type) {
+      /* Don't need to add information already in the list */
+      ret = 0;
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
+#endif
+      if (swig_module.next != &swig_module) {
+        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
+#ifdef SWIGRUNTIME_DEBUG
+        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
+#endif
+      }
+      if (ret) {
+        if (type == swig_module.type_initial[i]) {
+#ifdef SWIGRUNTIME_DEBUG
+          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
+#endif
+          cast->type = ret;
+          ret = 0;
+        } else {
+          /* Check for casting already in the list */
+          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
+#ifdef SWIGRUNTIME_DEBUG
+          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
+#endif
+          if (!ocast) ret = 0;
+        }
+      }
+      
+      if (!ret) {
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
+#endif
+        if (type->cast) {
+          type->cast->prev = cast;
+          cast->next = type->cast;
+        }
+        type->cast = cast;
+      }
+      cast++;
+    }
+    /* Set entry in modules->types array equal to the type */
+    swig_module.types[i] = type;
+  }
+  swig_module.types[i] = 0;
+  
+#ifdef SWIGRUNTIME_DEBUG
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+  for (i = 0; i < swig_module.size; ++i) {
+    int j = 0;
+    swig_cast_info *cast = swig_module.cast_initial[i];
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+    while (cast->type) {
+      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
+      cast++;
+      ++j;
+    }
+    printf("---- Total casts: %d\n",j);
+  }
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+#endif
+}
+
+/* This function will propagate the clientdata field of type to
+* any new swig_type_info structures that have been added into the list
+* of equivalent types.  It is like calling
+* SWIG_TypeClientData(type, clientdata) a second time.
+*/
+SWIGRUNTIME void
+SWIG_PropagateClientData(void) {
+  size_t i;
+  swig_cast_info *equiv;
+  static int init_run = 0;
+  
+  if (init_run) return;
+  init_run = 1;
+  
+  for (i = 0; i < swig_module.size; i++) {
+    if (swig_module.types[i]->clientdata) {
+      equiv = swig_module.types[i]->cast;
+      while (equiv) {
+        if (!equiv->converter) {
+          if (equiv->type && !equiv->type->clientdata)
+          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
+        }
+        equiv = equiv->next;
+      }
+    }
+  }
+}
+
+#ifdef __cplusplus
+#if 0
+{
+  /* c-mode */
+#endif
+}
+#endif
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+  
+  /* Python-specific SWIG API */
+#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
+#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
+#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
+  
+  /* -----------------------------------------------------------------------------
+   * global variable support code.
+   * ----------------------------------------------------------------------------- */
+  
+  typedef struct swig_globalvar {
+    char       *name;                  /* Name of global variable */
+    PyObject *(*get_attr)(void);       /* Return the current value */
+    int       (*set_attr)(PyObject *); /* Set the value */
+    struct swig_globalvar *next;
+  } swig_globalvar;
+  
+  typedef struct swig_varlinkobject {
+    PyObject_HEAD
+    swig_globalvar *vars;
+  } swig_varlinkobject;
+  
+  SWIGINTERN PyObject *
+  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
+#if PY_VERSION_HEX >= 0x03000000
+    return PyUnicode_InternFromString("<Swig global variables>");
+#else
+    return PyString_FromString("<Swig global variables>");
+#endif
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_str(swig_varlinkobject *v) {
+#if PY_VERSION_HEX >= 0x03000000
+    PyObject *str = PyUnicode_InternFromString("(");
+    PyObject *tail;
+    PyObject *joined;
+    swig_globalvar *var;
+    for (var = v->vars; var; var=var->next) {
+      tail = PyUnicode_FromString(var->name);
+      joined = PyUnicode_Concat(str, tail);
+      Py_DecRef(str);
+      Py_DecRef(tail);
+      str = joined;
+      if (var->next) {
+        tail = PyUnicode_InternFromString(", ");
+        joined = PyUnicode_Concat(str, tail);
+        Py_DecRef(str);
+        Py_DecRef(tail);
+        str = joined;
+      }
+    }
+    tail = PyUnicode_InternFromString(")");
+    joined = PyUnicode_Concat(str, tail);
+    Py_DecRef(str);
+    Py_DecRef(tail);
+    str = joined;
+#else
+    PyObject *str = PyString_FromString("(");
+    swig_globalvar *var;
+    for (var = v->vars; var; var=var->next) {
+      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
+      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
+    }
+    PyString_ConcatAndDel(&str,PyString_FromString(")"));
+#endif
+    return str;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
+    char *tmp;
+    PyObject *str = swig_varlink_str(v);
+    fprintf(fp,"Swig global variables ");
+    fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
+    SWIG_Python_str_DelForPy3(tmp);
+    Py_DECREF(str);
+    return 0;
+  }
+  
+  SWIGINTERN void
+  swig_varlink_dealloc(swig_varlinkobject *v) {
+    swig_globalvar *var = v->vars;
+    while (var) {
+      swig_globalvar *n = var->next;
+      free(var->name);
+      free(var);
+      var = n;
+    }
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
+    PyObject *res = NULL;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->get_attr)();
+        break;
+      }
+      var = var->next;
+    }
+    if (res == NULL && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
+    int res = 1;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->set_attr)(p);
+        break;
+      }
+      var = var->next;
+    }
+    if (res == 1 && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN PyTypeObject*
+  swig_varlink_type(void) {
+    static char varlink__doc__[] = "Swig var link object";
+    static PyTypeObject varlink_type;
+    static int type_init = 0;
+    if (!type_init) {
+      const PyTypeObject tmp = {
+        /* PyObject header changed in Python 3 */
+#if PY_VERSION_HEX >= 0x03000000
+        PyVarObject_HEAD_INIT(NULL, 0)
+#else
+        PyObject_HEAD_INIT(NULL)
+        0,                                  /* ob_size */
+#endif
+        (char *)"swigvarlink",              /* tp_name */
+        sizeof(swig_varlinkobject),         /* tp_basicsize */
+        0,                                  /* tp_itemsize */
+        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
+        (printfunc) swig_varlink_print,     /* tp_print */
+        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
+        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
+        0,                                  /* tp_compare */
+        (reprfunc) swig_varlink_repr,       /* tp_repr */
+        0,                                  /* tp_as_number */
+        0,                                  /* tp_as_sequence */
+        0,                                  /* tp_as_mapping */
+        0,                                  /* tp_hash */
+        0,                                  /* tp_call */
+        (reprfunc) swig_varlink_str,        /* tp_str */
+        0,                                  /* tp_getattro */
+        0,                                  /* tp_setattro */
+        0,                                  /* tp_as_buffer */
+        0,                                  /* tp_flags */
+        varlink__doc__,                     /* tp_doc */
+        0,                                  /* tp_traverse */
+        0,                                  /* tp_clear */
+        0,                                  /* tp_richcompare */
+        0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+        0,                                  /* tp_del */
+#endif
+#if PY_VERSION_HEX >= 0x02060000
+        0,                                  /* tp_version */
+#endif
+#ifdef COUNT_ALLOCS
+        0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+      varlink_type = tmp;
+      type_init = 1;
+#if PY_VERSION_HEX < 0x02020000
+      varlink_type.ob_type = &PyType_Type;
+#else
+      if (PyType_Ready(&varlink_type) < 0)
+      return NULL;
+#endif
+    }
+    return &varlink_type;
+  }
+  
+  /* Create a variable linking object for use later */
+  SWIGINTERN PyObject *
+  SWIG_Python_newvarlink(void) {
+    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
+    if (result) {
+      result->vars = 0;
+    }
+    return ((PyObject*) result);
+  }
+  
+  SWIGINTERN void 
+  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
+    swig_varlinkobject *v = (swig_varlinkobject *) p;
+    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
+    if (gv) {
+      size_t size = strlen(name)+1;
+      gv->name = (char *)malloc(size);
+      if (gv->name) {
+        strncpy(gv->name,name,size);
+        gv->get_attr = get_attr;
+        gv->set_attr = set_attr;
+        gv->next = v->vars;
+      }
+    }
+    v->vars = gv;
+  }
+  
+  SWIGINTERN PyObject *
+  SWIG_globals(void) {
+    static PyObject *_SWIG_globals = 0; 
+    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
+    return _SWIG_globals;
+  }
+  
+  /* -----------------------------------------------------------------------------
+   * constants/methods manipulation
+   * ----------------------------------------------------------------------------- */
+  
+  /* Install Constants */
+  SWIGINTERN void
+  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
+    PyObject *obj = 0;
+    size_t i;
+    for (i = 0; constants[i].type; ++i) {
+      switch(constants[i].type) {
+      case SWIG_PY_POINTER:
+        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+        break;
+      case SWIG_PY_BINARY:
+        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
+        break;
+      default:
+        obj = 0;
+        break;
+      }
+      if (obj) {
+        PyDict_SetItemString(d, constants[i].name, obj);
+        Py_DECREF(obj);
+      }
+    }
+  }
+  
+  /* -----------------------------------------------------------------------------*/
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  /* -----------------------------------------------------------------------------*/
+  
+  SWIGINTERN void
+  SWIG_Python_FixMethods(PyMethodDef *methods,
+    swig_const_info *const_table,
+    swig_type_info **types,
+    swig_type_info **types_initial) {
+    size_t i;
+    for (i = 0; methods[i].ml_name; ++i) {
+      const char *c = methods[i].ml_doc;
+      if (c && (c = strstr(c, "swig_ptr: "))) {
+        int j;
+        swig_const_info *ci = 0;
+        const char *name = c + 10;
+        for (j = 0; const_table[j].type; ++j) {
+          if (strncmp(const_table[j].name, name, 
+              strlen(const_table[j].name)) == 0) {
+            ci = &(const_table[j]);
+            break;
+          }
+        }
+        if (ci) {
+          void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
+          if (ptr) {
+            size_t shift = (ci->ptype) - types;
+            swig_type_info *ty = types_initial[shift];
+            size_t ldoc = (c - methods[i].ml_doc);
+            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
+            char *ndoc = (char*)malloc(ldoc + lptr + 10);
+            if (ndoc) {
+              char *buff = ndoc;
+              strncpy(buff, methods[i].ml_doc, ldoc);
+              buff += ldoc;
+              strncpy(buff, "swig_ptr: ", 10);
+              buff += 10;
+              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
+              methods[i].ml_doc = ndoc;
+            }
+          }
+        }
+      }
+    }
+  } 
+  
+#ifdef __cplusplus
+}
+#endif
+
+/* -----------------------------------------------------------------------------*
+ *  Partial Init method
+ * -----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+extern "C"
+#endif
+
+SWIGEXPORT 
+#if PY_VERSION_HEX >= 0x03000000
+PyObject*
+#else
+void
+#endif
+SWIG_init(void) {
+  PyObject *m, *d, *md;
+#if PY_VERSION_HEX >= 0x03000000
+  static struct PyModuleDef SWIG_module = {
+# if PY_VERSION_HEX >= 0x03020000
+    PyModuleDef_HEAD_INIT,
+# else
+    {
+      PyObject_HEAD_INIT(NULL)
+      NULL, /* m_init */
+      0,    /* m_index */
+      NULL, /* m_copy */
+    },
+# endif
+    (char *) SWIG_name,
+    NULL,
+    -1,
+    SwigMethods,
+    NULL,
+    NULL,
+    NULL,
+    NULL
+  };
+#endif
+  
+#if defined(SWIGPYTHON_BUILTIN)
+  static SwigPyClientData SwigPyObject_clientdata = {
+    0, 0, 0, 0, 0, 0, 0
+  };
+  static PyGetSetDef this_getset_def = {
+    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
+  };
+  static SwigPyGetSet thisown_getset_closure = {
+    (PyCFunction) SwigPyObject_own,
+    (PyCFunction) SwigPyObject_own
+  };
+  static PyGetSetDef thisown_getset_def = {
+    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
+  };
+  PyObject *metatype_args;
+  PyTypeObject *builtin_pytype;
+  int builtin_base_count;
+  swig_type_info *builtin_basetype;
+  PyObject *tuple;
+  PyGetSetDescrObject *static_getset;
+  PyTypeObject *metatype;
+  SwigPyClientData *cd;
+  PyObject *public_interface, *public_symbol;
+  PyObject *this_descr;
+  PyObject *thisown_descr;
+  int i;
+  
+  (void)builtin_pytype;
+  (void)builtin_base_count;
+  (void)builtin_basetype;
+  (void)tuple;
+  (void)static_getset;
+  
+  /* metatype is used to implement static member variables. */
+  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
+  assert(metatype_args);
+  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
+  assert(metatype);
+  Py_DECREF(metatype_args);
+  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
+  assert(PyType_Ready(metatype) >= 0);
+#endif
+  
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
+  
+#if PY_VERSION_HEX >= 0x03000000
+  m = PyModule_Create(&SWIG_module);
+#else
+  m = Py_InitModule((char *) SWIG_name, SwigMethods);
+#endif
+  md = d = PyModule_GetDict(m);
+  
+  SWIG_InitializeModule(0);
+  
+#ifdef SWIGPYTHON_BUILTIN
+  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
+  assert(SwigPyObject_stype);
+  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
+  if (!cd) {
+    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
+    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
+  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
+    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
+# if PY_VERSION_HEX >= 0x03000000
+    return NULL;
+# else
+    return;
+# endif
+  }
+  
+  /* All objects have a 'this' attribute */
+  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
+  (void)this_descr;
+  
+  /* All objects have a 'thisown' attribute */
+  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
+  (void)thisown_descr;
+  
+  public_interface = PyList_New(0);
+  public_symbol = 0;
+  (void)public_symbol;
+  
+  PyDict_SetItemString(md, "__all__", public_interface);
+  Py_DECREF(public_interface);
+  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
+  for (i = 0; swig_const_table[i].name != 0; ++i)
+  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
+#endif
+  
+  SWIG_InstallConstants(d,swig_const_table);
+  
+  SWIG_Python_SetConstant(d, "ATTR_a",SWIG_FromCharPtr("Execution_Time"));
+  SWIG_Python_SetConstant(d, "ATTR_c",SWIG_FromCharPtr("Checkpoint"));
+  SWIG_Python_SetConstant(d, "ATTR_e",SWIG_FromCharPtr("Error_Path"));
+  SWIG_Python_SetConstant(d, "ATTR_f",SWIG_FromCharPtr("fault_tolerant"));
+  SWIG_Python_SetConstant(d, "ATTR_g",SWIG_FromCharPtr("group_list"));
+  SWIG_Python_SetConstant(d, "ATTR_h",SWIG_FromCharPtr("Hold_Types"));
+  SWIG_Python_SetConstant(d, "ATTR_j",SWIG_FromCharPtr("Join_Path"));
+  SWIG_Python_SetConstant(d, "ATTR_k",SWIG_FromCharPtr("Keep_Files"));
+  SWIG_Python_SetConstant(d, "ATTR_l",SWIG_FromCharPtr("Resource_List"));
+  SWIG_Python_SetConstant(d, "ATTR_m",SWIG_FromCharPtr("Mail_Points"));
+  SWIG_Python_SetConstant(d, "ATTR_o",SWIG_FromCharPtr("Output_Path"));
+  SWIG_Python_SetConstant(d, "ATTR_p",SWIG_FromCharPtr("Priority"));
+  SWIG_Python_SetConstant(d, "ATTR_q",SWIG_FromCharPtr("destination"));
+  SWIG_Python_SetConstant(d, "ATTR_r",SWIG_FromCharPtr("Rerunable"));
+  SWIG_Python_SetConstant(d, "ATTR_t",SWIG_FromCharPtr("job_array_request"));
+  SWIG_Python_SetConstant(d, "ATTR_array_id",SWIG_FromCharPtr("job_array_id"));
+  SWIG_Python_SetConstant(d, "ATTR_u",SWIG_FromCharPtr("User_List"));
+  SWIG_Python_SetConstant(d, "ATTR_v",SWIG_FromCharPtr("Variable_List"));
+  SWIG_Python_SetConstant(d, "ATTR_A",SWIG_FromCharPtr("Account_Name"));
+  SWIG_Python_SetConstant(d, "ATTR_args",SWIG_FromCharPtr("job_arguments"));
+  SWIG_Python_SetConstant(d, "ATTR_reservation_id",SWIG_FromCharPtr("reservation_id"));
+  SWIG_Python_SetConstant(d, "ATTR_login_node_id",SWIG_FromCharPtr("login_node_id"));
+  SWIG_Python_SetConstant(d, "ATTR_login_prop",SWIG_FromCharPtr("login_property"));
+  SWIG_Python_SetConstant(d, "ATTR_external_nodes",SWIG_FromCharPtr("external_nodes"));
+  SWIG_Python_SetConstant(d, "ATTR_multi_req_alps",SWIG_FromCharPtr("multi_req_alps"));
+  SWIG_Python_SetConstant(d, "ATTR_M",SWIG_FromCharPtr("Mail_Users"));
+  SWIG_Python_SetConstant(d, "ATTR_N",SWIG_FromCharPtr("Job_Name"));
+  SWIG_Python_SetConstant(d, "ATTR_S",SWIG_FromCharPtr("Shell_Path_List"));
+  SWIG_Python_SetConstant(d, "ATTR_depend",SWIG_FromCharPtr("depend"));
+  SWIG_Python_SetConstant(d, "ATTR_inter",SWIG_FromCharPtr("interactive"));
+  SWIG_Python_SetConstant(d, "ATTR_stagein",SWIG_FromCharPtr("stagein"));
+  SWIG_Python_SetConstant(d, "ATTR_stageout",SWIG_FromCharPtr("stageout"));
+  SWIG_Python_SetConstant(d, "ATTR_jobtype",SWIG_FromCharPtr("jobtype"));
+  SWIG_Python_SetConstant(d, "ATTR_submit_host",SWIG_FromCharPtr("submit_host"));
+  SWIG_Python_SetConstant(d, "ATTR_init_work_dir",SWIG_FromCharPtr("init_work_dir"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_initdir",SWIG_FromCharPtr("PBS_O_INITDIR"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_rootdir",SWIG_FromCharPtr("PBS_O_ROOTDIR"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_workdir",SWIG_FromCharPtr("PBS_O_WORKDIR"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_host",SWIG_FromCharPtr("PBS_O_HOST"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_server",SWIG_FromCharPtr("PBS_O_SERVER"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_home",SWIG_FromCharPtr("PBS_O_HOME"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_logname",SWIG_FromCharPtr("PBS_O_LOGNAME"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_path",SWIG_FromCharPtr("PBS_O_PATH"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_mail",SWIG_FromCharPtr("PBS_O_MAIL"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_shell",SWIG_FromCharPtr("PBS_O_SHELL"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_tz",SWIG_FromCharPtr("PBS_O_TZ"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_lang",SWIG_FromCharPtr("PBS_O_LANG"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_uid",SWIG_FromCharPtr("PBS_O_UID"));
+  SWIG_Python_SetConstant(d, "ATTR_pbs_o_submit_filter",SWIG_FromCharPtr("PBS_O_SUBMIT_FILTER"));
+  SWIG_Python_SetConstant(d, "ATTR_ctime",SWIG_FromCharPtr("ctime"));
+  SWIG_Python_SetConstant(d, "ATTR_exechost",SWIG_FromCharPtr("exec_host"));
+  SWIG_Python_SetConstant(d, "ATTR_execport",SWIG_FromCharPtr("exec_port"));
+  SWIG_Python_SetConstant(d, "ATTR_mtime",SWIG_FromCharPtr("mtime"));
+  SWIG_Python_SetConstant(d, "ATTR_qtime",SWIG_FromCharPtr("qtime"));
+  SWIG_Python_SetConstant(d, "ATTR_session",SWIG_FromCharPtr("session_id"));
+  SWIG_Python_SetConstant(d, "ATTR_euser",SWIG_FromCharPtr("euser"));
+  SWIG_Python_SetConstant(d, "ATTR_egroup",SWIG_FromCharPtr("egroup"));
+  SWIG_Python_SetConstant(d, "ATTR_hashname",SWIG_FromCharPtr("hashname"));
+  SWIG_Python_SetConstant(d, "ATTR_hopcount",SWIG_FromCharPtr("hop_count"));
+  SWIG_Python_SetConstant(d, "ATTR_security",SWIG_FromCharPtr("security"));
+  SWIG_Python_SetConstant(d, "ATTR_sched_hint",SWIG_FromCharPtr("sched_hint"));
+  SWIG_Python_SetConstant(d, "ATTR_substate",SWIG_FromCharPtr("substate"));
+  SWIG_Python_SetConstant(d, "ATTR_name",SWIG_FromCharPtr("Job_Name"));
+  SWIG_Python_SetConstant(d, "ATTR_owner",SWIG_FromCharPtr("Job_Owner"));
+  SWIG_Python_SetConstant(d, "ATTR_used",SWIG_FromCharPtr("resources_used"));
+  SWIG_Python_SetConstant(d, "ATTR_state",SWIG_FromCharPtr("job_state"));
+  SWIG_Python_SetConstant(d, "ATTR_queue",SWIG_FromCharPtr("queue"));
+  SWIG_Python_SetConstant(d, "ATTR_server",SWIG_FromCharPtr("server"));
+  SWIG_Python_SetConstant(d, "ATTR_maxrun",SWIG_FromCharPtr("max_running"));
+  SWIG_Python_SetConstant(d, "ATTR_maxreport",SWIG_FromCharPtr("max_report"));
+  SWIG_Python_SetConstant(d, "ATTR_total",SWIG_FromCharPtr("total_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_comment",SWIG_FromCharPtr("comment"));
+  SWIG_Python_SetConstant(d, "ATTR_cookie",SWIG_FromCharPtr("cookie"));
+  SWIG_Python_SetConstant(d, "ATTR_qrank",SWIG_FromCharPtr("queue_rank"));
+  SWIG_Python_SetConstant(d, "ATTR_altid",SWIG_FromCharPtr("alt_id"));
+  SWIG_Python_SetConstant(d, "ATTR_etime",SWIG_FromCharPtr("etime"));
+  SWIG_Python_SetConstant(d, "ATTR_exitstat",SWIG_FromCharPtr("exit_status"));
+  SWIG_Python_SetConstant(d, "ATTR_forwardx11",SWIG_FromCharPtr("forward_x11"));
+  SWIG_Python_SetConstant(d, "ATTR_submit_args",SWIG_FromCharPtr("submit_args"));
+  SWIG_Python_SetConstant(d, "ATTR_tokens",SWIG_FromCharPtr("tokens"));
+  SWIG_Python_SetConstant(d, "ATTR_netcounter",SWIG_FromCharPtr("net_counter"));
+  SWIG_Python_SetConstant(d, "ATTR_umask",SWIG_FromCharPtr("umask"));
+  SWIG_Python_SetConstant(d, "ATTR_start_time",SWIG_FromCharPtr("start_time"));
+  SWIG_Python_SetConstant(d, "ATTR_start_count",SWIG_FromCharPtr("start_count"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_dir",SWIG_FromCharPtr("checkpoint_dir"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_name",SWIG_FromCharPtr("checkpoint_name"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_time",SWIG_FromCharPtr("checkpoint_time"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_restart_status",SWIG_FromCharPtr("checkpoint_restart_status"));
+  SWIG_Python_SetConstant(d, "ATTR_restart_name",SWIG_FromCharPtr("restart_name"));
+  SWIG_Python_SetConstant(d, "ATTR_comp_time",SWIG_FromCharPtr("comp_time"));
+  SWIG_Python_SetConstant(d, "ATTR_reported",SWIG_FromCharPtr("reported"));
+  SWIG_Python_SetConstant(d, "ATTR_intcmd",SWIG_FromCharPtr("inter_cmd"));
+  SWIG_Python_SetConstant(d, "ATTR_job_radix",SWIG_FromCharPtr("job_radix"));
+  SWIG_Python_SetConstant(d, "ATTR_sister_list",SWIG_FromCharPtr("sister_list"));
+  SWIG_Python_SetConstant(d, "ATTR_total_runtime",SWIG_FromCharPtr("total_runtime"));
+  SWIG_Python_SetConstant(d, "ATTR_P",SWIG_FromCharPtr("proxy_user"));
+  SWIG_Python_SetConstant(d, "ATTR_node_exclusive",SWIG_FromCharPtr("node_exclusive"));
+  SWIG_Python_SetConstant(d, "ATTR_exec_gpus",SWIG_FromCharPtr("exec_gpus"));
+  SWIG_Python_SetConstant(d, "ATTR_exec_mics",SWIG_FromCharPtr("exec_mics"));
+  SWIG_Python_SetConstant(d, "ATTR_J",SWIG_FromCharPtr("job_id"));
+  SWIG_Python_SetConstant(d, "ATTR_pagg",SWIG_FromCharPtr("pagg_id"));
+  SWIG_Python_SetConstant(d, "ATTR_system_start_time",SWIG_FromCharPtr("system_start_time"));
+  SWIG_Python_SetConstant(d, "ATTR_gpu_flags",SWIG_FromCharPtr("gpu_flags"));
+  SWIG_Python_SetConstant(d, "ATTR_aclgren",SWIG_FromCharPtr("acl_group_enable"));
+  SWIG_Python_SetConstant(d, "ATTR_aclgroup",SWIG_FromCharPtr("acl_groups"));
+  SWIG_Python_SetConstant(d, "ATTR_aclhten",SWIG_FromCharPtr("acl_host_enable"));
+  SWIG_Python_SetConstant(d, "ATTR_aclhost",SWIG_FromCharPtr("acl_hosts"));
+  SWIG_Python_SetConstant(d, "ATTR_acluren",SWIG_FromCharPtr("acl_user_enable"));
+  SWIG_Python_SetConstant(d, "ATTR_acluser",SWIG_FromCharPtr("acl_users"));
+  SWIG_Python_SetConstant(d, "ATTR_altrouter",SWIG_FromCharPtr("alt_router"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_min",SWIG_FromCharPtr("checkpoint_min"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_defaults",SWIG_FromCharPtr("checkpoint_defaults"));
+  SWIG_Python_SetConstant(d, "ATTR_enable",SWIG_FromCharPtr("enabled"));
+  SWIG_Python_SetConstant(d, "ATTR_fromroute",SWIG_FromCharPtr("from_route_only"));
+  SWIG_Python_SetConstant(d, "ATTR_hostlist",SWIG_FromCharPtr("hostlist"));
+  SWIG_Python_SetConstant(d, "ATTR_killdelay",SWIG_FromCharPtr("kill_delay"));
+  SWIG_Python_SetConstant(d, "ATTR_maxgrprun",SWIG_FromCharPtr("max_group_run"));
+  SWIG_Python_SetConstant(d, "ATTR_maxque",SWIG_FromCharPtr("max_queuable"));
+  SWIG_Python_SetConstant(d, "ATTR_maxuserque",SWIG_FromCharPtr("max_user_queuable"));
+  SWIG_Python_SetConstant(d, "ATTR_maxuserrun",SWIG_FromCharPtr("max_user_run"));
+  SWIG_Python_SetConstant(d, "ATTR_qtype",SWIG_FromCharPtr("queue_type"));
+  SWIG_Python_SetConstant(d, "ATTR_rescassn",SWIG_FromCharPtr("resources_assigned"));
+  SWIG_Python_SetConstant(d, "ATTR_rescdflt",SWIG_FromCharPtr("resources_default"));
+  SWIG_Python_SetConstant(d, "ATTR_rescmax",SWIG_FromCharPtr("resources_max"));
+  SWIG_Python_SetConstant(d, "ATTR_rescmin",SWIG_FromCharPtr("resources_min"));
+  SWIG_Python_SetConstant(d, "ATTR_featreqd",SWIG_FromCharPtr("features_required"));
+  SWIG_Python_SetConstant(d, "ATTR_req_login_property",SWIG_FromCharPtr("required_login_property"));
+  SWIG_Python_SetConstant(d, "ATTR_rerunnable",SWIG_FromCharPtr("restartable"));
+  SWIG_Python_SetConstant(d, "ATTR_rndzretry",SWIG_FromCharPtr("rendezvous_retry"));
+  SWIG_Python_SetConstant(d, "ATTR_routedest",SWIG_FromCharPtr("route_destinations"));
+  SWIG_Python_SetConstant(d, "ATTR_routeheld",SWIG_FromCharPtr("route_held_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_routewait",SWIG_FromCharPtr("route_waiting_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_routeretry",SWIG_FromCharPtr("route_retry_time"));
+  SWIG_Python_SetConstant(d, "ATTR_routelife",SWIG_FromCharPtr("route_lifetime"));
+  SWIG_Python_SetConstant(d, "ATTR_rsvexpdt",SWIG_FromCharPtr("reserved_expedite"));
+  SWIG_Python_SetConstant(d, "ATTR_rsvsync",SWIG_FromCharPtr("reserved_sync"));
+  SWIG_Python_SetConstant(d, "ATTR_start",SWIG_FromCharPtr("started"));
+  SWIG_Python_SetConstant(d, "ATTR_count",SWIG_FromCharPtr("state_count"));
+  SWIG_Python_SetConstant(d, "ATTR_number",SWIG_FromCharPtr("number_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_acllogic",SWIG_FromCharPtr("acl_logic_or"));
+  SWIG_Python_SetConstant(d, "ATTR_aclgrpslpy",SWIG_FromCharPtr("acl_group_sloppy"));
+  SWIG_Python_SetConstant(d, "ATTR_keepcompleted",SWIG_FromCharPtr("keep_completed"));
+  SWIG_Python_SetConstant(d, "ATTR_disallowedtypes",SWIG_FromCharPtr("disallowed_types"));
+  SWIG_Python_SetConstant(d, "ATTR_is_transit",SWIG_FromCharPtr("is_transit"));
+  SWIG_Python_SetConstant(d, "ATTR_aclroot",SWIG_FromCharPtr("acl_roots"));
+  SWIG_Python_SetConstant(d, "ATTR_managers",SWIG_FromCharPtr("managers"));
+  SWIG_Python_SetConstant(d, "ATTR_dfltque",SWIG_FromCharPtr("default_queue"));
+  SWIG_Python_SetConstant(d, "ATTR_dispsvrsuffix",SWIG_FromCharPtr("display_job_server_suffix"));
+  SWIG_Python_SetConstant(d, "ATTR_jobsuffixalias",SWIG_FromCharPtr("job_suffix_alias"));
+  SWIG_Python_SetConstant(d, "ATTR_defnode",SWIG_FromCharPtr("default_node"));
+  SWIG_Python_SetConstant(d, "ATTR_locsvrs",SWIG_FromCharPtr("location_servers"));
+  SWIG_Python_SetConstant(d, "ATTR_logevents",SWIG_FromCharPtr("log_events"));
+  SWIG_Python_SetConstant(d, "ATTR_logfile",SWIG_FromCharPtr("log_file"));
+  SWIG_Python_SetConstant(d, "ATTR_loglevel",SWIG_FromCharPtr("log_level"));
+  SWIG_Python_SetConstant(d, "ATTR_mailfrom",SWIG_FromCharPtr("mail_from"));
+  SWIG_Python_SetConstant(d, "ATTR_nodepack",SWIG_FromCharPtr("node_pack"));
+  SWIG_Python_SetConstant(d, "ATTR_nodesuffix",SWIG_FromCharPtr("node_suffix"));
+  SWIG_Python_SetConstant(d, "ATTR_operators",SWIG_FromCharPtr("operators"));
+  SWIG_Python_SetConstant(d, "ATTR_queryother",SWIG_FromCharPtr("query_other_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_resccost",SWIG_FromCharPtr("resources_cost"));
+  SWIG_Python_SetConstant(d, "ATTR_rescavail",SWIG_FromCharPtr("resources_available"));
+  SWIG_Python_SetConstant(d, "ATTR_schedit",SWIG_FromCharPtr("scheduler_iteration"));
+  SWIG_Python_SetConstant(d, "ATTR_scheduling",SWIG_FromCharPtr("scheduling"));
+  SWIG_Python_SetConstant(d, "ATTR_status",SWIG_FromCharPtr("server_state"));
+  SWIG_Python_SetConstant(d, "ATTR_syscost",SWIG_FromCharPtr("system_cost"));
+  SWIG_Python_SetConstant(d, "ATTR_pingrate",SWIG_FromCharPtr("node_ping_rate"));
+  SWIG_Python_SetConstant(d, "ATTR_ndchkrate",SWIG_FromCharPtr("node_check_rate"));
+  SWIG_Python_SetConstant(d, "ATTR_tcptimeout",SWIG_FromCharPtr("tcp_timeout"));
+  SWIG_Python_SetConstant(d, "ATTR_jobstatrate",SWIG_FromCharPtr("job_stat_rate"));
+  SWIG_Python_SetConstant(d, "ATTR_polljobs",SWIG_FromCharPtr("poll_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_downonerror",SWIG_FromCharPtr("down_on_error"));
+  SWIG_Python_SetConstant(d, "ATTR_disableserveridcheck",SWIG_FromCharPtr("disable_server_id_check"));
+  SWIG_Python_SetConstant(d, "ATTR_jobnanny",SWIG_FromCharPtr("job_nanny"));
+  SWIG_Python_SetConstant(d, "ATTR_ownerpurge",SWIG_FromCharPtr("owner_purge"));
+  SWIG_Python_SetConstant(d, "ATTR_qcqlimits",SWIG_FromCharPtr("queue_centric_limits"));
+  SWIG_Python_SetConstant(d, "ATTR_momjobsync",SWIG_FromCharPtr("mom_job_sync"));
+  SWIG_Python_SetConstant(d, "ATTR_maildomain",SWIG_FromCharPtr("mail_domain"));
+  SWIG_Python_SetConstant(d, "ATTR_pbsversion",SWIG_FromCharPtr("pbs_version"));
+  SWIG_Python_SetConstant(d, "ATTR_submithosts",SWIG_FromCharPtr("submit_hosts"));
+  SWIG_Python_SetConstant(d, "ATTR_allownodesubmit",SWIG_FromCharPtr("allow_node_submit"));
+  SWIG_Python_SetConstant(d, "ATTR_allowproxyuser",SWIG_FromCharPtr("allow_proxy_user"));
+  SWIG_Python_SetConstant(d, "ATTR_autonodenp",SWIG_FromCharPtr("auto_node_np"));
+  SWIG_Python_SetConstant(d, "ATTR_servername",SWIG_FromCharPtr("server_name"));
+  SWIG_Python_SetConstant(d, "ATTR_logfilemaxsize",SWIG_FromCharPtr("log_file_max_size"));
+  SWIG_Python_SetConstant(d, "ATTR_logfilerolldepth",SWIG_FromCharPtr("log_file_roll_depth"));
+  SWIG_Python_SetConstant(d, "ATTR_logkeepdays",SWIG_FromCharPtr("log_keep_days"));
+  SWIG_Python_SetConstant(d, "ATTR_nextjobnum",SWIG_FromCharPtr("next_job_number"));
+  SWIG_Python_SetConstant(d, "ATTR_extraresc",SWIG_FromCharPtr("extra_resc"));
+  SWIG_Python_SetConstant(d, "ATTR_schedversion",SWIG_FromCharPtr("sched_version"));
+  SWIG_Python_SetConstant(d, "ATTR_acctkeepdays",SWIG_FromCharPtr("accounting_keep_days"));
+  SWIG_Python_SetConstant(d, "ATTR_lockfile",SWIG_FromCharPtr("lock_file"));
+  SWIG_Python_SetConstant(d, "ATTR_credentiallifetime",SWIG_FromCharPtr("credential_lifetime"));
+  SWIG_Python_SetConstant(d, "ATTR_jobmustreport",SWIG_FromCharPtr("job_must_report"));
+  SWIG_Python_SetConstant(d, "ATTR_LockfileUpdateTime",SWIG_FromCharPtr("lock_file_update_time"));
+  SWIG_Python_SetConstant(d, "ATTR_LockfileCheckTime",SWIG_FromCharPtr("lock_file_check_time"));
+  SWIG_Python_SetConstant(d, "ATTR_npdefault",SWIG_FromCharPtr("np_default"));
+  SWIG_Python_SetConstant(d, "ATTR_clonebatchsize",SWIG_FromCharPtr("clone_batch_size"));
+  SWIG_Python_SetConstant(d, "ATTR_clonebatchdelay",SWIG_FromCharPtr("clone_batch_delay"));
+  SWIG_Python_SetConstant(d, "ATTR_jobstarttimeout",SWIG_FromCharPtr("job_start_timeout"));
+  SWIG_Python_SetConstant(d, "ATTR_jobforcecanceltime",SWIG_FromCharPtr("job_force_cancel_time"));
+  SWIG_Python_SetConstant(d, "ATTR_maxarraysize",SWIG_FromCharPtr("max_job_array_size"));
+  SWIG_Python_SetConstant(d, "ATTR_maxslotlimit",SWIG_FromCharPtr("max_slot_limit"));
+  SWIG_Python_SetConstant(d, "ATTR_recordjobinfo",SWIG_FromCharPtr("record_job_info"));
+  SWIG_Python_SetConstant(d, "ATTR_recordjobscript",SWIG_FromCharPtr("record_job_script"));
+  SWIG_Python_SetConstant(d, "ATTR_joblogfilemaxsize",SWIG_FromCharPtr("job_log_file_max_size"));
+  SWIG_Python_SetConstant(d, "ATTR_joblogfilerolldepth",SWIG_FromCharPtr("job_log_file_roll_depth"));
+  SWIG_Python_SetConstant(d, "ATTR_joblogkeepdays",SWIG_FromCharPtr("job_log_keep_days"));
+  SWIG_Python_SetConstant(d, "ATTR_minthreads",SWIG_FromCharPtr("min_threads"));
+  SWIG_Python_SetConstant(d, "ATTR_maxthreads",SWIG_FromCharPtr("max_threads"));
+  SWIG_Python_SetConstant(d, "ATTR_threadidleseconds",SWIG_FromCharPtr("thread_idle_seconds"));
+  SWIG_Python_SetConstant(d, "ATTR_moabarraycompatible",SWIG_FromCharPtr("moab_array_compatible"));
+  SWIG_Python_SetConstant(d, "ATTR_nomailforce",SWIG_FromCharPtr("no_mail_force"));
+  SWIG_Python_SetConstant(d, "ATTR_interactivejobscanroam",SWIG_FromCharPtr("interactive_jobs_can_roam"));
+  SWIG_Python_SetConstant(d, "ATTR_crayenabled",SWIG_FromCharPtr("cray_enabled"));
+  SWIG_Python_SetConstant(d, "ATTR_nppcu",SWIG_FromCharPtr("nppcu"));
+  SWIG_Python_SetConstant(d, "ATTR_maxuserqueuable",SWIG_FromCharPtr("max_user_queuable"));
+  SWIG_Python_SetConstant(d, "ATTR_automaticrequeueexitcode",SWIG_FromCharPtr("automatic_requeue_exit_code"));
+  SWIG_Python_SetConstant(d, "ATTR_jobsynctimeout",SWIG_FromCharPtr("job_sync_timeout"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_state",SWIG_FromCharPtr("state"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_np",SWIG_FromCharPtr("np"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_properties",SWIG_FromCharPtr("properties"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_ntype",SWIG_FromCharPtr("ntype"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_jobs",SWIG_FromCharPtr("jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_status",SWIG_FromCharPtr("status"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_note",SWIG_FromCharPtr("note"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_mom_port",SWIG_FromCharPtr("mom_service_port"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_mom_rm_port",SWIG_FromCharPtr("mom_manager_port"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_num_node_boards",SWIG_FromCharPtr("num_node_boards"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_numa_str",SWIG_FromCharPtr("numa_board_str"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_gpus",SWIG_FromCharPtr("gpus"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_gpustatus",SWIG_FromCharPtr("gpu_status"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_gpus_str",SWIG_FromCharPtr("numa_gpu_node_str"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_mics",SWIG_FromCharPtr("mics"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_micstatus",SWIG_FromCharPtr("mic_status"));
+  SWIG_Python_SetConstant(d, "ATTR_mailsubjectfmt",SWIG_FromCharPtr("mail_subject_fmt"));
+  SWIG_Python_SetConstant(d, "ATTR_mailbodyfmt",SWIG_FromCharPtr("mail_body_fmt"));
+  SWIG_Python_SetConstant(d, "CHECKPOINT_UNSPECIFIED",SWIG_FromCharPtr("u"));
+  SWIG_Python_SetConstant(d, "NO_HOLD",SWIG_FromCharPtr("n"));
+  SWIG_Python_SetConstant(d, "NO_JOIN",SWIG_FromCharPtr("n"));
+  SWIG_Python_SetConstant(d, "NO_KEEP",SWIG_FromCharPtr("n"));
+  SWIG_Python_SetConstant(d, "MAIL_AT_ABORT",SWIG_FromCharPtr("a"));
+  SWIG_Python_SetConstant(d, "DEFAULT_PRIORITY",SWIG_FromCharPtr("0"));
+  SWIG_Python_SetConstant(d, "ARRAY_RANGE",SWIG_FromCharPtr("array_range="));
+  SWIG_Python_SetConstant(d, "DELDELAY",SWIG_FromCharPtr("deldelay="));
+  SWIG_Python_SetConstant(d, "DELPURGE",SWIG_FromCharPtr("delpurge="));
+  SWIG_Python_SetConstant(d, "DELASYNC",SWIG_FromCharPtr("delasync"));
+  SWIG_Python_SetConstant(d, "PURGECOMP",SWIG_FromCharPtr("purgecomplete="));
+  SWIG_Python_SetConstant(d, "EXECQUEONLY",SWIG_FromCharPtr("exec_queue_only"));
+  SWIG_Python_SetConstant(d, "RERUNFORCE",SWIG_FromCharPtr("force"));
+  SWIG_Python_SetConstant(d, "USER_HOLD",SWIG_FromCharPtr("u"));
+  SWIG_Python_SetConstant(d, "OTHER_HOLD",SWIG_FromCharPtr("o"));
+  SWIG_Python_SetConstant(d, "SYSTEM_HOLD",SWIG_FromCharPtr("s"));
+  SWIG_Python_SetConstant(d, "ND_free",SWIG_FromCharPtr("free"));
+  SWIG_Python_SetConstant(d, "ND_offline",SWIG_FromCharPtr("offline"));
+  SWIG_Python_SetConstant(d, "ND_down",SWIG_FromCharPtr("down"));
+  SWIG_Python_SetConstant(d, "ND_reserve",SWIG_FromCharPtr("reserve"));
+  SWIG_Python_SetConstant(d, "ND_job_exclusive",SWIG_FromCharPtr("job-exclusive"));
+  SWIG_Python_SetConstant(d, "ND_job_sharing",SWIG_FromCharPtr("job-sharing"));
+  SWIG_Python_SetConstant(d, "ND_busy",SWIG_FromCharPtr("busy"));
+  SWIG_Python_SetConstant(d, "ND_state_unknown",SWIG_FromCharPtr("state-unknown"));
+  SWIG_Python_SetConstant(d, "ND_active",SWIG_FromCharPtr("active"));
+  SWIG_Python_SetConstant(d, "ND_all",SWIG_FromCharPtr("all"));
+  SWIG_Python_SetConstant(d, "ND_up",SWIG_FromCharPtr("up"));
+  SWIG_Python_SetConstant(d, "ND_timeshared",SWIG_FromCharPtr("time-shared"));
+  SWIG_Python_SetConstant(d, "ND_cluster",SWIG_FromCharPtr("cluster"));
+  SWIG_Python_SetConstant(d, "Q_DT_batch",SWIG_FromCharPtr("batch"));
+  SWIG_Python_SetConstant(d, "Q_DT_interactive",SWIG_FromCharPtr("interactive"));
+  SWIG_Python_SetConstant(d, "Q_DT_rerunable",SWIG_FromCharPtr("rerunable"));
+  SWIG_Python_SetConstant(d, "Q_DT_nonrerunable",SWIG_FromCharPtr("nonrerunable"));
+  SWIG_Python_SetConstant(d, "Q_DT_fault_tolerant",SWIG_FromCharPtr("fault_tolerant"));
+  SWIG_Python_SetConstant(d, "Q_DT_fault_intolerant",SWIG_FromCharPtr("fault_intolerant"));
+  SWIG_Python_SetConstant(d, "Q_DT_job_array",SWIG_FromCharPtr("job_array"));
+  SWIG_Python_SetConstant(d, "MAX_ENCODE_BFR",SWIG_From_int((int)(150)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_CREATE",SWIG_From_int((int)(0)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_DELETE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_SET",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_UNSET",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_LIST",SWIG_From_int((int)(4)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_PRINT",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_ACTIVE",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_NONE",SWIG_From_int((int)(-1)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_SERVER",SWIG_From_int((int)(0)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_QUEUE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_JOB",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_NODE",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "MSG_OUT",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "MSG_ERR",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "SHUT_SIG",SWIG_From_int((int)(-1)));
+  SWIG_Python_SetConstant(d, "SHUT_IMMEDIATE",SWIG_From_int((int)(0)));
+  SWIG_Python_SetConstant(d, "SHUT_DELAY",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "SHUT_QUICK",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "SIG_RESUME",SWIG_FromCharPtr("resume"));
+  SWIG_Python_SetConstant(d, "SIG_SUSPEND",SWIG_FromCharPtr("suspend"));
+  SWIG_Python_SetConstant(d, "PBS_MAXHOSTNAME",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "MAXPATHLEN",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "MAXPORTLEN",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "MAXNAMLEN",SWIG_From_int((int)(255)));
+  SWIG_Python_SetConstant(d, "MAX_NOTE",SWIG_From_int((int)(256)));
+  SWIG_Python_SetConstant(d, "MAX_NOTE_STR",SWIG_FromCharPtr("256"));
+  SWIG_Python_SetConstant(d, "PBS_MAXUSER",SWIG_From_int((int)(32)));
+  SWIG_Python_SetConstant(d, "PBS_MAXGRPN",SWIG_From_int((int)(16)));
+  SWIG_Python_SetConstant(d, "PBS_MAXGPUID",SWIG_From_int((int)(16)));
+  SWIG_Python_SetConstant(d, "PBS_MAXQUEUENAME",SWIG_From_int((int)(15)));
+  SWIG_Python_SetConstant(d, "PBS_MAXSERVERNAME",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "PBS_MAXJOBARRAYLEN",SWIG_From_int((int)(7)));
+  SWIG_Python_SetConstant(d, "PBS_MAXSEQNUM",SWIG_From_int((int)(8)));
+  SWIG_Python_SetConstant(d, "PBS_MAXPORTNUM",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "PBS_MAXJOBARRAY",SWIG_From_int((int)(99999)));
+  SWIG_Python_SetConstant(d, "PBS_MAXSVRJOBID",SWIG_From_int((int)((8+1024+5+7+2))));
+  SWIG_Python_SetConstant(d, "PBS_MAXCLTJOBID",SWIG_From_int((int)(((8+1024+5+7+2) +1024+5+7+2))));
+  SWIG_Python_SetConstant(d, "PBS_MAXDEST",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "PBS_MAXROUTEDEST",SWIG_From_int((int)((15+1024+5+2))));
+  SWIG_Python_SetConstant(d, "PBS_USE_IFF",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "PBS_INTERACTIVE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "PBS_TERM_BUF_SZ",SWIG_From_int((int)(80)));
+  SWIG_Python_SetConstant(d, "PBS_TERM_CCA",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "PBS_MAXCREDENTIAL_LEN",SWIG_From_int((int)(2048)));
+  SWIG_Python_SetConstant(d, "PBS_QS_VERSION_BASE",SWIG_From_int((int)(0x00020300)));
+  SWIG_Python_SetConstant(d, "PBS_QS_VERSION_INT",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "PBS_QS_VERSION",SWIG_From_int((int)((0x00020300+2))));
+  SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_NAME",SWIG_FromCharPtr("pbs"));
+  SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_PORT",SWIG_From_int((int)(15001)));
+  SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_NAME_DIS",SWIG_FromCharPtr("pbs_dis"));
+  SWIG_Python_SetConstant(d, "PBS_MOM_SERVICE_NAME",SWIG_FromCharPtr("pbs_mom"));
+  SWIG_Python_SetConstant(d, "PBS_MOM_SERVICE_PORT",SWIG_From_int((int)(15002)));
+  SWIG_Python_SetConstant(d, "PBS_MANAGER_SERVICE_NAME",SWIG_FromCharPtr("pbs_resmon"));
+  SWIG_Python_SetConstant(d, "PBS_MANAGER_SERVICE_PORT",SWIG_From_int((int)(15003)));
+  SWIG_Python_SetConstant(d, "PBS_SCHEDULER_SERVICE_NAME",SWIG_FromCharPtr("pbs_sched"));
+  SWIG_Python_SetConstant(d, "PBS_SCHEDULER_SERVICE_PORT",SWIG_From_int((int)(15004)));
+  SWIG_Python_SetConstant(d, "TRQ_AUTHD_SERVICE_PORT",SWIG_From_int((int)(15005)));
+  SWIG_Python_SetConstant(d, "CHECKPOINTHOLD",SWIG_FromCharPtr("checkpoint_hold"));
+  SWIG_Python_SetConstant(d, "CHECKPOINTCONT",SWIG_FromCharPtr("checkpoint_cont"));
+  SWIG_Python_SetConstant(d, "MOM_DEFAULT_CHECKPOINT_DIR",SWIG_FromCharPtr("$MOMDEFAULTCHECKPOINTDIR$"));
+  SWIG_Python_SetConstant(d, "NO_MOM_RELAY",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "SET",SWIG_From_int((int)(SET)));
+  SWIG_Python_SetConstant(d, "UNSET",SWIG_From_int((int)(UNSET)));
+  SWIG_Python_SetConstant(d, "INCR",SWIG_From_int((int)(INCR)));
+  SWIG_Python_SetConstant(d, "DECR",SWIG_From_int((int)(DECR)));
+  SWIG_Python_SetConstant(d, "EQ",SWIG_From_int((int)(EQ)));
+  SWIG_Python_SetConstant(d, "NE",SWIG_From_int((int)(NE)));
+  SWIG_Python_SetConstant(d, "GE",SWIG_From_int((int)(GE)));
+  SWIG_Python_SetConstant(d, "GT",SWIG_From_int((int)(GT)));
+  SWIG_Python_SetConstant(d, "LE",SWIG_From_int((int)(LE)));
+  SWIG_Python_SetConstant(d, "LT",SWIG_From_int((int)(LT)));
+  SWIG_Python_SetConstant(d, "DFLT",SWIG_From_int((int)(DFLT)));
+  SWIG_Python_SetConstant(d, "MERGE",SWIG_From_int((int)(MERGE)));
+  SWIG_Python_SetConstant(d, "INCR_OLD",SWIG_From_int((int)(INCR_OLD)));
+  SWIG_Python_SetConstant(d, "NPPCU_ALPS_CHOOSES",SWIG_From_int((int)(NPPCU_ALPS_CHOOSES)));
+  SWIG_Python_SetConstant(d, "NPPCU_NO_USE_HT",SWIG_From_int((int)(NPPCU_NO_USE_HT)));
+  SWIG_Python_SetConstant(d, "NPPCU_USE_HT",SWIG_From_int((int)(NPPCU_USE_HT)));
+  PyDict_SetItemString(md,(char*)"cvar", SWIG_globals());
+  SWIG_addvarlink(SWIG_globals(),(char*)"pbs_server",Swig_var_pbs_server_get, Swig_var_pbs_server_set);
+  SWIG_Python_SetConstant(d, "LOG_BUF_SIZE",SWIG_From_int((int)(16384)));
+  SWIG_Python_SetConstant(d, "LOCAL_LOG_BUF_SIZE",SWIG_From_int((int)(5096)));
+  SWIG_Python_SetConstant(d, "LOG_EMERG",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "LOG_ALERT",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "LOG_CRIT",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "LOG_ERR",SWIG_From_int((int)(4)));
+  SWIG_Python_SetConstant(d, "LOG_WARNING",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "LOG_NOTICE",SWIG_From_int((int)(7)));
+  SWIG_Python_SetConstant(d, "LOG_INFO",SWIG_From_int((int)(8)));
+  SWIG_Python_SetConstant(d, "LOG_DEBUG",SWIG_From_int((int)(9)));
+  SWIG_Python_SetConstant(d, "MAXLINE",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "GETV",SWIG_From_int((int)(GETV)));
+  SWIG_Python_SetConstant(d, "SETV",SWIG_From_int((int)(SETV)));
+  SWIG_addvarlink(SWIG_globals(),(char*)"log_event_mask",Swig_var_log_event_mask_get, Swig_var_log_event_mask_set);
+  SWIG_addvarlink(SWIG_globals(),(char*)"log_mutex",Swig_var_log_mutex_get, Swig_var_log_mutex_set);
+  SWIG_addvarlink(SWIG_globals(),(char*)"job_log_mutex",Swig_var_job_log_mutex_get, Swig_var_job_log_mutex_set);
+  SWIG_addvarlink(SWIG_globals(),(char*)"chk_file_sec_stderr",Swig_var_chk_file_sec_stderr_get, Swig_var_chk_file_sec_stderr_set);
+  SWIG_addvarlink(SWIG_globals(),(char*)"log_buffer",Swig_var_log_buffer_get, Swig_var_log_buffer_set);
+  SWIG_Python_SetConstant(d, "PBSEVENT_ERROR",SWIG_From_int((int)(0x0001)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_SYSTEM",SWIG_From_int((int)(0x0002)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_ADMIN",SWIG_From_int((int)(0x0004)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_JOB",SWIG_From_int((int)(0x0008)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_JOB_USAGE",SWIG_From_int((int)(0x0010)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_SECURITY",SWIG_From_int((int)(0x0020)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_SCHED",SWIG_From_int((int)(0x0040)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_DEBUG",SWIG_From_int((int)(0x0080)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_DEBUG2",SWIG_From_int((int)(0x0100)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_CLIENTAUTH",SWIG_From_int((int)(0X0200)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_SYSLOG",SWIG_From_int((int)(0x0400)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_FORCE",SWIG_From_int((int)(0x8000)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_SERVER",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_QUEUE",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_JOB",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_REQUEST",SWIG_From_int((int)(4)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_FILE",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_ACCT",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_NODE",SWIG_From_int((int)(7)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_TRQAUTHD",SWIG_From_int((int)(8)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_MASK",SWIG_From_int((int)(0x01ff)));
+  SWIG_Python_SetConstant(d, "MAX_PATH_LEN",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "SECS_PER_DAY",SWIG_From_int((int)(86400)));
+  SWIG_Python_SetConstant(d, "TRUE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "FALSE",SWIG_From_int((int)(0)));
+#if PY_VERSION_HEX >= 0x03000000
+  return m;
+#else
+  return;
+#endif
+}
+
Index: /tags/4.6.0/src/C++/rm.h
===================================================================
--- /tags/4.6.0/src/C++/rm.h	(revision 342)
+++ /tags/4.6.0/src/C++/rm.h	(revision 342)
@@ -0,0 +1,106 @@
+/*
+*         OpenPBS (Portable Batch System) v2.3 Software License
+*
+* Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+* All rights reserved.
+*
+* ---------------------------------------------------------------------------
+* For a license to use or redistribute the OpenPBS software under conditions
+* other than those described below, or to purchase support for this software,
+* please contact Veridian Systems, PBS Products Department ("Licensor") at:
+*
+*    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+*                        877 902-4PBS (US toll-free)
+* ---------------------------------------------------------------------------
+*
+* This license covers use of the OpenPBS v2.3 software (the "Software") at
+* your site or location, and, for certain users, redistribution of the
+* Software to other sites and locations.  Use and redistribution of
+* OpenPBS v2.3 in source and binary forms, with or without modification,
+* are permitted provided that all of the following conditions are met.
+* After December 31, 2001, only conditions 3-6 must be met:
+*
+* 1. Commercial and/or non-commercial use of the Software is permitted
+*    provided a current software registration is on file at www.OpenPBS.org.
+*    If use of this software contributes to a publication, product, or
+*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
+*
+* 2. Redistribution in any form is only permitted for non-commercial,
+*    non-profit purposes.  There can be no charge for the Software or any
+*    software incorporating the Software.  Further, there can be no
+*    expectation of revenue generated as a consequence of redistributing
+*    the Software.
+*
+* 3. Any Redistribution of source code must retain the above copyright notice
+*    and the acknowledgment contained in paragraph 6, this list of conditions
+*    and the disclaimer contained in paragraph 7.
+*
+* 4. Any Redistribution in binary form must reproduce the above copyright
+*    notice and the acknowledgment contained in paragraph 6, this list of
+*    conditions and the disclaimer contained in paragraph 7 in the
+*    documentation and/or other materials provided with the distribution.
+*
+* 5. Redistributions in any form must be accompanied by information on how to
+*    obtain complete source code for the OpenPBS software and any
+*    modifications and/or additions to the OpenPBS software.  The source code
+*    must either be included in the distribution or be available for no more
+*    than the cost of distribution plus a nominal fee, and all modifications
+*    and additions to the Software must be freely redistributable by any party
+*    (including Licensor) without restriction.
+*
+* 6. All advertising materials mentioning features or use of the Software must
+*    display the following acknowledgment:
+*
+*     "This product includes software developed by NASA Ames Research Center,
+*     Lawrence Livermore National Laboratory, and Veridian Information
+*     Solutions, Inc.
+*     Visit www.OpenPBS.org for OpenPBS software support,
+*     products, and information."
+*
+* 7. DISCLAIMER OF WARRANTY
+*
+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+* ARE EXPRESSLY DISCLAIMED.
+*
+* IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+* U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* This license will be governed by the laws of the Commonwealth of Virginia,
+* without reference to its choice of law rules.
+*/
+
+/*
+** Header file defineing the library calls for connecting
+** to the resource monitor.
+*/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+int openrm(char *, unsigned int);
+int closerm_err(int *, int);
+int closerm(int);
+int downrm(int *, int);
+int configrm(int, int *, char *);
+int addreq_err(int, int *, char *);
+int begin_rm_req(int ,int *,int );
+int addreq(int, char *);
+int allreq(char *);
+char* getreq_err(int *, int);
+char* getreq(int);
+int flushreq(void);
+int activereq(void);
+void fullresp(int);
+#ifdef __cplusplus
+}
+#endif
+
Index: /tags/4.6.0/src/C/log.h
===================================================================
--- /tags/4.6.0/src/C/log.h	(revision 342)
+++ /tags/4.6.0/src/C/log.h	(revision 342)
@@ -0,0 +1,212 @@
+/*
+*         OpenPBS (Portable Batch System) v2.3 Software License
+*
+* Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+* All rights reserved.
+*
+* ---------------------------------------------------------------------------
+* For a license to use or redistribute the OpenPBS software under conditions
+* other than those described below, or to purchase support for this software,
+* please contact Veridian Systems, PBS Products Department ("Licensor") at:
+*
+*    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+*                        877 902-4PBS (US toll-free)
+* ---------------------------------------------------------------------------
+*
+* This license covers use of the OpenPBS v2.3 software (the "Software") at
+* your site or location, and, for certain users, redistribution of the
+* Software to other sites and locations.  Use and redistribution of
+* OpenPBS v2.3 in source and binary forms, with or without modification,
+* are permitted provided that all of the following conditions are met.
+* After December 31, 2001, only conditions 3-6 must be met:
+*
+* 1. Commercial and/or non-commercial use of the Software is permitted
+*    provided a current software registration is on file at www.OpenPBS.org.
+*    If use of this software contributes to a publication, product, or
+*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
+*
+* 2. Redistribution in any form is only permitted for non-commercial,
+*    non-profit purposes.  There can be no charge for the Software or any
+*    software incorporating the Software.  Further, there can be no
+*    expectation of revenue generated as a consequence of redistributing
+*    the Software.
+*
+* 3. Any Redistribution of source code must retain the above copyright notice
+*    and the acknowledgment contained in paragraph 6, this list of conditions
+*    and the disclaimer contained in paragraph 7.
+*
+* 4. Any Redistribution in binary form must reproduce the above copyright
+*    notice and the acknowledgment contained in paragraph 6, this list of
+*    conditions and the disclaimer contained in paragraph 7 in the
+*    documentation and/or other materials provided with the distribution.
+*
+* 5. Redistributions in any form must be accompanied by information on how to
+*    obtain complete source code for the OpenPBS software and any
+*    modifications and/or additions to the OpenPBS software.  The source code
+*    must either be included in the distribution or be available for no more
+*    than the cost of distribution plus a nominal fee, and all modifications
+*    and additions to the Software must be freely redistributable by any party
+*    (including Licensor) without restriction.
+*
+* 6. All advertising materials mentioning features or use of the Software must
+*    display the following acknowledgment:
+*
+*     "This product includes software developed by NASA Ames Research Center,
+*     Lawrence Livermore National Laboratory, and Veridian Information
+*     Solutions, Inc.
+*     Visit www.OpenPBS.org for OpenPBS software support,
+*     products, and information."
+*
+* 7. DISCLAIMER OF WARRANTY
+*
+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+* ARE EXPRESSLY DISCLAIMED.
+*
+* IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+* U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* This license will be governed by the laws of the Commonwealth of Virginia,
+* without reference to its choice of law rules.
+*/
+
+/*
+ * include file for error/event logging
+ */
+
+#ifndef LOG_H
+#define LOG_H
+
+#define LOG_BUF_SIZE  16384
+
+/* The following macro assist in sharing code between the Server and Mom */
+#define LOG_EVENT log_event
+
+/*
+** Set up a debug print macro.
+*/
+#ifdef NDEBUG
+#define DBPRT(x)
+#else
+#define DBPRT(x) printf x;
+#endif  /* END NDEBUG */
+
+#if SYSLOG
+#include <syslog.h>
+#endif /* SYSLOG */
+
+#if !SYSLOG
+/* define syslog constants that can be used in code regardless of whether we
+ * are using syslog or not! */
+
+#ifndef LOG_EMERG
+#define LOG_EMERG 1
+#endif
+
+#ifndef LOG_ALERT
+#define LOG_ALERT 2
+#endif
+
+#ifndef LOG_CRIT
+#define LOG_CRIT 3
+#endif
+
+#ifndef LOG_ERR
+#define LOG_ERR 4 
+#endif
+
+#ifndef LOG_ERR
+#define LOG_ERR 5 
+#endif
+
+#ifndef LOG_WARNING
+#define LOG_WARNING 6
+#endif
+
+#ifndef LOG_NOTICE
+#define LOG_NOTICE 7
+#endif
+
+#ifndef LOG_INFO
+#define LOG_INFO 8
+#endif
+
+#ifndef LOG_DEBUG
+#define LOG_DEBUG 9
+#endif
+#endif /* SYSLOG */
+
+extern long *log_event_mask;
+
+/* set this to non-zero in calling app if errors go to stderr */
+extern int   chk_file_sec_stderr;
+
+
+extern void log_close(int);
+extern void log_err(int, char *, char *);
+extern void log_event(int, int, char *, char *);
+extern int  log_open(char *, char *);
+extern void log_record(int, int, char *, char *);
+extern void log_roll(int);
+extern long log_size(void);
+
+extern char log_buffer[LOG_BUF_SIZE];
+
+extern int  chk_file_sec(char *, int, int, int, int, char *);
+extern int  setup_env(char *);
+
+#ifdef TORQUE_2_4
+extern void log_ext(int,char *,char *,int);
+int log_init(char *, char *);
+extern int  log_remove_old(char *,unsigned long);
+#endif
+
+/* Event types */
+
+#define PBSEVENT_ERROR  0x0001  /* internal errors       */
+#define PBSEVENT_SYSTEM  0x0002  /* system (server) events     */
+#define PBSEVENT_ADMIN  0x0004  /* admin events        */
+#define PBSEVENT_JOB  0x0008  /* job related events       */
+#define PBSEVENT_JOB_USAGE 0x0010  /* End of Job accounting      */
+#define PBSEVENT_SECURITY 0x0020  /* security violation events  */
+#define PBSEVENT_SCHED  0x0040  /* scheduler events       */
+#define PBSEVENT_DEBUG  0x0080  /* common debug messages      */
+#define PBSEVENT_DEBUG2  0x0100  /* less needed debug messages */
+#define PBSEVENT_FORCE  0x8000  /* set to force a messag      */
+
+/* Event Object Classes, see array class_names[] in ../lib/Liblog/pbs_log.c   */
+
+#define PBS_EVENTCLASS_SERVER 1 /* The server itself */
+#define PBS_EVENTCLASS_QUEUE 2 /* Queues  */
+#define PBS_EVENTCLASS_JOB 3 /* Jobs   */
+#define PBS_EVENTCLASS_REQUEST 4 /* Batch Requests */
+#define PBS_EVENTCLASS_FILE 5 /* A Job related File */
+#define PBS_EVENTCLASS_ACCT 6 /* Accounting info */
+#define PBS_EVENTCLASS_NODE 7 /* Nodes           */
+
+/* Logging Masks */
+
+#define PBSEVENT_MASK  0x01ff
+
+/* definition's for pbs_log.c's log_remove_old() function */
+#define MAX_PATH_LEN    1024  /* maximum possible length of any path */
+#define SECS_PER_DAY     86400
+
+#if !defined(TRUE) || !defined(FALSE)
+#define TRUE 1
+#define FALSE 0
+#endif /* !defined(TRUE) || !defined(FALSE) */
+
+/* HvB:
+ *   msg_daemonname is extern declared in liblog.a. So define it here
+*/
+char *msg_daemonname = "pbs_python";
+
+#endif /* ifndef LOG_H */
Index: /tags/4.6.0/src/C/pbs.py
===================================================================
--- /tags/4.6.0/src/C/pbs.py	(revision 342)
+++ /tags/4.6.0/src/C/pbs.py	(revision 342)
@@ -0,0 +1,938 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.40
+#
+# Do not make changes to this file unless you know what you are doing--modify
+# the SWIG interface file instead.
+# This file is compatible with both classic and new-style classes.
+
+from sys import version_info
+if version_info >= (2,6,0):
+    def swig_import_helper():
+        from os.path import dirname
+        import imp
+        fp = None
+        try:
+            fp, pathname, description = imp.find_module('_pbs', [dirname(__file__)])
+        except ImportError:
+            import _pbs
+            return _pbs
+        if fp is not None:
+            try:
+                _mod = imp.load_module('_pbs', fp, pathname, description)
+            finally:
+                fp.close()
+            return _mod
+    _pbs = swig_import_helper()
+    del swig_import_helper
+else:
+    import _pbs
+del version_info
+try:
+    _swig_property = property
+except NameError:
+    pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+    if (name == "thisown"): return self.this.own(value)
+    if (name == "this"):
+        if type(value).__name__ == 'SwigPyObject':
+            self.__dict__[name] = value
+            return
+    method = class_type.__swig_setmethods__.get(name,None)
+    if method: return method(self,value)
+    if (not static) or hasattr(self,name):
+        self.__dict__[name] = value
+    else:
+        raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+    return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+    if (name == "thisown"): return self.this.own()
+    method = class_type.__swig_getmethods__.get(name,None)
+    if method: return method(self)
+    raise AttributeError(name)
+
+def _swig_repr(self):
+    try: strthis = "proxy of " + self.this.__repr__()
+    except: strthis = ""
+    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+try:
+    _object = object
+    _newclass = 1
+except AttributeError:
+    class _object : pass
+    _newclass = 0
+
+
+
+def new_attrl(*args):
+  return _pbs.new_attrl(*args)
+new_attrl = _pbs.new_attrl
+
+def new_attropl(*args):
+  return _pbs.new_attropl(*args)
+new_attropl = _pbs.new_attropl
+
+def new_batch_status():
+  return _pbs.new_batch_status()
+new_batch_status = _pbs.new_batch_status
+
+def get_error():
+  return _pbs.get_error()
+get_error = _pbs.get_error
+ATTR_a = _pbs.ATTR_a
+ATTR_c = _pbs.ATTR_c
+ATTR_e = _pbs.ATTR_e
+ATTR_f = _pbs.ATTR_f
+ATTR_g = _pbs.ATTR_g
+ATTR_h = _pbs.ATTR_h
+ATTR_j = _pbs.ATTR_j
+ATTR_k = _pbs.ATTR_k
+ATTR_l = _pbs.ATTR_l
+ATTR_m = _pbs.ATTR_m
+ATTR_o = _pbs.ATTR_o
+ATTR_p = _pbs.ATTR_p
+ATTR_q = _pbs.ATTR_q
+ATTR_r = _pbs.ATTR_r
+ATTR_t = _pbs.ATTR_t
+ATTR_array_id = _pbs.ATTR_array_id
+ATTR_u = _pbs.ATTR_u
+ATTR_v = _pbs.ATTR_v
+ATTR_A = _pbs.ATTR_A
+ATTR_M = _pbs.ATTR_M
+ATTR_N = _pbs.ATTR_N
+ATTR_S = _pbs.ATTR_S
+ATTR_depend = _pbs.ATTR_depend
+ATTR_inter = _pbs.ATTR_inter
+ATTR_stagein = _pbs.ATTR_stagein
+ATTR_stageout = _pbs.ATTR_stageout
+ATTR_jobtype = _pbs.ATTR_jobtype
+ATTR_ctime = _pbs.ATTR_ctime
+ATTR_exechost = _pbs.ATTR_exechost
+ATTR_mtime = _pbs.ATTR_mtime
+ATTR_qtime = _pbs.ATTR_qtime
+ATTR_session = _pbs.ATTR_session
+ATTR_euser = _pbs.ATTR_euser
+ATTR_egroup = _pbs.ATTR_egroup
+ATTR_hashname = _pbs.ATTR_hashname
+ATTR_hopcount = _pbs.ATTR_hopcount
+ATTR_security = _pbs.ATTR_security
+ATTR_sched_hint = _pbs.ATTR_sched_hint
+ATTR_substate = _pbs.ATTR_substate
+ATTR_name = _pbs.ATTR_name
+ATTR_owner = _pbs.ATTR_owner
+ATTR_used = _pbs.ATTR_used
+ATTR_state = _pbs.ATTR_state
+ATTR_queue = _pbs.ATTR_queue
+ATTR_server = _pbs.ATTR_server
+ATTR_maxrun = _pbs.ATTR_maxrun
+ATTR_maxreport = _pbs.ATTR_maxreport
+ATTR_total = _pbs.ATTR_total
+ATTR_comment = _pbs.ATTR_comment
+ATTR_cookie = _pbs.ATTR_cookie
+ATTR_qrank = _pbs.ATTR_qrank
+ATTR_altid = _pbs.ATTR_altid
+ATTR_etime = _pbs.ATTR_etime
+ATTR_exitstat = _pbs.ATTR_exitstat
+ATTR_forwardx11 = _pbs.ATTR_forwardx11
+ATTR_submit_args = _pbs.ATTR_submit_args
+ATTR_tokens = _pbs.ATTR_tokens
+ATTR_netcounter = _pbs.ATTR_netcounter
+ATTR_umask = _pbs.ATTR_umask
+ATTR_start_time = _pbs.ATTR_start_time
+ATTR_start_count = _pbs.ATTR_start_count
+ATTR_checkpoint_dir = _pbs.ATTR_checkpoint_dir
+ATTR_checkpoint_name = _pbs.ATTR_checkpoint_name
+ATTR_checkpoint_time = _pbs.ATTR_checkpoint_time
+ATTR_checkpoint_restart_status = _pbs.ATTR_checkpoint_restart_status
+ATTR_restart_name = _pbs.ATTR_restart_name
+ATTR_comp_time = _pbs.ATTR_comp_time
+ATTR_reported = _pbs.ATTR_reported
+ATTR_intcmd = _pbs.ATTR_intcmd
+ATTR_aclgren = _pbs.ATTR_aclgren
+ATTR_aclgroup = _pbs.ATTR_aclgroup
+ATTR_aclhten = _pbs.ATTR_aclhten
+ATTR_aclhost = _pbs.ATTR_aclhost
+ATTR_acluren = _pbs.ATTR_acluren
+ATTR_acluser = _pbs.ATTR_acluser
+ATTR_altrouter = _pbs.ATTR_altrouter
+ATTR_checkpoint_min = _pbs.ATTR_checkpoint_min
+ATTR_enable = _pbs.ATTR_enable
+ATTR_fromroute = _pbs.ATTR_fromroute
+ATTR_hostlist = _pbs.ATTR_hostlist
+ATTR_killdelay = _pbs.ATTR_killdelay
+ATTR_maxgrprun = _pbs.ATTR_maxgrprun
+ATTR_maxque = _pbs.ATTR_maxque
+ATTR_maxuserque = _pbs.ATTR_maxuserque
+ATTR_maxuserrun = _pbs.ATTR_maxuserrun
+ATTR_qtype = _pbs.ATTR_qtype
+ATTR_rescassn = _pbs.ATTR_rescassn
+ATTR_rescdflt = _pbs.ATTR_rescdflt
+ATTR_rescmax = _pbs.ATTR_rescmax
+ATTR_rescmin = _pbs.ATTR_rescmin
+ATTR_rerunnable = _pbs.ATTR_rerunnable
+ATTR_rndzretry = _pbs.ATTR_rndzretry
+ATTR_routedest = _pbs.ATTR_routedest
+ATTR_routeheld = _pbs.ATTR_routeheld
+ATTR_routewait = _pbs.ATTR_routewait
+ATTR_routeretry = _pbs.ATTR_routeretry
+ATTR_routelife = _pbs.ATTR_routelife
+ATTR_rsvexpdt = _pbs.ATTR_rsvexpdt
+ATTR_rsvsync = _pbs.ATTR_rsvsync
+ATTR_start = _pbs.ATTR_start
+ATTR_count = _pbs.ATTR_count
+ATTR_number = _pbs.ATTR_number
+ATTR_acllogic = _pbs.ATTR_acllogic
+ATTR_aclgrpslpy = _pbs.ATTR_aclgrpslpy
+ATTR_keepcompleted = _pbs.ATTR_keepcompleted
+ATTR_disallowedtypes = _pbs.ATTR_disallowedtypes
+ATTR_is_transit = _pbs.ATTR_is_transit
+ATTR_aclroot = _pbs.ATTR_aclroot
+ATTR_managers = _pbs.ATTR_managers
+ATTR_dfltque = _pbs.ATTR_dfltque
+ATTR_dispsvrsuffix = _pbs.ATTR_dispsvrsuffix
+ATTR_jobsuffixalias = _pbs.ATTR_jobsuffixalias
+ATTR_defnode = _pbs.ATTR_defnode
+ATTR_locsvrs = _pbs.ATTR_locsvrs
+ATTR_logevents = _pbs.ATTR_logevents
+ATTR_logfile = _pbs.ATTR_logfile
+ATTR_loglevel = _pbs.ATTR_loglevel
+ATTR_mailfrom = _pbs.ATTR_mailfrom
+ATTR_nodepack = _pbs.ATTR_nodepack
+ATTR_nodesuffix = _pbs.ATTR_nodesuffix
+ATTR_operators = _pbs.ATTR_operators
+ATTR_queryother = _pbs.ATTR_queryother
+ATTR_resccost = _pbs.ATTR_resccost
+ATTR_rescavail = _pbs.ATTR_rescavail
+ATTR_schedit = _pbs.ATTR_schedit
+ATTR_scheduling = _pbs.ATTR_scheduling
+ATTR_status = _pbs.ATTR_status
+ATTR_syscost = _pbs.ATTR_syscost
+ATTR_pingrate = _pbs.ATTR_pingrate
+ATTR_ndchkrate = _pbs.ATTR_ndchkrate
+ATTR_tcptimeout = _pbs.ATTR_tcptimeout
+ATTR_jobstatrate = _pbs.ATTR_jobstatrate
+ATTR_polljobs = _pbs.ATTR_polljobs
+ATTR_downonerror = _pbs.ATTR_downonerror
+ATTR_disableserveridcheck = _pbs.ATTR_disableserveridcheck
+ATTR_jobnanny = _pbs.ATTR_jobnanny
+ATTR_ownerpurge = _pbs.ATTR_ownerpurge
+ATTR_qcqlimits = _pbs.ATTR_qcqlimits
+ATTR_momjobsync = _pbs.ATTR_momjobsync
+ATTR_maildomain = _pbs.ATTR_maildomain
+ATTR_pbsversion = _pbs.ATTR_pbsversion
+ATTR_submithosts = _pbs.ATTR_submithosts
+ATTR_allownodesubmit = _pbs.ATTR_allownodesubmit
+ATTR_allowproxyuser = _pbs.ATTR_allowproxyuser
+ATTR_autonodenp = _pbs.ATTR_autonodenp
+ATTR_servername = _pbs.ATTR_servername
+ATTR_logfilemaxsize = _pbs.ATTR_logfilemaxsize
+ATTR_logfilerolldepth = _pbs.ATTR_logfilerolldepth
+ATTR_logkeepdays = _pbs.ATTR_logkeepdays
+ATTR_nextjobnum = _pbs.ATTR_nextjobnum
+ATTR_extraresc = _pbs.ATTR_extraresc
+ATTR_schedversion = _pbs.ATTR_schedversion
+ATTR_acctkeepdays = _pbs.ATTR_acctkeepdays
+ATTR_lockfile = _pbs.ATTR_lockfile
+ATTR_credentiallifetime = _pbs.ATTR_credentiallifetime
+ATTR_jobmustreport = _pbs.ATTR_jobmustreport
+ATTR_LockfileUpdateTime = _pbs.ATTR_LockfileUpdateTime
+ATTR_LockfileCheckTime = _pbs.ATTR_LockfileCheckTime
+ATTR_npdefault = _pbs.ATTR_npdefault
+ATTR_jobstarttimeout = _pbs.ATTR_jobstarttimeout
+ATTR_NODE_state = _pbs.ATTR_NODE_state
+ATTR_NODE_np = _pbs.ATTR_NODE_np
+ATTR_NODE_properties = _pbs.ATTR_NODE_properties
+ATTR_NODE_ntype = _pbs.ATTR_NODE_ntype
+ATTR_NODE_jobs = _pbs.ATTR_NODE_jobs
+ATTR_NODE_status = _pbs.ATTR_NODE_status
+ATTR_NODE_note = _pbs.ATTR_NODE_note
+ATTR_mailsubjectfmt = _pbs.ATTR_mailsubjectfmt
+ATTR_mailbodyfmt = _pbs.ATTR_mailbodyfmt
+CHECKPOINT_UNSPECIFIED = _pbs.CHECKPOINT_UNSPECIFIED
+NO_HOLD = _pbs.NO_HOLD
+NO_JOIN = _pbs.NO_JOIN
+NO_KEEP = _pbs.NO_KEEP
+MAIL_AT_ABORT = _pbs.MAIL_AT_ABORT
+DELDELAY = _pbs.DELDELAY
+DELPURGE = _pbs.DELPURGE
+PURGECOMP = _pbs.PURGECOMP
+EXECQUEONLY = _pbs.EXECQUEONLY
+RERUNFORCE = _pbs.RERUNFORCE
+USER_HOLD = _pbs.USER_HOLD
+OTHER_HOLD = _pbs.OTHER_HOLD
+SYSTEM_HOLD = _pbs.SYSTEM_HOLD
+ND_free = _pbs.ND_free
+ND_offline = _pbs.ND_offline
+ND_down = _pbs.ND_down
+ND_reserve = _pbs.ND_reserve
+ND_job_exclusive = _pbs.ND_job_exclusive
+ND_job_sharing = _pbs.ND_job_sharing
+ND_busy = _pbs.ND_busy
+ND_state_unknown = _pbs.ND_state_unknown
+ND_timeshared = _pbs.ND_timeshared
+ND_cluster = _pbs.ND_cluster
+Q_DT_batch = _pbs.Q_DT_batch
+Q_DT_interactive = _pbs.Q_DT_interactive
+Q_DT_rerunable = _pbs.Q_DT_rerunable
+Q_DT_nonrerunable = _pbs.Q_DT_nonrerunable
+Q_DT_fault_tolerant = _pbs.Q_DT_fault_tolerant
+Q_DT_fault_intolerant = _pbs.Q_DT_fault_intolerant
+Q_DT_job_array = _pbs.Q_DT_job_array
+MAX_ENCODE_BFR = _pbs.MAX_ENCODE_BFR
+MGR_CMD_CREATE = _pbs.MGR_CMD_CREATE
+MGR_CMD_DELETE = _pbs.MGR_CMD_DELETE
+MGR_CMD_SET = _pbs.MGR_CMD_SET
+MGR_CMD_UNSET = _pbs.MGR_CMD_UNSET
+MGR_CMD_LIST = _pbs.MGR_CMD_LIST
+MGR_CMD_PRINT = _pbs.MGR_CMD_PRINT
+MGR_CMD_ACTIVE = _pbs.MGR_CMD_ACTIVE
+MGR_OBJ_NONE = _pbs.MGR_OBJ_NONE
+MGR_OBJ_SERVER = _pbs.MGR_OBJ_SERVER
+MGR_OBJ_QUEUE = _pbs.MGR_OBJ_QUEUE
+MGR_OBJ_JOB = _pbs.MGR_OBJ_JOB
+MGR_OBJ_NODE = _pbs.MGR_OBJ_NODE
+MSG_OUT = _pbs.MSG_OUT
+MSG_ERR = _pbs.MSG_ERR
+SHUT_SIG = _pbs.SHUT_SIG
+SHUT_IMMEDIATE = _pbs.SHUT_IMMEDIATE
+SHUT_DELAY = _pbs.SHUT_DELAY
+SHUT_QUICK = _pbs.SHUT_QUICK
+SIG_RESUME = _pbs.SIG_RESUME
+SIG_SUSPEND = _pbs.SIG_SUSPEND
+PBS_MAXHOSTNAME = _pbs.PBS_MAXHOSTNAME
+MAXPATHLEN = _pbs.MAXPATHLEN
+MAXNAMLEN = _pbs.MAXNAMLEN
+MAX_NOTE = _pbs.MAX_NOTE
+MAX_NOTE_STR = _pbs.MAX_NOTE_STR
+PBS_MAXUSER = _pbs.PBS_MAXUSER
+PBS_MAXGRPN = _pbs.PBS_MAXGRPN
+PBS_MAXQUEUENAME = _pbs.PBS_MAXQUEUENAME
+PBS_MAXSERVERNAME = _pbs.PBS_MAXSERVERNAME
+PBS_MAXJOBARRAYLEN = _pbs.PBS_MAXJOBARRAYLEN
+PBS_MAXSEQNUM = _pbs.PBS_MAXSEQNUM
+PBS_MAXPORTNUM = _pbs.PBS_MAXPORTNUM
+PBS_MAXJOBARRAY = _pbs.PBS_MAXJOBARRAY
+PBS_MAXSVRJOBID = _pbs.PBS_MAXSVRJOBID
+PBS_MAXCLTJOBID = _pbs.PBS_MAXCLTJOBID
+PBS_MAXDEST = _pbs.PBS_MAXDEST
+PBS_MAXROUTEDEST = _pbs.PBS_MAXROUTEDEST
+PBS_USE_IFF = _pbs.PBS_USE_IFF
+PBS_INTERACTIVE = _pbs.PBS_INTERACTIVE
+PBS_TERM_BUF_SZ = _pbs.PBS_TERM_BUF_SZ
+PBS_TERM_CCA = _pbs.PBS_TERM_CCA
+PBS_QS_VERSION_BASE = _pbs.PBS_QS_VERSION_BASE
+PBS_QS_VERSION_INT = _pbs.PBS_QS_VERSION_INT
+PBS_QS_VERSION = _pbs.PBS_QS_VERSION
+PBS_BATCH_SERVICE_NAME = _pbs.PBS_BATCH_SERVICE_NAME
+PBS_BATCH_SERVICE_PORT = _pbs.PBS_BATCH_SERVICE_PORT
+PBS_BATCH_SERVICE_NAME_DIS = _pbs.PBS_BATCH_SERVICE_NAME_DIS
+PBS_BATCH_SERVICE_PORT_DIS = _pbs.PBS_BATCH_SERVICE_PORT_DIS
+PBS_MOM_SERVICE_NAME = _pbs.PBS_MOM_SERVICE_NAME
+PBS_MOM_SERVICE_PORT = _pbs.PBS_MOM_SERVICE_PORT
+PBS_MANAGER_SERVICE_NAME = _pbs.PBS_MANAGER_SERVICE_NAME
+PBS_MANAGER_SERVICE_PORT = _pbs.PBS_MANAGER_SERVICE_PORT
+PBS_SCHEDULER_SERVICE_NAME = _pbs.PBS_SCHEDULER_SERVICE_NAME
+PBS_SCHEDULER_SERVICE_PORT = _pbs.PBS_SCHEDULER_SERVICE_PORT
+CHECKPOINTHOLD = _pbs.CHECKPOINTHOLD
+CHECKPOINTCONT = _pbs.CHECKPOINTCONT
+MOM_DEFAULT_CHECKPOINT_DIR = _pbs.MOM_DEFAULT_CHECKPOINT_DIR
+SET = _pbs.SET
+UNSET = _pbs.UNSET
+INCR = _pbs.INCR
+DECR = _pbs.DECR
+EQ = _pbs.EQ
+NE = _pbs.NE
+GE = _pbs.GE
+GT = _pbs.GT
+LE = _pbs.LE
+LT = _pbs.LT
+DFLT = _pbs.DFLT
+MERGE = _pbs.MERGE
+class attrl(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, attrl, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, attrl, name)
+    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
+    __repr__ = _swig_repr
+    __swig_setmethods__["next"] = _pbs.attrl_next_set
+    __swig_getmethods__["next"] = _pbs.attrl_next_get
+    if _newclass:next = _swig_property(_pbs.attrl_next_get, _pbs.attrl_next_set)
+    __swig_setmethods__["name"] = _pbs.attrl_name_set
+    __swig_getmethods__["name"] = _pbs.attrl_name_get
+    if _newclass:name = _swig_property(_pbs.attrl_name_get, _pbs.attrl_name_set)
+    __swig_setmethods__["resource"] = _pbs.attrl_resource_set
+    __swig_getmethods__["resource"] = _pbs.attrl_resource_get
+    if _newclass:resource = _swig_property(_pbs.attrl_resource_get, _pbs.attrl_resource_set)
+    __swig_setmethods__["value"] = _pbs.attrl_value_set
+    __swig_getmethods__["value"] = _pbs.attrl_value_get
+    if _newclass:value = _swig_property(_pbs.attrl_value_get, _pbs.attrl_value_set)
+    __swig_setmethods__["op"] = _pbs.attrl_op_set
+    __swig_getmethods__["op"] = _pbs.attrl_op_get
+    if _newclass:op = _swig_property(_pbs.attrl_op_get, _pbs.attrl_op_set)
+    def __str__(self): return _pbs.attrl___str__(self)
+    __swig_destroy__ = _pbs.delete_attrl
+    __del__ = lambda self : None;
+attrl_swigregister = _pbs.attrl_swigregister
+attrl_swigregister(attrl)
+
+class attropl(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, attropl, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, attropl, name)
+    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
+    __repr__ = _swig_repr
+    __swig_setmethods__["next"] = _pbs.attropl_next_set
+    __swig_getmethods__["next"] = _pbs.attropl_next_get
+    if _newclass:next = _swig_property(_pbs.attropl_next_get, _pbs.attropl_next_set)
+    __swig_setmethods__["name"] = _pbs.attropl_name_set
+    __swig_getmethods__["name"] = _pbs.attropl_name_get
+    if _newclass:name = _swig_property(_pbs.attropl_name_get, _pbs.attropl_name_set)
+    __swig_setmethods__["resource"] = _pbs.attropl_resource_set
+    __swig_getmethods__["resource"] = _pbs.attropl_resource_get
+    if _newclass:resource = _swig_property(_pbs.attropl_resource_get, _pbs.attropl_resource_set)
+    __swig_setmethods__["value"] = _pbs.attropl_value_set
+    __swig_getmethods__["value"] = _pbs.attropl_value_get
+    if _newclass:value = _swig_property(_pbs.attropl_value_get, _pbs.attropl_value_set)
+    __swig_setmethods__["op"] = _pbs.attropl_op_set
+    __swig_getmethods__["op"] = _pbs.attropl_op_get
+    if _newclass:op = _swig_property(_pbs.attropl_op_get, _pbs.attropl_op_set)
+    def __str__(self): return _pbs.attropl___str__(self)
+    __swig_destroy__ = _pbs.delete_attropl
+    __del__ = lambda self : None;
+attropl_swigregister = _pbs.attropl_swigregister
+attropl_swigregister(attropl)
+
+class batch_status(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, batch_status, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, batch_status, name)
+    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
+    __repr__ = _swig_repr
+    __swig_setmethods__["next"] = _pbs.batch_status_next_set
+    __swig_getmethods__["next"] = _pbs.batch_status_next_get
+    if _newclass:next = _swig_property(_pbs.batch_status_next_get, _pbs.batch_status_next_set)
+    __swig_setmethods__["name"] = _pbs.batch_status_name_set
+    __swig_getmethods__["name"] = _pbs.batch_status_name_get
+    if _newclass:name = _swig_property(_pbs.batch_status_name_get, _pbs.batch_status_name_set)
+    __swig_setmethods__["attribs"] = _pbs.batch_status_attribs_set
+    __swig_getmethods__["attribs"] = _pbs.batch_status_attribs_get
+    if _newclass:attribs = _swig_property(_pbs.batch_status_attribs_get, _pbs.batch_status_attribs_set)
+    __swig_setmethods__["text"] = _pbs.batch_status_text_set
+    __swig_getmethods__["text"] = _pbs.batch_status_text_get
+    if _newclass:text = _swig_property(_pbs.batch_status_text_get, _pbs.batch_status_text_set)
+batch_status_swigregister = _pbs.batch_status_swigregister
+batch_status_swigregister(batch_status)
+
+
+def avail(*args):
+  return _pbs.avail(*args)
+avail = _pbs.avail
+
+def pbs_asyrunjob(*args):
+  return _pbs.pbs_asyrunjob(*args)
+pbs_asyrunjob = _pbs.pbs_asyrunjob
+
+def pbs_alterjob(*args):
+  return _pbs.pbs_alterjob(*args)
+pbs_alterjob = _pbs.pbs_alterjob
+
+def pbs_connect(*args):
+  return _pbs.pbs_connect(*args)
+pbs_connect = _pbs.pbs_connect
+
+def pbs_query_max_connections():
+  return _pbs.pbs_query_max_connections()
+pbs_query_max_connections = _pbs.pbs_query_max_connections
+
+def pbs_default():
+  return _pbs.pbs_default()
+pbs_default = _pbs.pbs_default
+
+def pbs_deljob(*args):
+  return _pbs.pbs_deljob(*args)
+pbs_deljob = _pbs.pbs_deljob
+
+def pbs_disconnect(*args):
+  return _pbs.pbs_disconnect(*args)
+pbs_disconnect = _pbs.pbs_disconnect
+
+def pbs_geterrmsg(*args):
+  return _pbs.pbs_geterrmsg(*args)
+pbs_geterrmsg = _pbs.pbs_geterrmsg
+
+def pbs_holdjob(*args):
+  return _pbs.pbs_holdjob(*args)
+pbs_holdjob = _pbs.pbs_holdjob
+
+def pbs_locjob(*args):
+  return _pbs.pbs_locjob(*args)
+pbs_locjob = _pbs.pbs_locjob
+
+def pbs_manager(*args):
+  return _pbs.pbs_manager(*args)
+pbs_manager = _pbs.pbs_manager
+
+def pbs_movejob(*args):
+  return _pbs.pbs_movejob(*args)
+pbs_movejob = _pbs.pbs_movejob
+
+def pbs_msgjob(*args):
+  return _pbs.pbs_msgjob(*args)
+pbs_msgjob = _pbs.pbs_msgjob
+
+def pbs_orderjob(*args):
+  return _pbs.pbs_orderjob(*args)
+pbs_orderjob = _pbs.pbs_orderjob
+
+def pbs_rescquery(*args):
+  return _pbs.pbs_rescquery(*args)
+pbs_rescquery = _pbs.pbs_rescquery
+
+def pbs_rescreserve(*args):
+  return _pbs.pbs_rescreserve(*args)
+pbs_rescreserve = _pbs.pbs_rescreserve
+
+def pbs_rescrelease(*args):
+  return _pbs.pbs_rescrelease(*args)
+pbs_rescrelease = _pbs.pbs_rescrelease
+
+def pbs_rerunjob(*args):
+  return _pbs.pbs_rerunjob(*args)
+pbs_rerunjob = _pbs.pbs_rerunjob
+
+def pbs_rlsjob(*args):
+  return _pbs.pbs_rlsjob(*args)
+pbs_rlsjob = _pbs.pbs_rlsjob
+
+def pbs_runjob(*args):
+  return _pbs.pbs_runjob(*args)
+pbs_runjob = _pbs.pbs_runjob
+
+def pbs_selectjob(*args):
+  return _pbs.pbs_selectjob(*args)
+pbs_selectjob = _pbs.pbs_selectjob
+
+def pbs_sigjob(*args):
+  return _pbs.pbs_sigjob(*args)
+pbs_sigjob = _pbs.pbs_sigjob
+
+def pbs_statfree(*args):
+  return _pbs.pbs_statfree(*args)
+pbs_statfree = _pbs.pbs_statfree
+
+def pbs_statjob(*args):
+  return _pbs.pbs_statjob(*args)
+pbs_statjob = _pbs.pbs_statjob
+
+def pbs_selstat(*args):
+  return _pbs.pbs_selstat(*args)
+pbs_selstat = _pbs.pbs_selstat
+
+def pbs_statque(*args):
+  return _pbs.pbs_statque(*args)
+pbs_statque = _pbs.pbs_statque
+
+def pbs_statserver(*args):
+  return _pbs.pbs_statserver(*args)
+pbs_statserver = _pbs.pbs_statserver
+
+def pbs_statnode(*args):
+  return _pbs.pbs_statnode(*args)
+pbs_statnode = _pbs.pbs_statnode
+
+def pbs_submit(*args):
+  return _pbs.pbs_submit(*args)
+pbs_submit = _pbs.pbs_submit
+
+def pbs_terminate(*args):
+  return _pbs.pbs_terminate(*args)
+pbs_terminate = _pbs.pbs_terminate
+
+def totpool(*args):
+  return _pbs.totpool(*args)
+totpool = _pbs.totpool
+
+def usepool(*args):
+  return _pbs.usepool(*args)
+usepool = _pbs.usepool
+
+def pbs_fbserver():
+  return _pbs.pbs_fbserver()
+pbs_fbserver = _pbs.pbs_fbserver
+
+def pbs_get_server_list():
+  return _pbs.pbs_get_server_list()
+pbs_get_server_list = _pbs.pbs_get_server_list
+
+def pbs_sigjobasync(*args):
+  return _pbs.pbs_sigjobasync(*args)
+pbs_sigjobasync = _pbs.pbs_sigjobasync
+
+def pbs_alterjob_async(*args):
+  return _pbs.pbs_alterjob_async(*args)
+pbs_alterjob_async = _pbs.pbs_alterjob_async
+
+def pbs_checkpointjob(*args):
+  return _pbs.pbs_checkpointjob(*args)
+pbs_checkpointjob = _pbs.pbs_checkpointjob
+
+def openrm(*args):
+  return _pbs.openrm(*args)
+openrm = _pbs.openrm
+
+def closerm(*args):
+  return _pbs.closerm(*args)
+closerm = _pbs.closerm
+
+def downrm(*args):
+  return _pbs.downrm(*args)
+downrm = _pbs.downrm
+
+def configrm(*args):
+  return _pbs.configrm(*args)
+configrm = _pbs.configrm
+
+def addreq(*args):
+  return _pbs.addreq(*args)
+addreq = _pbs.addreq
+
+def allreq(*args):
+  return _pbs.allreq(*args)
+allreq = _pbs.allreq
+
+def getreq(*args):
+  return _pbs.getreq(*args)
+getreq = _pbs.getreq
+
+def flushreq():
+  return _pbs.flushreq()
+flushreq = _pbs.flushreq
+
+def activereq():
+  return _pbs.activereq()
+activereq = _pbs.activereq
+
+def fullresp(*args):
+  return _pbs.fullresp(*args)
+fullresp = _pbs.fullresp
+LOG_BUF_SIZE = _pbs.LOG_BUF_SIZE
+LOG_EMERG = _pbs.LOG_EMERG
+LOG_ALERT = _pbs.LOG_ALERT
+LOG_CRIT = _pbs.LOG_CRIT
+LOG_ERR = _pbs.LOG_ERR
+LOG_WARNING = _pbs.LOG_WARNING
+LOG_NOTICE = _pbs.LOG_NOTICE
+LOG_INFO = _pbs.LOG_INFO
+LOG_DEBUG = _pbs.LOG_DEBUG
+
+def log_close(*args):
+  return _pbs.log_close(*args)
+log_close = _pbs.log_close
+
+def log_err(*args):
+  return _pbs.log_err(*args)
+log_err = _pbs.log_err
+
+def log_event(*args):
+  return _pbs.log_event(*args)
+log_event = _pbs.log_event
+
+def log_open(*args):
+  return _pbs.log_open(*args)
+log_open = _pbs.log_open
+
+def log_record(*args):
+  return _pbs.log_record(*args)
+log_record = _pbs.log_record
+
+def log_roll(*args):
+  return _pbs.log_roll(*args)
+log_roll = _pbs.log_roll
+
+def log_size():
+  return _pbs.log_size()
+log_size = _pbs.log_size
+
+def chk_file_sec(*args):
+  return _pbs.chk_file_sec(*args)
+chk_file_sec = _pbs.chk_file_sec
+
+def setup_env(*args):
+  return _pbs.setup_env(*args)
+setup_env = _pbs.setup_env
+
+def log_ext(*args):
+  return _pbs.log_ext(*args)
+log_ext = _pbs.log_ext
+
+def log_init(*args):
+  return _pbs.log_init(*args)
+log_init = _pbs.log_init
+
+def log_remove_old(*args):
+  return _pbs.log_remove_old(*args)
+log_remove_old = _pbs.log_remove_old
+PBSEVENT_ERROR = _pbs.PBSEVENT_ERROR
+PBSEVENT_SYSTEM = _pbs.PBSEVENT_SYSTEM
+PBSEVENT_ADMIN = _pbs.PBSEVENT_ADMIN
+PBSEVENT_JOB = _pbs.PBSEVENT_JOB
+PBSEVENT_JOB_USAGE = _pbs.PBSEVENT_JOB_USAGE
+PBSEVENT_SECURITY = _pbs.PBSEVENT_SECURITY
+PBSEVENT_SCHED = _pbs.PBSEVENT_SCHED
+PBSEVENT_DEBUG = _pbs.PBSEVENT_DEBUG
+PBSEVENT_DEBUG2 = _pbs.PBSEVENT_DEBUG2
+PBSEVENT_FORCE = _pbs.PBSEVENT_FORCE
+PBS_EVENTCLASS_SERVER = _pbs.PBS_EVENTCLASS_SERVER
+PBS_EVENTCLASS_QUEUE = _pbs.PBS_EVENTCLASS_QUEUE
+PBS_EVENTCLASS_JOB = _pbs.PBS_EVENTCLASS_JOB
+PBS_EVENTCLASS_REQUEST = _pbs.PBS_EVENTCLASS_REQUEST
+PBS_EVENTCLASS_FILE = _pbs.PBS_EVENTCLASS_FILE
+PBS_EVENTCLASS_ACCT = _pbs.PBS_EVENTCLASS_ACCT
+PBS_EVENTCLASS_NODE = _pbs.PBS_EVENTCLASS_NODE
+PBSEVENT_MASK = _pbs.PBSEVENT_MASK
+MAX_PATH_LEN = _pbs.MAX_PATH_LEN
+SECS_PER_DAY = _pbs.SECS_PER_DAY
+TRUE = _pbs.TRUE
+FALSE = _pbs.FALSE
+#  PBS python interface
+#  Author: Bas van der Vlies <basv@sara.nl>
+#  Date  : 27 Feb 2002
+#  Desc. : This is python wrapper class for getting the resource
+#          mom values.
+#
+# CVS info
+# $Id: resmom.py,v 1.6 2002/10/21 14:14:47 sscpbas Exp $
+# $Date: 2002/10/21 14:14:47 $
+# $Revision: 1.6 $
+#
+import string
+import types
+
+# Default linux resources to get from the mom
+#
+default_linux_res = [   
+    "availmem",	    # available memory size in KB
+    "ideal_load",	# static ideal_load value
+    "loadave",      # the current load average
+    "max_load",	    # static max_load value
+    "ncpus",        # number of cpus 
+    "physmem",      # physical memory size in KB
+    "resi",		    # resident memory size for a pid or session in KB
+    "totmem",	    # total memory size in KB
+    "walltime",	    # wall clock time for a pid
+]
+
+# Default irix6 resources to get from the mom
+#
+default_irix6_res = [   
+    "availmem",	# available memory size in KB
+    "loadave",      # the current load average
+    "ncpus",        # number of cpus
+    "physmem",      # physical memory size in KB
+    "resi",		# resident memory size for a pid or session in KB
+    "walltime",	# wall clock time for a pid
+    "quota",	# quota information (sizes in KB)
+]
+
+default_mom_res = [   
+    "arch",		# the architecture of the machine
+    "uname",	# the architecture of the machine
+    "cput",		# cpu time for a pid or session
+    "idletime",	# seconds of idle time
+    "mem",		# memory size for a pid or session in KB
+    "sessions",	# list of sessions in the system
+    "pids",         # list of pids in a session
+    "nsessions",	# number of sessions in the system
+    "nusers",	# number of users in the system
+    "size",		# size of a file or filesystem
+    "host",		# Name  of host on which job should be run 
+    "nodes",	# Number and/or type of nodes to be reserved for exclusive use by the job
+    "other",	# Allows a  user  to  specify  site  specific  information
+    "software",	# Allows a user to specify software required by the job
+]
+
+def check_resp(dict, str):
+  """
+  Check the daemon response. If we have no permission to
+  query the values then we got a 'None' response. Else
+  if we supplied a keyword that does not exits we get a
+  '?' response
+  """
+  if not str:
+    return
+  
+  ## Value can contain the '=' char :-(
+  #  
+  l =  string.split(str, '=')
+  key = string.strip(l[0])
+  if len(l) > 2:
+    val = string.strip( '='.join(l[1:]) )
+  else:
+    val = string.strip(l[1])
+
+  key = string.strip(key)
+  val = string.strip(val)
+
+  # Did we got a valid response
+  #
+  if not val[0] == '?':
+    dict[key] = val
+
+def use_default_keywords(id, d):
+  """
+  Get the default values from the mom daemon
+  """
+  for res in default_mom_res:
+    addreq(id, res)
+    resp = getreq(id)
+    check_resp(d, resp)
+
+  # Do not proceed if we have an empty dictionary
+  #
+  if not d:
+    return
+
+  if d['arch' ] == 'linux':
+    for res in default_linux_res:
+      addreq(id, res)
+      resp = getreq(id)
+      check_resp(d, resp)
+
+def use_user_keywords(id, d, l):
+  for res in l:
+    if type(res) is types.StringType:
+      addreq(id, res)
+      resp = getreq(id)
+      check_resp(d, resp)
+    else:
+      raise TypeError, 'Expected a string got %s :%s' %(type(res), res) 
+
+def get_mom_values(id, list = None):
+  """
+  This function will query the mom with a default resmon keywords
+  and 'arch' depended keywords. Supported archs are:
+    linux
+    irix6
+  User can also supply their own list of keywords as second parameter.
+  arguments:
+    id   : connection number with mom daemon on a node
+    list : optional parameter. If supplied then use this. A list
+           of mom keywords.
+  """
+
+  d = {}
+  if not list:
+    use_default_keywords(id, d)
+  else:
+    use_user_keywords(id, d , list)
+     
+  return d
+
+version_info = ( 4, 4, 1 )
+version = 'SARA pbs_python version 4.4.1'
+
+# A useful dict with error codes to text
+#
+# SVN Info:
+#	$Id: errors.py 429 2005-11-04 13:59:06Z bas $
+#
+errors_txt = { 
+	0 : 'no error',
+	15001 :	 'Unknown Job Identifier',
+	15002 : 'Undefined Attribute',
+	15003 : 'attempt to set READ ONLY attribute',
+	15004 : 'Invalid request',
+	15005 : 'Unknown batch request',
+	15006 : 'Too many submit retries',
+	15007 : 'No permission',
+	15008 : 'access from host not allowed',
+	15009 : 'job already exists',
+	15010 : 'system error occurred',
+	15011 : 'internal server error occurred',
+	15012 : 'parent job of dependent in rte que',
+	15013 : 'unknown signal name',
+	15014 : 'bad attribute value',
+	15015 : 'Cannot modify attrib in run state',
+	15016 : 'request invalid for job state',
+	15018 : 'Unknown queue name',
+	15019 : 'Invalid Credential in request',
+	15020 : 'Expired Credential in request',
+	15021 : 'Queue not enabled',
+	15022 : 'No access permission for queue',
+	15023 : 'Bad user - no password entry',
+	15024 : 'Max hop count exceeded',
+	15025 : 'Queue already exists',
+	15026 : 'incompatable queue attribute type',
+	15027 : 'Queue Busy (not empty)',
+	15028 : 'Queue name too long',
+	15029 : 'Feature',
+	15030 : 'Cannot enable queue,needs add def',
+	15031 : 'Protocol (ASN.1) error',
+	15032 : 'Bad attribute list structure',
+	15033 : 'No free connections',
+	15034 : 'No server to connect to',
+	15035 : 'Unknown resource',
+	15036 : 'Job exceeds Queue resource limits',
+	15037 : 'No Default Queue Defined',
+	15038 : 'Job Not Rerunnable',
+	15039 : 'Route rejected by all destinations',
+	15040 : 'Time in Route Queue Expired',
+	15041 : 'Request to MOM failed',
+	15042 : '(qsub) cannot access script file',
+	15043 : 'Stage In of files failed',
+	15044 : 'Resources temporarily unavailable',
+	15045 : 'Bad Group specified',
+	15046 : 'Max number of jobs in queue',
+	15047 : 'Checkpoint Busy, may be retries',
+	15048 : 'Limit exceeds allowable',
+	15049 : 'Bad Account attribute value',
+	15050 : 'Job already in exit state',
+	15051 : 'Job files not copied',
+	15052 : 'unknown job id after clean init',
+	15053 : 'No Master in Sync Set',
+	15054 : 'Invalid dependency',
+	15055 : 'Duplicate entry in List',
+	15056 : 'Bad DIS based Request Protocol',
+	15057 : 'cannot execute there',
+	15058 : 'sister rejected',
+	15059 : 'sister could not communicate',
+	15060 : 'req rejected -server shutting down',
+	15061 : 'not all tasks could checkpoint',
+	15062 : 'Named node is not in the list',
+	15063 : 'node-attribute not recognized',
+	15064 : 'Server has no node list',
+	15065 : 'Node name is too big',
+	15066 : 'Node name already exists',
+	15067 : 'Bad node-attribute value',
+	15068 : 'State values are mutually exclusive',
+	15069 : 'Error(s) during global modification of nodes',
+	15070 : 'could not contact Mom',
+	15071 : 'no time-shared nodes',
+	15201 : 'resource unknown',
+	15202 : 'parameter could not be used',
+	15203 : 'a parameter needed did not exist',
+	15204 : "something specified didn't exist",
+	15205 : 'a system error occured',
+	15206 : 'only part of reservation made'
+}
+
+def error():
+  """
+  Check if there is an error, if so fetch the error message string. 
+  It says more then a number!
+  """
+  e = get_error()
+  if errors_txt.has_key(e):
+     return (e, errors_txt[e])
+  else:
+     return (e, "Could not find a text for this error, uhhh")
+
+
+cvar = _pbs.cvar
+
Index: /tags/4.6.0/src/C/pbs_error.h
===================================================================
--- /tags/4.6.0/src/C/pbs_error.h	(revision 342)
+++ /tags/4.6.0/src/C/pbs_error.h	(revision 342)
@@ -0,0 +1,197 @@
+/*
+*         OpenPBS (Portable Batch System) v2.3 Software License
+* 
+* Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+* All rights reserved.
+* 
+* ---------------------------------------------------------------------------
+* For a license to use or redistribute the OpenPBS software under conditions
+* other than those described below, or to purchase support for this software,
+* please contact Veridian Systems, PBS Products Department ("Licensor") at:
+* 
+*    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+*                        877 902-4PBS (US toll-free)
+* ---------------------------------------------------------------------------
+* 
+* This license covers use of the OpenPBS v2.3 software (the "Software") at
+* your site or location, and, for certain users, redistribution of the
+* Software to other sites and locations.  Use and redistribution of
+* OpenPBS v2.3 in source and binary forms, with or without modification,
+* are permitted provided that all of the following conditions are met.
+* After December 31, 2001, only conditions 3-6 must be met:
+* 
+* 1. Commercial and/or non-commercial use of the Software is permitted
+*    provided a current software registration is on file at www.OpenPBS.org.
+*    If use of this software contributes to a publication, product, or
+*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
+* 
+* 2. Redistribution in any form is only permitted for non-commercial,
+*    non-profit purposes.  There can be no charge for the Software or any
+*    software incorporating the Software.  Further, there can be no
+*    expectation of revenue generated as a consequence of redistributing
+*    the Software.
+* 
+* 3. Any Redistribution of source code must retain the above copyright notice
+*    and the acknowledgment contained in paragraph 6, this list of conditions
+*    and the disclaimer contained in paragraph 7.
+* 
+* 4. Any Redistribution in binary form must reproduce the above copyright
+*    notice and the acknowledgment contained in paragraph 6, this list of
+*    conditions and the disclaimer contained in paragraph 7 in the
+*    documentation and/or other materials provided with the distribution.
+* 
+* 5. Redistributions in any form must be accompanied by information on how to
+*    obtain complete source code for the OpenPBS software and any
+*    modifications and/or additions to the OpenPBS software.  The source code
+*    must either be included in the distribution or be available for no more
+*    than the cost of distribution plus a nominal fee, and all modifications
+*    and additions to the Software must be freely redistributable by any party
+*    (including Licensor) without restriction.
+* 
+* 6. All advertising materials mentioning features or use of the Software must
+*    display the following acknowledgment:
+* 
+*     "This product includes software developed by NASA Ames Research Center,
+*     Lawrence Livermore National Laboratory, and Veridian Information 
+*     Solutions, Inc.
+*     Visit www.OpenPBS.org for OpenPBS software support,
+*     products, and information."
+* 
+* 7. DISCLAIMER OF WARRANTY
+* 
+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+* ARE EXPRESSLY DISCLAIMED.
+* 
+* IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+* U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+* 
+* This license will be governed by the laws of the Commonwealth of Virginia,
+* without reference to its choice of law rules.
+*/
+
+/*
+ * The error returns possible to a Batch Request
+ *
+ * Each error is prefixed with the string PBSE_ for Portable (Posix)
+ * Batch System Error.  The numeric values start with 15000 since the
+ * POSIX Batch Extensions Working group is 1003.15
+ */
+#ifndef PBSE_
+
+#define PBSE_	15000
+
+#define PBSE_NONE       0		/* no error */
+#define PBSE_UNKJOBID	15001		/* Unknown Job Identifier */
+#define PBSE_NOATTR	15002		/* Undefined Attribute */
+#define PBSE_ATTRRO	15003		/* attempt to set READ ONLY attribute */
+#define PBSE_IVALREQ	15004		/* Invalid request */
+#define PBSE_UNKREQ	15005		/* Unknown batch request */
+#define PBSE_TOOMANY	15006		/* Too many submit retries */
+#define PBSE_PERM	15007		/* No permission */
+#define PBSE_BADHOST	15008		/* access from host not allowed */
+#define PBSE_JOBEXIST	15009		/* job already exists */
+#define PBSE_SYSTEM	15010		/* system error occurred */
+#define PBSE_INTERNAL	15011		/* internal server error occurred */
+#define PBSE_REGROUTE	15012		/* parent job of dependent in rte que */
+#define PBSE_UNKSIG	15013		/* unknown signal name */
+#define PBSE_BADATVAL	15014		/* bad attribute value */
+#define PBSE_MODATRRUN	15015		/* Cannot modify attrib in run state */
+#define PBSE_BADSTATE	15016		/* request invalid for job state */
+#define PBSE_UNKQUE	15018		/* Unknown queue name */
+#define PBSE_BADCRED	15019		/* Invalid Credential in request */
+#define PBSE_EXPIRED	15020		/* Expired Credential in request */
+#define PBSE_QUNOENB	15021		/* Queue not enabled */
+#define PBSE_QACESS	15022		/* No access permission for queue */
+#define PBSE_BADUSER	15023		/* Bad user - no password entry */
+#define PBSE_HOPCOUNT	15024		/* Max hop count exceeded */
+#define PBSE_QUEEXIST	15025		/* Queue already exists */
+#define PBSE_ATTRTYPE	15026		/* incompatable queue attribute type */
+#define PBSE_QUEBUSY	15027		/* Queue Busy (not empty) */
+#define PBSE_QUENBIG	15028		/* Queue name too long */
+#define PBSE_NOSUP	15029		/* Feature/function not supported */
+#define PBSE_QUENOEN	15030		/* Cannot enable queue,needs add def */
+#define PBSE_PROTOCOL	15031		/* Protocol (ASN.1) error */
+#define PBSE_BADATLST	15032		/* Bad attribute list structure */
+#define PBSE_NOCONNECTS	15033		/* No free connections */
+#define PBSE_NOSERVER	15034		/* No server to connect to */
+#define PBSE_UNKRESC	15035		/* Unknown resource */
+#define PBSE_EXCQRESC	15036		/* Job exceeds Queue resource limits */
+#define PBSE_QUENODFLT	15037		/* No Default Queue Defined */
+#define PBSE_NORERUN	15038		/* Job Not Rerunnable */
+#define PBSE_ROUTEREJ	15039		/* Route rejected by all destinations */
+#define PBSE_ROUTEEXPD	15040		/* Time in Route Queue Expired */
+#define PBSE_MOMREJECT  15041		/* Request to MOM failed */
+#define PBSE_BADSCRIPT	15042		/* (qsub) cannot access script file */
+#define PBSE_STAGEIN	15043		/* Stage In of files failed */
+#define PBSE_RESCUNAV	15044		/* Resources temporarily unavailable */
+#define PBSE_BADGRP	15045		/* Bad Group specified */
+#define PBSE_MAXQUED	15046		/* Max number of jobs in queue */
+#define PBSE_CKPBSY	15047		/* Checkpoint Busy, may be retries */
+#define PBSE_EXLIMIT	15048		/* Limit exceeds allowable */
+#define PBSE_BADACCT	15049		/* Bad Account attribute value */
+#define PBSE_ALRDYEXIT	15050		/* Job already in exit state */
+#define PBSE_NOCOPYFILE	15051		/* Job files not copied */
+#define PBSE_CLEANEDOUT	15052		/* unknown job id after clean init */
+#define PBSE_NOSYNCMSTR	15053		/* No Master in Sync Set */
+#define PBSE_BADDEPEND	15054		/* Invalid dependency */
+#define PBSE_DUPLIST	15055		/* Duplicate entry in List */
+#define PBSE_DISPROTO	15056		/* Bad DIS based Request Protocol */
+#define PBSE_EXECTHERE	15057		/* cannot execute there */
+#define PBSE_SISREJECT	15058		/* sister rejected */
+#define PBSE_SISCOMM	15059		/* sister could not communicate */
+#define PBSE_SVRDOWN	15060		/* req rejected -server shutting down */
+#define PBSE_CKPSHORT	15061		/* not all tasks could checkpoint */
+#define PBSE_UNKNODE	15062		/* Named node is not in the list */
+#define PBSE_UNKNODEATR	15063		/* node-attribute not recognized */
+#define PBSE_NONODES	15064		/* Server has no node list */
+#define PBSE_NODENBIG	15065		/* Node name is too big */
+#define PBSE_NODEEXIST	15066		/* Node name already exists */
+#define PBSE_BADNDATVAL	15067		/* Bad node-attribute value */
+#define PBSE_MUTUALEX	15068		/* State values are mutually exclusive */
+#define PBSE_GMODERR	15069		/* Error(s) during global modification of nodes */
+#define PBSE_NORELYMOM	15070		/* could not contact Mom */
+#define PBSE_NOTSNODE	15071		/* no time-shared nodes */
+
+/*
+** 	Resource monitor specific
+*/
+#define PBSE_RMUNKNOWN	15201		/* resource unknown */
+#define PBSE_RMBADPARAM	15202		/* parameter could not be used */
+#define PBSE_RMNOPARAM	15203		/* a parameter needed did not exist */
+#define PBSE_RMEXIST	15204		/* something specified didn't exist */
+#define PBSE_RMSYSTEM	15205		/* a system error occured */
+#define PBSE_RMPART	15206		/* only part of reservation made */
+#define RM_ERR_UNKNOWN	PBSE_RMUNKNOWN
+#define RM_ERR_BADPARAM	PBSE_RMBADPARAM
+#define RM_ERR_NOPARAM	PBSE_RMNOPARAM
+#define RM_ERR_EXIST	PBSE_RMEXIST
+#define RM_ERR_SYSTEM	PBSE_RMSYSTEM
+
+#ifndef NULL
+#define NULL (char *)0
+#endif /* NULL */
+
+
+/* the following structure is used to tie error number      */
+/* with text to be returned to a client, see svr_messages.c */
+
+struct pbs_err_to_txt {
+  int    err_no;
+  char **err_txt;
+  };
+
+extern char *pbse_to_txt(int);
+
+extern int pbs_errno;
+
+#endif  /* END PBSE_ */
+
+
Index: /tags/4.6.0/src/C/pbs_ifl.h
===================================================================
--- /tags/4.6.0/src/C/pbs_ifl.h	(revision 342)
+++ /tags/4.6.0/src/C/pbs_ifl.h	(revision 342)
@@ -0,0 +1,548 @@
+/*
+ * $Id$
+ *
+*         Portable Batch System (PBS) Software License
+* 
+* Copyright (c) 1999, MRJ Technology Solutions.
+* All rights reserved.
+* 
+* Acknowledgment: The Portable Batch System Software was originally developed
+* as a joint project between the Numerical Aerospace Simulation (NAS) Systems
+* Division of NASA Ames Research Center and the National Energy Research
+* Supercomputer Center (NERSC) of Lawrence Livermore National Laboratory.
+* 
+* Redistribution of the Portable Batch System Software and use in source
+* and binary forms, with or without modification, are permitted provided
+* that the following conditions are met:
+* 
+* - Redistributions of source code must retain the above copyright and
+*   acknowledgment notices, this list of conditions and the following
+*   disclaimer.
+* 
+* - Redistributions in binary form must reproduce the above copyright and 
+*   acknowledgment notices, this list of conditions and the following
+*   disclaimer in the documentation and/or other materials provided with the
+*   distribution.
+* 
+* - All advertising materials mentioning features or use of this software must
+*   display the following acknowledgment:
+* 
+*   This product includes software developed by NASA Ames Research Center,
+*   Lawrence Livermore National Laboratory, and MRJ Technology Solutions.
+* 
+*         DISCLAIMER OF WARRANTY
+* 
+* THIS SOFTWARE IS PROVIDED BY MRJ TECHNOLOGY SOLUTIONS ("MRJ") "AS IS" WITHOUT 
+* WARRANTY OF ANY KIND, AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
+* FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED.
+* 
+* IN NO EVENT, UNLESS REQUIRED BY APPLICABLE LAW, SHALL MRJ, NASA, NOR
+* THE U.S. GOVERNMENT BE LIABLE FOR ANY DIRECT DAMAGES WHATSOEVER,
+* NOR ANY INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+* 
+* This license will be governed by the laws of the Commonwealth of Virginia,
+* without reference to its choice of law rules.
+*/
+
+/*
+ * @(#) $Id$
+ */
+
+/*    
+ *
+ *  pbs_ifl.h   
+ *
+ */
+
+/*
+ *  Changed by: Bas van der Vlies <basv@sara.nl>. 
+ *  Desc.     : removed the macro definitions so that SWIG can understand 
+ *              the header file syntax
+*/
+
+#ifndef _PBS_IFL_DEF
+#define _PBS_IFL_DEF
+
+/* Attribute Names used by user commands */
+
+#define ATTR_a "Execution_Time"
+#define ATTR_c "Checkpoint"
+#define ATTR_e "Error_Path"
+#define ATTR_f "fault_tolerant"
+#define ATTR_g "group_list"
+#define ATTR_h "Hold_Types"
+#define ATTR_j "Join_Path"
+#define ATTR_k "Keep_Files"
+#define ATTR_l "Resource_List"
+#define ATTR_m "Mail_Points"
+#define ATTR_o "Output_Path"
+#define ATTR_p "Priority"
+#define ATTR_q "destination"
+#define ATTR_r "Rerunable"
+#define ATTR_t "job_array_request"
+#define ATTR_array_id "job_array_id"
+#define ATTR_u "User_List"
+#define ATTR_v "Variable_List"
+#define ATTR_A "Account_Name"
+#define ATTR_M "Mail_Users"
+#define ATTR_N "Job_Name"
+#define ATTR_S "Shell_Path_List"
+#define ATTR_depend   "depend"
+#define ATTR_inter    "interactive"
+#define ATTR_stagein  "stagein"
+#define ATTR_stageout "stageout"
+#define ATTR_jobtype  "jobtype"
+
+/* additional job and general attribute names */
+
+#define ATTR_ctime      "ctime"
+#define ATTR_exechost   "exec_host"
+#define ATTR_mtime      "mtime"
+#define ATTR_qtime      "qtime"
+#define ATTR_session    "session_id"
+#define ATTR_euser      "euser"
+#define ATTR_egroup     "egroup"
+#define ATTR_hashname   "hashname"
+#define ATTR_hopcount   "hop_count"
+#define ATTR_security   "security"
+#define ATTR_sched_hint "sched_hint"
+#define ATTR_substate   "substate"
+#define ATTR_name       "Job_Name"
+#define ATTR_owner      "Job_Owner"
+#define ATTR_used       "resources_used"
+#define ATTR_state      "job_state"
+#define ATTR_queue      "queue"
+#define ATTR_server     "server"
+#define ATTR_maxrun     "max_running"
+#define ATTR_maxreport  "max_report"
+#define ATTR_total      "total_jobs"
+#define ATTR_comment    "comment"
+#define ATTR_cookie     "cookie"
+#define ATTR_qrank      "queue_rank"
+#define ATTR_altid      "alt_id"
+#define ATTR_etime      "etime"
+#define ATTR_exitstat   "exit_status"
+#define ATTR_forwardx11 "forward_x11"
+#define ATTR_submit_args "submit_args"
+#define ATTR_tokens     "tokens"
+#define ATTR_netcounter "net_counter"
+#define ATTR_umask      "umask"
+#define ATTR_start_time "start_time"
+#define ATTR_start_count "start_count"
+#define ATTR_checkpoint_dir  "checkpoint_dir"    /* user specified directory for checkpoint files */
+#define ATTR_checkpoint_name  "checkpoint_name"   /* user specified name of checkpoint file */
+#define ATTR_checkpoint_time  "checkpoint_time"   /* timestamp of start of last checkpoint */
+#define ATTR_checkpoint_restart_status  "checkpoint_restart_status"   /* checkpoint restart status */
+#define ATTR_restart_name  "restart_name"   /* saved name of checkpoint restart file */
+#define ATTR_comp_time   "comp_time"
+#define ATTR_reported    "reported"
+#define ATTR_intcmd      "inter_cmd"
+
+#ifdef USEJOBCREATE
+#define ATTR_pagg         "pagg_id"
+#endif /* USEJOBCREATE */
+
+/* additional queue attributes names */
+
+#define ATTR_aclgren    "acl_group_enable"
+#define ATTR_aclgroup   "acl_groups"
+#define ATTR_aclhten    "acl_host_enable"
+#define ATTR_aclhost    "acl_hosts"
+#define ATTR_acluren    "acl_user_enable"
+#define ATTR_acluser    "acl_users"
+#define ATTR_altrouter  "alt_router"
+#define ATTR_checkpoint_min  "checkpoint_min"
+#define ATTR_enable     "enabled"
+#define ATTR_fromroute  "from_route_only"
+#define ATTR_hostlist    "hostlist"         /* TORQUE only */
+#define ATTR_killdelay   "kill_delay"
+#define ATTR_maxgrprun   "max_group_run"
+#define ATTR_maxque      "max_queuable"
+#define ATTR_maxuserque  "max_user_queuable"
+#define ATTR_maxuserrun  "max_user_run"
+#define ATTR_qtype       "queue_type"
+#define ATTR_rescassn    "resources_assigned"
+#define ATTR_rescdflt    "resources_default"
+#define ATTR_rescmax     "resources_max"
+#define ATTR_rescmin     "resources_min"
+#define ATTR_rerunnable  "restartable"      /* TORQUE only */
+#define ATTR_rndzretry   "rendezvous_retry"
+#define ATTR_routedest   "route_destinations"
+#define ATTR_routeheld   "route_held_jobs"
+#define ATTR_routewait   "route_waiting_jobs"
+#define ATTR_routeretry  "route_retry_time"
+#define ATTR_routelife   "route_lifetime"
+#define ATTR_rsvexpdt    "reserved_expedite"
+#define ATTR_rsvsync     "reserved_sync"
+#define ATTR_start       "started"
+#define ATTR_count       "state_count"
+#define ATTR_number      "number_jobs"
+#define ATTR_acllogic    "acl_logic_or"
+#define ATTR_aclgrpslpy  "acl_group_sloppy"
+#define ATTR_keepcompleted "keep_completed"
+#define ATTR_disallowedtypes "disallowed_types"
+#define ATTR_is_transit  "is_transit"
+
+/* additional server attributes names */
+
+/* NOTE: steps for adding new attribute described in ??? */
+/*  - create #define ATTR_* in include/pbs_ifl.h
+    - insert SRV_ATR_* in include/server.h
+    - add ATTR_* in include/qmgr_svr_public.h
+    - insert structure in server/svr_attr_def.c
+        NOTE:  structure must be in same relative position as SRV_ATR_*
+    - insert usage code in proper location
+*/
+
+#define ATTR_aclroot     "acl_roots"
+#define ATTR_managers    "managers"
+#define ATTR_dfltque     "default_queue"
+#define ATTR_dispsvrsuffix "display_job_server_suffix"
+#define ATTR_jobsuffixalias "job_suffix_alias"
+#define ATTR_defnode     "default_node"
+#define ATTR_locsvrs     "location_servers"
+#define ATTR_logevents   "log_events"
+#define ATTR_logfile     "log_file"
+#define ATTR_loglevel    "log_level"
+#define ATTR_mailfrom    "mail_from"
+#define ATTR_nodepack    "node_pack"
+#define ATTR_nodesuffix  "node_suffix"
+#define ATTR_operators   "operators"
+#define ATTR_queryother  "query_other_jobs"
+#define ATTR_resccost    "resources_cost"
+#define ATTR_rescavail   "resources_available"
+#define ATTR_schedit     "scheduler_iteration"
+#define ATTR_scheduling  "scheduling"
+#define ATTR_status      "server_state"
+#define ATTR_syscost     "system_cost"
+#define ATTR_pingrate    "node_ping_rate"
+#define ATTR_ndchkrate   "node_check_rate"
+#define ATTR_tcptimeout  "tcp_timeout"
+#define ATTR_jobstatrate "job_stat_rate"
+#define ATTR_polljobs    "poll_jobs"
+#define ATTR_downonerror "down_on_error"
+#define ATTR_disableserveridcheck "disable_server_id_check"
+#define ATTR_jobnanny    "job_nanny"
+#define ATTR_ownerpurge  "owner_purge"
+#define ATTR_qcqlimits   "queue_centric_limits"
+#define ATTR_momjobsync  "mom_job_sync"
+#define ATTR_maildomain  "mail_domain"
+#define ATTR_pbsversion  "pbs_version"
+#define ATTR_submithosts "submit_hosts"
+#define ATTR_allownodesubmit  "allow_node_submit"
+#define ATTR_allowproxyuser   "allow_proxy_user"
+#define ATTR_autonodenp  "auto_node_np"
+#define ATTR_servername  "server_name"
+#define ATTR_logfilemaxsize "log_file_max_size"
+#define ATTR_logfilerolldepth "log_file_roll_depth"
+#define ATTR_logkeepdays  "log_keep_days"
+#define ATTR_nextjobnum   "next_job_number"
+#define ATTR_extraresc    "extra_resc"
+#define ATTR_schedversion "sched_version"
+#define ATTR_acctkeepdays "accounting_keep_days"
+#define ATTR_lockfile "lock_file"
+#define ATTR_credentiallifetime "credential_lifetime"
+#define ATTR_jobmustreport "job_must_report"
+#define ATTR_LockfileUpdateTime "lock_file_update_time"
+#define ATTR_LockfileCheckTime "lock_file_check_time"
+#define ATTR_npdefault  "np_default"
+#define ATTR_jobstarttimeout "job_start_timeout"
+
+/* additional node "attributes" names */
+
+#define ATTR_NODE_state         "state"
+#define ATTR_NODE_np            "np"
+#define ATTR_NODE_properties    "properties"
+#define ATTR_NODE_ntype         "ntype"
+#define ATTR_NODE_jobs          "jobs"
+#define ATTR_NODE_status        "status"
+#define ATTR_NODE_note          "note"
+
+/* notification email formating */
+#define ATTR_mailsubjectfmt "mail_subject_fmt"
+#define ATTR_mailbodyfmt    "mail_body_fmt"
+
+
+/* various attribute values */
+
+#define CHECKPOINT_UNSPECIFIED "u"
+#define NO_HOLD "n"
+#define NO_JOIN "n"
+#define NO_KEEP "n"
+#define MAIL_AT_ABORT "a"
+
+
+#define DELDELAY  "deldelay=" /* see qdel.c */
+#define DELPURGE  "delpurge="   /* see qdel.c */
+#define PURGECOMP  "purgecomplete="   /* see req_delete.c */
+#define EXECQUEONLY  "exec_queue_only"   /* see req_stat.c */
+#define RERUNFORCE "force"
+
+#define USER_HOLD "u"
+#define OTHER_HOLD "o"
+#define SYSTEM_HOLD "s"
+
+/* node-attribute values (state,ntype) */
+
+#define ND_free   "free"
+#define ND_offline  "offline"
+#define ND_down   "down"
+#define ND_reserve  "reserve"
+#define ND_job_exclusive "job-exclusive"
+#define ND_job_sharing  "job-sharing"
+#define ND_busy   "busy"
+#define ND_state_unknown "state-unknown"
+#define ND_timeshared  "time-shared"
+#define ND_cluster  "cluster"
+
+/* queue disallowed types */
+#define Q_DT_batch              "batch"
+#define Q_DT_interactive        "interactive"
+#define Q_DT_rerunable          "rerunable"
+#define Q_DT_nonrerunable       "nonrerunable"
+#define Q_DT_fault_tolerant     "fault_tolerant"
+#define Q_DT_fault_intolerant   "fault_intolerant"
+#define Q_DT_job_array          "job_array"
+
+/*constant related to sum of string lengths for above strings*/
+#define MAX_ENCODE_BFR  100
+
+#define MGR_CMD_CREATE 0
+#define MGR_CMD_DELETE 1
+#define MGR_CMD_SET 2
+#define MGR_CMD_UNSET 3
+#define MGR_CMD_LIST 4
+#define MGR_CMD_PRINT 5
+#define MGR_CMD_ACTIVE 6
+
+#define MGR_OBJ_NONE -1
+#define MGR_OBJ_SERVER  0
+#define MGR_OBJ_QUEUE   1
+#define MGR_OBJ_JOB 2
+#define MGR_OBJ_NODE 3
+
+/* Misc defines for various requests */
+
+#define MSG_OUT 1
+#define MSG_ERR 2
+
+#define SHUT_SIG -1
+#define SHUT_IMMEDIATE 0
+#define SHUT_DELAY 1
+#define SHUT_QUICK 2
+
+#define SIG_RESUME "resume"
+#define SIG_SUSPEND "suspend"
+
+
+/* WARNING: be careful changing these PBS_MAX* values.  They can result in a
+   change in the structure of the .JB file, and binary incompatibilities between
+   versions of TORQUE.  Do not change in a -fixes branch */
+   
+   
+
+#define PBS_MAXHOSTNAME  1024 /* max host name length */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN  1024 /* max path name length */
+#endif
+#ifndef MAXNAMLEN
+#define MAXNAMLEN  255
+#endif
+#define MAX_NOTE  256 /* max node note length */
+#define MAX_NOTE_STR  "256" /* max node note length as a string literal (this MUST match MAX_NOTE) */
+
+#define PBS_MAXUSER  32 /* max user name length */
+#define PBS_MAXGRPN  16 /* max group name length */
+#define PBS_MAXQUEUENAME 15 /* max queue name length */
+#define PBS_MAXSERVERNAME PBS_MAXHOSTNAME /* max server name length */
+#define PBS_MAXJOBARRAYLEN      6       /* number of characters allowed in jobarray portion of job id, including '-' */
+#define PBS_MAXSEQNUM  8 /* max sequence number length */
+#define PBS_MAXPORTNUM  5 /* udp/tcp port numbers max=16 bits */
+#define PBS_MAXJOBARRAY  99999
+#define PBS_MAXSVRJOBID  (PBS_MAXSEQNUM + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + PBS_MAXJOBARRAYLEN + 2 ) /* server job id size */
+#define PBS_MAXCLTJOBID  (PBS_MAXSVRJOBID + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + PBS_MAXJOBARRAYLEN + 2) /* client job id size */
+#define PBS_MAXDEST  1024  /* destination size -- increased from 256 */
+#define PBS_MAXROUTEDEST (PBS_MAXQUEUENAME + PBS_MAXSERVERNAME + PBS_MAXPORTNUM + 2) /* destination size */
+#define PBS_USE_IFF  1 /* pbs_connect() to call pbs_iff */
+#define PBS_INTERACTIVE  1 /* Support of Interactive jobs */
+#define PBS_TERM_BUF_SZ  80 /* Interactive term buffer size */
+#define PBS_TERM_CCA  6 /* Interactive term cntl char array */
+
+/* constants used to indicate version of job ji_qs struct written to disk.
+   starting with 2.4.0 we stopped encoding the torque version number into the 
+   hex value e.g. 0x00020300 for torque v2.3.0. Now we just increment a value 
+   which is added to the last version encoded that way */
+#define PBS_QS_VERSION_BASE 0x00020300 /* magic number do not change */
+#define PBS_QS_VERSION_INT 1 /* increment this version number with every change to the ji_qs struct */
+#define PBS_QS_VERSION  (PBS_QS_VERSION_BASE + PBS_QS_VERSION_INT) /* version number saved in the ji_qs struct */
+
+/* someday the PBS_*_PORT definition will go away and only the */
+/* PBS_*_SERVICE_NAME form will be used, maybe   */
+
+#define PBS_BATCH_SERVICE_NAME  "pbs"
+
+#ifndef PBS_BATCH_SERVICE_PORT
+#define PBS_BATCH_SERVICE_PORT  15001
+#endif /* PBS_BATCH_SERVICE_PORT */
+
+#define PBS_BATCH_SERVICE_NAME_DIS "pbs_dis" /* new DIS port   */
+
+#ifndef PBS_BATCH_SERVICE_PORT_DIS
+#define PBS_BATCH_SERVICE_PORT_DIS 15001  /* new DIS port   */
+#endif /* PBS_BATCH_SERVICE_PORT_DIS */
+
+#define PBS_MOM_SERVICE_NAME  "pbs_mom"
+
+#ifndef PBS_MOM_SERVICE_PORT
+#define PBS_MOM_SERVICE_PORT  15002
+#endif /* PBS_MOM_SERVICE_PORT */
+
+#define PBS_MANAGER_SERVICE_NAME "pbs_resmon"
+
+#ifndef PBS_MANAGER_SERVICE_PORT
+#define PBS_MANAGER_SERVICE_PORT 15003
+#endif /* PBS_MANAGER_SERVICE_PORT */
+
+#define PBS_SCHEDULER_SERVICE_NAME "pbs_sched"
+
+#ifndef PBS_SCHEDULER_SERVICE_PORT
+#define PBS_SCHEDULER_SERVICE_PORT 15004
+#endif /* PBS_SCHEDULER_SERVICE_PORT */
+
+/*
+ * Other misc checkpoint defines
+ */
+#define CHECKPOINTHOLD "checkpoint_hold"
+#define CHECKPOINTCONT "checkpoint_cont"
+#define MOM_DEFAULT_CHECKPOINT_DIR "$MOMDEFAULTCHECKPOINTDIR$"
+
+
+enum batch_op { SET, UNSET, INCR, DECR, EQ, NE, GE, GT, LE, LT, DFLT, MERGE };
+
+/*
+** This structure is identical to attropl so they can be used
+** interchangably.  The op field is not used.
+*/
+
+struct attrl
+  {
+  struct attrl  *next;
+  char          *name;
+  char          *resource;
+  char          *value;
+  enum batch_op  op; /* not used */
+  };
+
+struct attropl
+  {
+  struct attropl *next;
+  char   *name;
+  char   *resource;
+  char   *value;
+  enum batch_op   op;
+  };
+
+struct batch_status
+  {
+  struct batch_status *next;
+  char                *name;
+  struct attrl        *attribs;
+  char                *text;
+  };
+
+
+
+
+/* Resource Reservation Information */
+typedef int resource_t;  /* resource reservation handle */
+
+#define RESOURCE_T_NULL  (resource_t)0
+#define RESOURCE_T_ALL  (resource_t)-1
+
+extern int pbs_errno;  /* error number */
+
+extern char *pbs_server; /* server attempted to connect | connected to */
+/* see pbs_connect(3B)         */
+
+extern char *avail(int connect, char *resc);
+extern int pbs_asyrunjob(int c, char *jobid, char *location, char *extend);
+extern int pbs_alterjob(int connect, char *job_id, struct attrl *ATTRL, char *extend);
+extern int pbs_connect(char *server);
+extern int pbs_query_max_connections(void);
+extern char *pbs_default(void);
+
+extern int pbs_deljob(int connect, char *job_id, char *extend);
+extern int pbs_disconnect(int connect);
+extern char *pbs_geterrmsg(int connect);
+extern int pbs_holdjob(int connect, char *job_id, char *hold_type, char *extend);
+extern char *pbs_locjob(int connect, char *job_id, char *extend);
+
+extern int pbs_manager(int connect, int command, int obj_type, char *obj_name,
+	struct attropl *ATTROPL, char *extend);
+	
+extern int pbs_movejob(int connect, char *job_id, char *destination, char *extend);
+	
+extern int pbs_msgjob(int connect, char *job_id, int file, char *message, char *extend);
+
+extern int pbs_orderjob (int connect, char *job1, char *job2, char *extend);
+
+extern int pbs_rescquery(int connect, char **CHAR, int nresc, int *avail,
+	int *alloc, int *resv, int *down);
+
+extern int pbs_rescreserve(int connect, char **CHAR, int nresc, resource_t *phandle);
+
+extern int pbs_rescrelease(int connect, resource_t rhandle);
+
+extern int pbs_rerunjob(int connect, char *job_id, char *extend);
+
+extern int pbs_rlsjob(int connect, char *job_id, char *hold_type, char *extend);
+
+extern int pbs_runjob(int connect, char *jobid, char *loc, char *extend);
+
+extern char **pbs_selectjob(int connect, struct attropl *ATTROPL, char *extend);
+
+extern int pbs_sigjob(int connect, char *job_id, char *signal, char *extend);
+
+
+extern void pbs_statfree(struct batch_status *BATCH_STATUS);
+
+// Function does not exitst Bas van der Vlies
+// 
+// extern struct batch_status *pbs_statdest(int connect, char *id, char *extend);
+
+extern struct batch_status *pbs_statjob(int connect, char *id, struct attrl *ATTRL, char *extend);
+
+extern struct batch_status *pbs_selstat(int connect, struct attropl *ATTROPL, char *extend);
+
+extern struct batch_status *pbs_statque(int connect, char *id, struct attrl *ATTRL, char *extend); 
+
+extern struct batch_status *pbs_statserver(int connect, struct attrl *ATTRL, char *extend);
+
+extern struct batch_status *pbs_statnode(int connect, char *id, struct attrl *ATTRL, char *extend);
+
+extern char *pbs_submit(int connect, struct attropl *ATTROPL, char *script,
+	char *destination, char *extend);
+	
+extern int pbs_terminate(int connect, int manner, char *extend);
+
+extern int totpool(int connect, int update);
+
+extern int usepool(int connect, int update);
+
+#ifdef TORQUE_2_4
+extern char *pbs_fbserver(void);
+extern char *pbs_get_server_list(void);
+extern int pbs_sigjobasync(int connect, char *job_id, char *signal, char *extend);
+extern int pbs_alterjob_async(int connect, char *job_id, struct attrl *ATTRL, char *extend);
+extern int pbs_checkpointjob(int connect, char *job_id, char *extend);
+#endif
+
+#endif	/* _PBS_IFL_DEF */
+
+/*  end of pbs_ifl.h  */
Index: /tags/4.6.0/src/C/pbs_wrap.c
===================================================================
--- /tags/4.6.0/src/C/pbs_wrap.c	(revision 342)
+++ /tags/4.6.0/src/C/pbs_wrap.c	(revision 342)
@@ -0,0 +1,8717 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 1.3.40
+ * 
+ * This file is not intended to be easily readable and contains a number of 
+ * coding conventions designed to improve portability and efficiency. Do not make
+ * changes to this file unless you know what you are doing--modify the SWIG 
+ * interface file instead. 
+ * ----------------------------------------------------------------------------- */
+
+#define SWIGPYTHON
+#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+
+/* -----------------------------------------------------------------------------
+ *  This section contains generic SWIG labels for method/variable
+ *  declarations/attributes, and other compiler dependent labels.
+ * ----------------------------------------------------------------------------- */
+
+/* template workaround for compilers that cannot correctly implement the C++ standard */
+#ifndef SWIGTEMPLATEDISAMBIGUATOR
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# else
+#  define SWIGTEMPLATEDISAMBIGUATOR
+# endif
+#endif
+
+/* inline attribute */
+#ifndef SWIGINLINE
+# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+#   define SWIGINLINE inline
+# else
+#   define SWIGINLINE
+# endif
+#endif
+
+/* attribute recognised by some compilers to avoid 'unused' warnings */
+#ifndef SWIGUNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define SWIGUNUSED __attribute__ ((__unused__)) 
+#   else
+#     define SWIGUNUSED
+#   endif
+# elif defined(__ICC)
+#   define SWIGUNUSED __attribute__ ((__unused__)) 
+# else
+#   define SWIGUNUSED 
+# endif
+#endif
+
+#ifndef SWIG_MSC_UNSUPPRESS_4505
+# if defined(_MSC_VER)
+#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
+# endif 
+#endif
+
+#ifndef SWIGUNUSEDPARM
+# ifdef __cplusplus
+#   define SWIGUNUSEDPARM(p)
+# else
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
+# endif
+#endif
+
+/* internal SWIG method */
+#ifndef SWIGINTERN
+# define SWIGINTERN static SWIGUNUSED
+#endif
+
+/* internal inline SWIG method */
+#ifndef SWIGINTERNINLINE
+# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+#endif
+
+/* exporting methods */
+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#  ifndef GCC_HASCLASSVISIBILITY
+#    define GCC_HASCLASSVISIBILITY
+#  endif
+#endif
+
+#ifndef SWIGEXPORT
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define SWIGEXPORT
+#   else
+#     define SWIGEXPORT __declspec(dllexport)
+#   endif
+# else
+#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+#     define SWIGEXPORT __attribute__ ((visibility("default")))
+#   else
+#     define SWIGEXPORT
+#   endif
+# endif
+#endif
+
+/* calling conventions for Windows */
+#ifndef SWIGSTDCALL
+# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#   define SWIGSTDCALL __stdcall
+# else
+#   define SWIGSTDCALL
+# endif 
+#endif
+
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
+
+/* Python.h has to appear first */
+#include <Python.h>
+
+/* -----------------------------------------------------------------------------
+ * swigrun.swg
+ *
+ * This file contains generic C API SWIG runtime support for pointer
+ * type checking.
+ * ----------------------------------------------------------------------------- */
+
+/* This should only be incremented when either the layout of swig_type_info changes,
+   or for whatever reason, the runtime changes incompatibly */
+#define SWIG_RUNTIME_VERSION "4"
+
+/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
+#ifdef SWIG_TYPE_TABLE
+# define SWIG_QUOTE_STRING(x) #x
+# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
+# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
+#else
+# define SWIG_TYPE_TABLE_NAME
+#endif
+
+/*
+  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
+  creating a static or dynamic library from the SWIG runtime code.
+  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
+  
+  But only do this if strictly necessary, ie, if you have problems
+  with your compiler or suchlike.
+*/
+
+#ifndef SWIGRUNTIME
+# define SWIGRUNTIME SWIGINTERN
+#endif
+
+#ifndef SWIGRUNTIMEINLINE
+# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
+#endif
+
+/*  Generic buffer size */
+#ifndef SWIG_BUFFER_SIZE
+# define SWIG_BUFFER_SIZE 1024
+#endif
+
+/* Flags for pointer conversions */
+#define SWIG_POINTER_DISOWN        0x1
+#define SWIG_CAST_NEW_MEMORY       0x2
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_OWN           0x1
+
+
+/* 
+   Flags/methods for returning states.
+   
+   The SWIG conversion methods, as ConvertPtr, return and integer 
+   that tells if the conversion was successful or not. And if not,
+   an error code can be returned (see swigerrors.swg for the codes).
+   
+   Use the following macros/flags to set or process the returning
+   states.
+   
+   In old versions of SWIG, code such as the following was usually written:
+
+     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
+       // success code
+     } else {
+       //fail code
+     }
+
+   Now you can be more explicit:
+
+    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+    } else {
+      // fail code
+    }
+
+   which is the same really, but now you can also do
+
+    Type *ptr;
+    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
+    if (SWIG_IsOK(res)) {
+      // success code
+      if (SWIG_IsNewObj(res) {
+        ...
+	delete *ptr;
+      } else {
+        ...
+      }
+    } else {
+      // fail code
+    }
+    
+   I.e., now SWIG_ConvertPtr can return new objects and you can
+   identify the case and take care of the deallocation. Of course that
+   also requires SWIG_ConvertPtr to return new result values, such as
+
+      int SWIG_ConvertPtr(obj, ptr,...) {         
+        if (<obj is ok>) {			       
+          if (<need new object>) {		       
+            *ptr = <ptr to new allocated object>; 
+            return SWIG_NEWOBJ;		       
+          } else {				       
+            *ptr = <ptr to old object>;	       
+            return SWIG_OLDOBJ;		       
+          } 				       
+        } else {				       
+          return SWIG_BADOBJ;		       
+        }					       
+      }
+
+   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
+   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
+   SWIG errors code.
+
+   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
+   allows to return the 'cast rank', for example, if you have this
+
+       int food(double)
+       int fooi(int);
+
+   and you call
+ 
+      food(1)   // cast rank '1'  (1 -> 1.0)
+      fooi(1)   // cast rank '0'
+
+   just use the SWIG_AddCast()/SWIG_CheckState()
+*/
+
+#define SWIG_OK                    (0) 
+#define SWIG_ERROR                 (-1)
+#define SWIG_IsOK(r)               (r >= 0)
+#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
+
+/* The CastRankLimit says how many bits are used for the cast rank */
+#define SWIG_CASTRANKLIMIT         (1 << 8)
+/* The NewMask denotes the object was created (using new/malloc) */
+#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
+/* The TmpMask is for in/out typemaps that use temporal objects */
+#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
+/* Simple returning values */
+#define SWIG_BADOBJ                (SWIG_ERROR)
+#define SWIG_OLDOBJ                (SWIG_OK)
+#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
+#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
+/* Check, add and del mask methods */
+#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
+#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
+#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
+#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
+#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
+#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
+
+/* Cast-Rank Mode */
+#if defined(SWIG_CASTRANK_MODE)
+#  ifndef SWIG_TypeRank
+#    define SWIG_TypeRank             unsigned long
+#  endif
+#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
+#    define SWIG_MAXCASTRANK          (2)
+#  endif
+#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
+#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
+SWIGINTERNINLINE int SWIG_AddCast(int r) { 
+  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
+}
+SWIGINTERNINLINE int SWIG_CheckState(int r) { 
+  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
+}
+#else /* no cast-rank mode */
+#  define SWIG_AddCast
+#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
+#endif
+
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *(*swig_converter_func)(void *, int *);
+typedef struct swig_type_info *(*swig_dycast_func)(void **);
+
+/* Structure to store information on one type */
+typedef struct swig_type_info {
+  const char             *name;			/* mangled name of this type */
+  const char             *str;			/* human readable name of this type */
+  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
+  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
+  void                   *clientdata;		/* language specific type data */
+  int                    owndata;		/* flag if the structure owns the clientdata */
+} swig_type_info;
+
+/* Structure to store a type and conversion function used for casting */
+typedef struct swig_cast_info {
+  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
+  swig_converter_func     converter;		/* function to cast the void pointers */
+  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
+  struct swig_cast_info  *prev;			/* pointer to the previous cast */
+} swig_cast_info;
+
+/* Structure used to store module information
+ * Each module generates one structure like this, and the runtime collects
+ * all of these structures and stores them in a circularly linked list.*/
+typedef struct swig_module_info {
+  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
+  size_t                 size;		        /* Number of types in this module */
+  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
+  swig_type_info         **type_initial;	/* Array of initially generated type structures */
+  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
+  void                    *clientdata;		/* Language specific module data */
+} swig_module_info;
+
+/* 
+  Compare two type names skipping the space characters, therefore
+  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
+
+  Return 0 when the two name types are equivalent, as in
+  strncmp, but skipping ' '.
+*/
+SWIGRUNTIME int
+SWIG_TypeNameComp(const char *f1, const char *l1,
+		  const char *f2, const char *l2) {
+  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
+    while ((*f1 == ' ') && (f1 != l1)) ++f1;
+    while ((*f2 == ' ') && (f2 != l2)) ++f2;
+    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
+  }
+  return (int)((l1 - f1) - (l2 - f2));
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if not equal, 1 if equal
+*/
+SWIGRUNTIME int
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+/*
+  Check type equivalence in a name list like <name1>|<name2>|...
+  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
+*/
+SWIGRUNTIME int
+SWIG_TypeCompare(const char *nb, const char *tb) {
+  int equiv = 0;
+  const char* te = tb + strlen(tb);
+  const char* ne = nb;
+  while (!equiv && *ne) {
+    for (nb = ne; *ne; ++ne) {
+      if (*ne == '|') break;
+    }
+    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    if (*ne) ++ne;
+  }
+  return equiv;
+}
+
+
+/*
+  Check the typename
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheck(const char *c, swig_type_info *ty) {
+  if (ty) {
+    swig_cast_info *iter = ty->cast;
+    while (iter) {
+      if (strcmp(iter->type->name, c) == 0) {
+        if (iter == ty->cast)
+          return iter;
+        /* Move iter to the top of the linked list */
+        iter->prev->next = iter->next;
+        if (iter->next)
+          iter->next->prev = iter->prev;
+        iter->next = ty->cast;
+        iter->prev = 0;
+        if (ty->cast) ty->cast->prev = iter;
+        ty->cast = iter;
+        return iter;
+      }
+      iter = iter->next;
+    }
+  }
+  return 0;
+}
+
+/* 
+  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
+*/
+SWIGRUNTIME swig_cast_info *
+SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
+  if (ty) {
+    swig_cast_info *iter = ty->cast;
+    while (iter) {
+      if (iter->type == from) {
+        if (iter == ty->cast)
+          return iter;
+        /* Move iter to the top of the linked list */
+        iter->prev->next = iter->next;
+        if (iter->next)
+          iter->next->prev = iter->prev;
+        iter->next = ty->cast;
+        iter->prev = 0;
+        if (ty->cast) ty->cast->prev = iter;
+        ty->cast = iter;
+        return iter;
+      }
+      iter = iter->next;
+    }
+  }
+  return 0;
+}
+
+/*
+  Cast a pointer up an inheritance hierarchy
+*/
+SWIGRUNTIMEINLINE void *
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
+}
+
+/* 
+   Dynamic pointer casting. Down an inheritance hierarchy
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
+  swig_type_info *lastty = ty;
+  if (!ty || !ty->dcast) return ty;
+  while (ty && (ty->dcast)) {
+    ty = (*ty->dcast)(ptr);
+    if (ty) lastty = ty;
+  }
+  return lastty;
+}
+
+/*
+  Return the name associated with this type
+*/
+SWIGRUNTIMEINLINE const char *
+SWIG_TypeName(const swig_type_info *ty) {
+  return ty->name;
+}
+
+/*
+  Return the pretty name associated with this type,
+  that is an unmangled type name in a form presentable to the user.
+*/
+SWIGRUNTIME const char *
+SWIG_TypePrettyName(const swig_type_info *type) {
+  /* The "str" field contains the equivalent pretty names of the
+     type, separated by vertical-bar characters.  We choose
+     to print the last name, as it is often (?) the most
+     specific. */
+  if (!type) return NULL;
+  if (type->str != NULL) {
+    const char *last_name = type->str;
+    const char *s;
+    for (s = type->str; *s; s++)
+      if (*s == '|') last_name = s+1;
+    return last_name;
+  }
+  else
+    return type->name;
+}
+
+/* 
+   Set the clientdata field for a type
+*/
+SWIGRUNTIME void
+SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
+  swig_cast_info *cast = ti->cast;
+  /* if (ti->clientdata == clientdata) return; */
+  ti->clientdata = clientdata;
+  
+  while (cast) {
+    if (!cast->converter) {
+      swig_type_info *tc = cast->type;
+      if (!tc->clientdata) {
+	SWIG_TypeClientData(tc, clientdata);
+      }
+    }    
+    cast = cast->next;
+  }
+}
+SWIGRUNTIME void
+SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
+  SWIG_TypeClientData(ti, clientdata);
+  ti->owndata = 1;
+}
+  
+/*
+  Search for a swig_type_info structure only by mangled name
+  Search is a O(log #types)
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_MangledTypeQueryModule(swig_module_info *start, 
+                            swig_module_info *end, 
+		            const char *name) {
+  swig_module_info *iter = start;
+  do {
+    if (iter->size) {
+      register size_t l = 0;
+      register size_t r = iter->size - 1;
+      do {
+	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
+	register size_t i = (l + r) >> 1; 
+	const char *iname = iter->types[i]->name;
+	if (iname) {
+	  register int compare = strcmp(name, iname);
+	  if (compare == 0) {	    
+	    return iter->types[i];
+	  } else if (compare < 0) {
+	    if (i) {
+	      r = i - 1;
+	    } else {
+	      break;
+	    }
+	  } else if (compare > 0) {
+	    l = i + 1;
+	  }
+	} else {
+	  break; /* should never happen */
+	}
+      } while (l <= r);
+    }
+    iter = iter->next;
+  } while (iter != end);
+  return 0;
+}
+
+/*
+  Search for a swig_type_info structure for either a mangled name or a human readable name.
+  It first searches the mangled names of the types, which is a O(log #types)
+  If a type is not found it then searches the human readable names, which is O(#types).
+  
+  We start searching at module start, and finish searching when start == end.  
+  Note: if start == end at the beginning of the function, we go all the way around
+  the circular list.
+*/
+SWIGRUNTIME swig_type_info *
+SWIG_TypeQueryModule(swig_module_info *start, 
+                     swig_module_info *end, 
+		     const char *name) {
+  /* STEP 1: Search the name field using binary search */
+  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
+  if (ret) {
+    return ret;
+  } else {
+    /* STEP 2: If the type hasn't been found, do a complete search
+       of the str field (the human readable name) */
+    swig_module_info *iter = start;
+    do {
+      register size_t i = 0;
+      for (; i < iter->size; ++i) {
+	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
+	  return iter->types[i];
+      }
+      iter = iter->next;
+    } while (iter != end);
+  }
+  
+  /* neither found a match */
+  return 0;
+}
+
+/* 
+   Pack binary data into a string
+*/
+SWIGRUNTIME char *
+SWIG_PackData(char *c, void *ptr, size_t sz) {
+  static const char hex[17] = "0123456789abcdef";
+  register const unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu =  u + sz;
+  for (; u != eu; ++u) {
+    register unsigned char uu = *u;
+    *(c++) = hex[(uu & 0xf0) >> 4];
+    *(c++) = hex[uu & 0xf];
+  }
+  return c;
+}
+
+/* 
+   Unpack binary data from a string
+*/
+SWIGRUNTIME const char *
+SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
+  register unsigned char *u = (unsigned char *) ptr;
+  register const unsigned char *eu = u + sz;
+  for (; u != eu; ++u) {
+    register char d = *(c++);
+    register unsigned char uu;
+    if ((d >= '0') && (d <= '9'))
+      uu = ((d - '0') << 4);
+    else if ((d >= 'a') && (d <= 'f'))
+      uu = ((d - ('a'-10)) << 4);
+    else 
+      return (char *) 0;
+    d = *(c++);
+    if ((d >= '0') && (d <= '9'))
+      uu |= (d - '0');
+    else if ((d >= 'a') && (d <= 'f'))
+      uu |= (d - ('a'-10));
+    else 
+      return (char *) 0;
+    *u = uu;
+  }
+  return c;
+}
+
+/* 
+   Pack 'void *' into a string buffer.
+*/
+SWIGRUNTIME char *
+SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
+  char *r = buff;
+  if ((2*sizeof(void *) + 2) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,&ptr,sizeof(void *));
+  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
+  strcpy(r,name);
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      *ptr = (void *) 0;
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sizeof(void *));
+}
+
+SWIGRUNTIME char *
+SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
+  char *r = buff;
+  size_t lname = (name ? strlen(name) : 0);
+  if ((2*sz + 2 + lname) > bsz) return 0;
+  *(r++) = '_';
+  r = SWIG_PackData(r,ptr,sz);
+  if (lname) {
+    strncpy(r,name,lname+1);
+  } else {
+    *r = 0;
+  }
+  return buff;
+}
+
+SWIGRUNTIME const char *
+SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
+  if (*c != '_') {
+    if (strcmp(c,"NULL") == 0) {
+      memset(ptr,0,sz);
+      return name;
+    } else {
+      return 0;
+    }
+  }
+  return SWIG_UnpackData(++c,ptr,sz);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/*  Errors in SWIG */
+#define  SWIG_UnknownError    	   -1 
+#define  SWIG_IOError        	   -2 
+#define  SWIG_RuntimeError   	   -3 
+#define  SWIG_IndexError     	   -4 
+#define  SWIG_TypeError      	   -5 
+#define  SWIG_DivisionByZero 	   -6 
+#define  SWIG_OverflowError  	   -7 
+#define  SWIG_SyntaxError    	   -8 
+#define  SWIG_ValueError     	   -9 
+#define  SWIG_SystemError    	   -10
+#define  SWIG_AttributeError 	   -11
+#define  SWIG_MemoryError    	   -12 
+#define  SWIG_NullReferenceError   -13
+
+
+
+/* Compatibility macros for Python 3 */
+#if PY_VERSION_HEX >= 0x03000000
+
+#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
+#define PyInt_Check(x) PyLong_Check(x)
+#define PyInt_AsLong(x) PyLong_AsLong(x)
+#define PyInt_FromLong(x) PyLong_FromLong(x)
+#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
+
+#endif
+
+#ifndef Py_TYPE
+#  define Py_TYPE(op) ((op)->ob_type)
+#endif
+
+/* SWIG APIs for compatibility of both Python 2 & 3 */
+
+#if PY_VERSION_HEX >= 0x03000000
+#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
+#else
+#  define SWIG_Python_str_FromFormat PyString_FromFormat
+#endif
+
+
+/* Warning: This function will allocate a new string in Python 3,
+ * so please call SWIG_Python_str_DelForPy3(x) to free the space.
+ */
+SWIGINTERN char*
+SWIG_Python_str_AsChar(PyObject *str)
+{
+#if PY_VERSION_HEX >= 0x03000000
+  char *cstr;
+  char *newstr;
+  Py_ssize_t len;
+  str = PyUnicode_AsUTF8String(str);
+  PyBytes_AsStringAndSize(str, &cstr, &len);
+  newstr = (char *) malloc(len+1);
+  memcpy(newstr, cstr, len+1);
+  Py_XDECREF(str);
+  return newstr;
+#else
+  return PyString_AsString(str);
+#endif
+}
+
+#if PY_VERSION_HEX >= 0x03000000
+#  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
+#else
+#  define SWIG_Python_str_DelForPy3(x) 
+#endif
+
+
+SWIGINTERN PyObject*
+SWIG_Python_str_FromChar(const char *c)
+{
+#if PY_VERSION_HEX >= 0x03000000
+  return PyUnicode_FromString(c); 
+#else
+  return PyString_FromString(c);
+#endif
+}
+
+/* Add PyOS_snprintf for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
+#  define PyOS_snprintf _snprintf
+# else
+#  define PyOS_snprintf snprintf
+# endif
+#endif
+
+/* A crude PyString_FromFormat implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+
+#ifndef SWIG_PYBUFFER_SIZE
+# define SWIG_PYBUFFER_SIZE 1024
+#endif
+
+static PyObject *
+PyString_FromFormat(const char *fmt, ...) {
+  va_list ap;
+  char buf[SWIG_PYBUFFER_SIZE * 2];
+  int res;
+  va_start(ap, fmt);
+  res = vsnprintf(buf, sizeof(buf), fmt, ap);
+  va_end(ap);
+  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
+}
+#endif
+
+/* Add PyObject_Del for old Pythons */
+#if PY_VERSION_HEX < 0x01060000
+# define PyObject_Del(op) PyMem_DEL((op))
+#endif
+#ifndef PyObject_DEL
+# define PyObject_DEL PyObject_Del
+#endif
+
+/* A crude PyExc_StopIteration exception for old Pythons */
+#if PY_VERSION_HEX < 0x02020000
+# ifndef PyExc_StopIteration
+#  define PyExc_StopIteration PyExc_RuntimeError
+# endif
+# ifndef PyObject_GenericGetAttr
+#  define PyObject_GenericGetAttr 0
+# endif
+#endif
+
+/* Py_NotImplemented is defined in 2.1 and up. */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef Py_NotImplemented
+#  define Py_NotImplemented PyExc_RuntimeError
+# endif
+#endif
+
+/* A crude PyString_AsStringAndSize implementation for old Pythons */
+#if PY_VERSION_HEX < 0x02010000
+# ifndef PyString_AsStringAndSize
+#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
+# endif
+#endif
+
+/* PySequence_Size for old Pythons */
+#if PY_VERSION_HEX < 0x02000000
+# ifndef PySequence_Size
+#  define PySequence_Size PySequence_Length
+# endif
+#endif
+
+/* PyBool_FromLong for old Pythons */
+#if PY_VERSION_HEX < 0x02030000
+static
+PyObject *PyBool_FromLong(long ok)
+{
+  PyObject *result = ok ? Py_True : Py_False;
+  Py_INCREF(result);
+  return result;
+}
+#endif
+
+/* Py_ssize_t for old Pythons */
+/* This code is as recommended by: */
+/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+# define PY_SSIZE_T_MAX INT_MAX
+# define PY_SSIZE_T_MIN INT_MIN
+#endif
+
+/* -----------------------------------------------------------------------------
+ * error manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIME PyObject*
+SWIG_Python_ErrorType(int code) {
+  PyObject* type = 0;
+  switch(code) {
+  case SWIG_MemoryError:
+    type = PyExc_MemoryError;
+    break;
+  case SWIG_IOError:
+    type = PyExc_IOError;
+    break;
+  case SWIG_RuntimeError:
+    type = PyExc_RuntimeError;
+    break;
+  case SWIG_IndexError:
+    type = PyExc_IndexError;
+    break;
+  case SWIG_TypeError:
+    type = PyExc_TypeError;
+    break;
+  case SWIG_DivisionByZero:
+    type = PyExc_ZeroDivisionError;
+    break;
+  case SWIG_OverflowError:
+    type = PyExc_OverflowError;
+    break;
+  case SWIG_SyntaxError:
+    type = PyExc_SyntaxError;
+    break;
+  case SWIG_ValueError:
+    type = PyExc_ValueError;
+    break;
+  case SWIG_SystemError:
+    type = PyExc_SystemError;
+    break;
+  case SWIG_AttributeError:
+    type = PyExc_AttributeError;
+    break;
+  default:
+    type = PyExc_RuntimeError;
+  }
+  return type;
+}
+
+
+SWIGRUNTIME void
+SWIG_Python_AddErrorMsg(const char* mesg)
+{
+  PyObject *type = 0;
+  PyObject *value = 0;
+  PyObject *traceback = 0;
+
+  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
+  if (value) {
+    char *tmp;
+    PyObject *old_str = PyObject_Str(value);
+    PyErr_Clear();
+    Py_XINCREF(type);
+
+    PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
+    SWIG_Python_str_DelForPy3(tmp);
+    Py_DECREF(old_str);
+    Py_DECREF(value);
+  } else {
+    PyErr_SetString(PyExc_RuntimeError, mesg);
+  }
+}
+
+#if defined(SWIG_PYTHON_NO_THREADS)
+#  if defined(SWIG_PYTHON_THREADS)
+#    undef SWIG_PYTHON_THREADS
+#  endif
+#endif
+#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
+#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
+#    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
+#      define SWIG_PYTHON_USE_GIL
+#    endif
+#  endif
+#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
+#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
+#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
+#    endif
+#    ifdef __cplusplus /* C++ code */
+       class SWIG_Python_Thread_Block {
+         bool status;
+         PyGILState_STATE state;
+       public:
+         void end() { if (status) { PyGILState_Release(state); status = false;} }
+         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
+         ~SWIG_Python_Thread_Block() { end(); }
+       };
+       class SWIG_Python_Thread_Allow {
+         bool status;
+         PyThreadState *save;
+       public:
+         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
+         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
+         ~SWIG_Python_Thread_Allow() { end(); }
+       };
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
+#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
+#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
+#    else /* C code */
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
+#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
+#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
+#    endif
+#  else /* Old thread way, not implemented, user must provide it */
+#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
+#      define SWIG_PYTHON_INITIALIZE_THREADS
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
+#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
+#      define SWIG_PYTHON_THREAD_END_BLOCK
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
+#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#    endif
+#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
+#      define SWIG_PYTHON_THREAD_END_ALLOW
+#    endif
+#  endif
+#else /* No thread support */
+#  define SWIG_PYTHON_INITIALIZE_THREADS
+#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
+#  define SWIG_PYTHON_THREAD_END_BLOCK
+#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
+#  define SWIG_PYTHON_THREAD_END_ALLOW
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Python API portion that goes into the runtime
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* cc-mode */
+#endif
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Constant declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Constant Types */
+#define SWIG_PY_POINTER 4
+#define SWIG_PY_BINARY  5
+
+/* Constant information structure */
+typedef struct swig_const_info {
+  int type;
+  char *name;
+  long lvalue;
+  double dvalue;
+  void   *pvalue;
+  swig_type_info **ptype;
+} swig_const_info;
+
+
+/* -----------------------------------------------------------------------------
+ * Wrapper of PyInstanceMethod_New() used in Python 3
+ * It is exported to the generated module, used for -fastproxy
+ * ----------------------------------------------------------------------------- */
+SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
+{
+#if PY_VERSION_HEX >= 0x03000000
+  return PyInstanceMethod_New(func);
+#else
+  return NULL;
+#endif
+}
+
+#ifdef __cplusplus
+#if 0
+{ /* cc-mode */
+#endif
+}
+#endif
+
+
+/* -----------------------------------------------------------------------------
+ * See the LICENSE file for information on copyright, usage and redistribution
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
+ *
+ * pyrun.swg
+ *
+ * This file contains the runtime support for Python modules
+ * and includes code for managing global variables and pointer
+ * type checking.
+ *
+ * ----------------------------------------------------------------------------- */
+
+/* Common SWIG API */
+
+/* for raw pointers */
+#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
+#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
+#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
+#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
+#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
+#define swig_owntype                                    int
+
+/* for raw packed data */
+#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+/* for class or struct pointers */
+#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
+#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
+
+/* for C or C++ function pointers */
+#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
+#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
+
+/* for C++ member pointers, ie, member methods */
+#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
+#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
+
+
+/* Runtime API */
+
+#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
+#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
+#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
+
+#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
+#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
+#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
+#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
+#define SWIG_fail                        		goto fail					   
+
+
+/* Runtime API implementation */
+
+/* Error manipulation */
+
+SWIGINTERN void 
+SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
+  PyErr_SetObject(errtype, obj);
+  Py_DECREF(obj);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+SWIGINTERN void 
+SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
+  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
+  PyErr_SetString(errtype, (char *) msg);
+  SWIG_PYTHON_THREAD_END_BLOCK;
+}
+
+#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
+
+/* Set a constant value */
+
+SWIGINTERN void
+SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
+  PyDict_SetItemString(d, (char*) name, obj);
+  Py_DECREF(obj);                            
+}
+
+/* Append a value to the result obj */
+
+SWIGINTERN PyObject*
+SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
+#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyList_Check(result)) {
+      PyObject *o2 = result;
+      result = PyList_New(1);
+      PyList_SetItem(result, 0, o2);
+    }
+    PyList_Append(result,obj);
+    Py_DECREF(obj);
+  }
+  return result;
+#else
+  PyObject*   o2;
+  PyObject*   o3;
+  if (!result) {
+    result = obj;
+  } else if (result == Py_None) {
+    Py_DECREF(result);
+    result = obj;
+  } else {
+    if (!PyTuple_Check(result)) {
+      o2 = result;
+      result = PyTuple_New(1);
+      PyTuple_SET_ITEM(result, 0, o2);
+    }
+    o3 = PyTuple_New(1);
+    PyTuple_SET_ITEM(o3, 0, obj);
+    o2 = result;
+    result = PySequence_Concat(o2, o3);
+    Py_DECREF(o2);
+    Py_DECREF(o3);
+  }
+  return result;
+#endif
+}
+
+/* Unpack the argument tuple */
+
+SWIGINTERN int
+SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
+{
+  if (!args) {
+    if (!min && !max) {
+      return 1;
+    } else {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
+		   name, (min == max ? "" : "at least "), (int)min);
+      return 0;
+    }
+  }  
+  if (!PyTuple_Check(args)) {
+    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
+    return 0;
+  } else {
+    register Py_ssize_t l = PyTuple_GET_SIZE(args);
+    if (l < min) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at least "), (int)min, (int)l);
+      return 0;
+    } else if (l > max) {
+      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
+		   name, (min == max ? "" : "at most "), (int)max, (int)l);
+      return 0;
+    } else {
+      register int i;
+      for (i = 0; i < l; ++i) {
+	objs[i] = PyTuple_GET_ITEM(args, i);
+      }
+      for (; l < max; ++l) {
+	objs[l] = 0;
+      }
+      return i + 1;
+    }    
+  }
+}
+
+/* A functor is a function object with one single object argument */
+#if PY_VERSION_HEX >= 0x02020000
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);
+#else
+#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunction(functor, "O", obj);
+#endif
+
+/*
+  Helper for static pointer initialization for both C and C++ code, for example
+  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
+*/
+#ifdef __cplusplus
+#define SWIG_STATIC_POINTER(var)  var
+#else
+#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
+#endif
+
+/* -----------------------------------------------------------------------------
+ * Pointer declarations
+ * ----------------------------------------------------------------------------- */
+
+/* Flags for new pointer objects */
+#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
+#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
+
+#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* cc-mode */
+#endif
+#endif
+
+/*  How to access Py_None */
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#  ifndef SWIG_PYTHON_NO_BUILD_NONE
+#    ifndef SWIG_PYTHON_BUILD_NONE
+#      define SWIG_PYTHON_BUILD_NONE
+#    endif
+#  endif
+#endif
+
+#ifdef SWIG_PYTHON_BUILD_NONE
+#  ifdef Py_None
+#   undef Py_None
+#   define Py_None SWIG_Py_None()
+#  endif
+SWIGRUNTIMEINLINE PyObject * 
+_SWIG_Py_None(void)
+{
+  PyObject *none = Py_BuildValue((char*)"");
+  Py_DECREF(none);
+  return none;
+}
+SWIGRUNTIME PyObject * 
+SWIG_Py_None(void)
+{
+  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
+  return none;
+}
+#endif
+
+/* The python void return value */
+
+SWIGRUNTIMEINLINE PyObject * 
+SWIG_Py_Void(void)
+{
+  PyObject *none = Py_None;
+  Py_INCREF(none);
+  return none;
+}
+
+/* SwigPyClientData */
+
+typedef struct {
+  PyObject *klass;
+  PyObject *newraw;
+  PyObject *newargs;
+  PyObject *destroy;
+  int delargs;
+  int implicitconv;
+} SwigPyClientData;
+
+SWIGRUNTIMEINLINE int 
+SWIG_Python_CheckImplicit(swig_type_info *ty)
+{
+  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
+  return data ? data->implicitconv : 0;
+}
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_ExceptionType(swig_type_info *desc) {
+  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
+  PyObject *klass = data ? data->klass : 0;
+  return (klass ? klass : PyExc_RuntimeError);
+}
+
+
+SWIGRUNTIME SwigPyClientData * 
+SwigPyClientData_New(PyObject* obj)
+{
+  if (!obj) {
+    return 0;
+  } else {
+    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
+    /* the klass element */
+    data->klass = obj;
+    Py_INCREF(data->klass);
+    /* the newraw method and newargs arguments used to create a new raw instance */
+    if (PyClass_Check(obj)) {
+      data->newraw = 0;
+      data->newargs = obj;
+      Py_INCREF(obj);
+    } else {
+#if (PY_VERSION_HEX < 0x02020000)
+      data->newraw = 0;
+#else
+      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
+#endif
+      if (data->newraw) {
+	Py_INCREF(data->newraw);
+	data->newargs = PyTuple_New(1);
+	PyTuple_SetItem(data->newargs, 0, obj);
+      } else {
+	data->newargs = obj;
+      }
+      Py_INCREF(data->newargs);
+    }
+    /* the destroy method, aka as the C++ delete method */
+    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      data->destroy = 0;
+    }
+    if (data->destroy) {
+      int flags;
+      Py_INCREF(data->destroy);
+      flags = PyCFunction_GET_FLAGS(data->destroy);
+#ifdef METH_O
+      data->delargs = !(flags & (METH_O));
+#else
+      data->delargs = 0;
+#endif
+    } else {
+      data->delargs = 0;
+    }
+    data->implicitconv = 0;
+    return data;
+  }
+}
+
+SWIGRUNTIME void 
+SwigPyClientData_Del(SwigPyClientData* data)
+{
+  Py_XDECREF(data->newraw);
+  Py_XDECREF(data->newargs);
+  Py_XDECREF(data->destroy);
+}
+
+/* =============== SwigPyObject =====================*/
+
+typedef struct {
+  PyObject_HEAD
+  void *ptr;
+  swig_type_info *ty;
+  int own;
+  PyObject *next;
+} SwigPyObject;
+
+SWIGRUNTIME PyObject *
+SwigPyObject_long(SwigPyObject *v)
+{
+  return PyLong_FromVoidPtr(v->ptr);
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_format(const char* fmt, SwigPyObject *v)
+{
+  PyObject *res = NULL;
+  PyObject *args = PyTuple_New(1);
+  if (args) {
+    if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
+      PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
+      if (ofmt) {
+#if PY_VERSION_HEX >= 0x03000000
+	res = PyUnicode_Format(ofmt,args);
+#else
+	res = PyString_Format(ofmt,args);
+#endif
+	Py_DECREF(ofmt);
+      }
+      Py_DECREF(args);
+    }
+  }
+  return res;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_oct(SwigPyObject *v)
+{
+  return SwigPyObject_format("%o",v);
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_hex(SwigPyObject *v)
+{
+  return SwigPyObject_format("%x",v);
+}
+
+SWIGRUNTIME PyObject *
+#ifdef METH_NOARGS
+SwigPyObject_repr(SwigPyObject *v)
+#else
+SwigPyObject_repr(SwigPyObject *v, PyObject *args)
+#endif
+{
+  const char *name = SWIG_TypePrettyName(v->ty);
+  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
+  if (v->next) {
+#ifdef METH_NOARGS
+    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
+#else
+    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
+#endif
+#if PY_VERSION_HEX >= 0x03000000
+    PyObject *joined = PyUnicode_Concat(repr, nrep);
+    Py_DecRef(repr);
+    Py_DecRef(nrep);
+    repr = joined;
+#else
+    PyString_ConcatAndDel(&repr,nrep);
+#endif
+  }
+  return repr;  
+}
+
+SWIGRUNTIME int
+SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+  char *str;
+#ifdef METH_NOARGS
+  PyObject *repr = SwigPyObject_repr(v);
+#else
+  PyObject *repr = SwigPyObject_repr(v, NULL);
+#endif
+  if (repr) {
+    str = SWIG_Python_str_AsChar(repr); 
+    fputs(str, fp);
+    SWIG_Python_str_DelForPy3(str);
+    Py_DECREF(repr);
+    return 0; 
+  } else {
+    return 1; 
+  }
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_str(SwigPyObject *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
+    SWIG_Python_str_FromChar(result) : 0;
+}
+
+SWIGRUNTIME int
+SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
+{
+  void *i = v->ptr;
+  void *j = w->ptr;
+  return (i < j) ? -1 : ((i > j) ? 1 : 0);
+}
+
+/* Added for Python 3.x, would it also be useful for Python 2.x? */
+SWIGRUNTIME PyObject*
+SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
+{
+  PyObject* res;
+  if( op != Py_EQ && op != Py_NE ) {
+    Py_INCREF(Py_NotImplemented);
+    return Py_NotImplemented;
+  }
+  if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
+    res = Py_True;
+  else
+    res = Py_False;
+  Py_INCREF(res);
+  return res;  
+}
+
+
+SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
+
+SWIGRUNTIME PyTypeObject*
+SwigPyObject_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
+  return type;
+}
+
+SWIGRUNTIMEINLINE int
+SwigPyObject_Check(PyObject *op) {
+  return (Py_TYPE(op) == SwigPyObject_type())
+    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
+
+SWIGRUNTIME void
+SwigPyObject_dealloc(PyObject *v)
+{
+  SwigPyObject *sobj = (SwigPyObject *) v;
+  PyObject *next = sobj->next;
+  if (sobj->own == SWIG_POINTER_OWN) {
+    swig_type_info *ty = sobj->ty;
+    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+    PyObject *destroy = data ? data->destroy : 0;
+    if (destroy) {
+      /* destroy is always a VARARGS method */
+      PyObject *res;
+      if (data->delargs) {
+	/* we need to create a temporary object to carry the destroy operation */
+	PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
+	res = SWIG_Python_CallFunctor(destroy, tmp);
+	Py_DECREF(tmp);
+      } else {
+	PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
+	PyObject *mself = PyCFunction_GET_SELF(destroy);
+	res = ((*meth)(mself, v));
+      }
+      Py_XDECREF(res);
+    } 
+#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
+    else {
+      const char *name = SWIG_TypePrettyName(ty);
+      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
+    }
+#endif
+  } 
+  Py_XDECREF(next);
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyObject* 
+SwigPyObject_append(PyObject* v, PyObject* next)
+{
+  SwigPyObject *sobj = (SwigPyObject *) v;
+#ifndef METH_O
+  PyObject *tmp = 0;
+  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
+  next = tmp;
+#endif
+  if (!SwigPyObject_Check(next)) {
+    return NULL;
+  }
+  sobj->next = next;
+  Py_INCREF(next);
+  return SWIG_Py_Void();
+}
+
+SWIGRUNTIME PyObject* 
+#ifdef METH_NOARGS
+SwigPyObject_next(PyObject* v)
+#else
+SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  SwigPyObject *sobj = (SwigPyObject *) v;
+  if (sobj->next) {    
+    Py_INCREF(sobj->next);
+    return sobj->next;
+  } else {
+    return SWIG_Py_Void();
+  }
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+SwigPyObject_disown(PyObject *v)
+#else
+SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  SwigPyObject *sobj = (SwigPyObject *)v;
+  sobj->own = 0;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+#ifdef METH_NOARGS
+SwigPyObject_acquire(PyObject *v)
+#else
+SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+#endif
+{
+  SwigPyObject *sobj = (SwigPyObject *)v;
+  sobj->own = SWIG_POINTER_OWN;
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject*
+SwigPyObject_own(PyObject *v, PyObject *args)
+{
+  PyObject *val = 0;
+#if (PY_VERSION_HEX < 0x02020000)
+  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
+#else
+  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
+#endif
+    {
+      return NULL;
+    } 
+  else
+    {
+      SwigPyObject *sobj = (SwigPyObject *)v;
+      PyObject *obj = PyBool_FromLong(sobj->own);
+      if (val) {
+#ifdef METH_NOARGS
+	if (PyObject_IsTrue(val)) {
+	  SwigPyObject_acquire(v);
+	} else {
+	  SwigPyObject_disown(v);
+	}
+#else
+	if (PyObject_IsTrue(val)) {
+	  SwigPyObject_acquire(v,args);
+	} else {
+	  SwigPyObject_disown(v,args);
+	}
+#endif
+      } 
+      return obj;
+    }
+}
+
+#ifdef METH_O
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#else
+static PyMethodDef
+swigobject_methods[] = {
+  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
+  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
+  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
+  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
+  {0, 0, 0, 0}  
+};
+#endif
+
+#if PY_VERSION_HEX < 0x02020000
+SWIGINTERN PyObject *
+SwigPyObject_getattr(SwigPyObject *sobj,char *name)
+{
+  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
+}
+#endif
+
+SWIGRUNTIME PyTypeObject*
+_PySwigObject_type(void) {
+  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
+  
+  static PyNumberMethods SwigPyObject_as_number = {
+    (binaryfunc)0, /*nb_add*/
+    (binaryfunc)0, /*nb_subtract*/
+    (binaryfunc)0, /*nb_multiply*/
+    /* nb_divide removed in Python 3 */
+#if PY_VERSION_HEX < 0x03000000
+    (binaryfunc)0, /*nb_divide*/
+#endif
+    (binaryfunc)0, /*nb_remainder*/
+    (binaryfunc)0, /*nb_divmod*/
+    (ternaryfunc)0,/*nb_power*/
+    (unaryfunc)0,  /*nb_negative*/
+    (unaryfunc)0,  /*nb_positive*/
+    (unaryfunc)0,  /*nb_absolute*/
+    (inquiry)0,    /*nb_nonzero*/
+    0,		   /*nb_invert*/
+    0,		   /*nb_lshift*/
+    0,		   /*nb_rshift*/
+    0,		   /*nb_and*/
+    0,		   /*nb_xor*/
+    0,		   /*nb_or*/
+#if PY_VERSION_HEX < 0x03000000
+    0,   /*nb_coerce*/
+#endif
+    (unaryfunc)SwigPyObject_long, /*nb_int*/
+#if PY_VERSION_HEX < 0x03000000
+    (unaryfunc)SwigPyObject_long, /*nb_long*/
+#else
+    0, /*nb_reserved*/
+#endif
+    (unaryfunc)0,                 /*nb_float*/
+#if PY_VERSION_HEX < 0x03000000
+    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
+    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
+#endif
+#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
+#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
+#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
+#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
+    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
+#endif
+  };
+
+  static PyTypeObject swigpyobject_type;  
+  static int type_init = 0;
+  if (!type_init) {
+    const PyTypeObject tmp
+      = {
+	/* PyObject header changed in Python 3 */
+#if PY_VERSION_HEX >= 0x03000000
+	PyVarObject_HEAD_INIT(&PyType_Type, 0)
+#else    
+	PyObject_HEAD_INIT(NULL)
+	0,				    /* ob_size */
+#endif
+	(char *)"SwigPyObject",		    /* tp_name */
+	sizeof(SwigPyObject),		    /* tp_basicsize */
+	0,			            /* tp_itemsize */
+	(destructor)SwigPyObject_dealloc,   /* tp_dealloc */
+	(printfunc)SwigPyObject_print,	    /* tp_print */
+#if PY_VERSION_HEX < 0x02020000
+	(getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
+#else
+	(getattrfunc)0,			    /* tp_getattr */ 
+#endif
+	(setattrfunc)0,			    /* tp_setattr */ 
+#if PY_VERSION_HEX >= 0x03000000
+    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
+#else
+	(cmpfunc)SwigPyObject_compare,	    /* tp_compare */
+#endif
+	(reprfunc)SwigPyObject_repr,	    /* tp_repr */    
+	&SwigPyObject_as_number,	    /* tp_as_number */
+	0,				    /* tp_as_sequence */
+	0,				    /* tp_as_mapping */
+	(hashfunc)0,			    /* tp_hash */
+	(ternaryfunc)0,			    /* tp_call */
+	(reprfunc)SwigPyObject_str,	    /* tp_str */
+	PyObject_GenericGetAttr,            /* tp_getattro */
+	0,				    /* tp_setattro */
+	0,		                    /* tp_as_buffer */
+	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
+	swigobject_doc, 	            /* tp_doc */        
+	0,                                  /* tp_traverse */
+	0,                                  /* tp_clear */
+	(richcmpfunc)SwigPyObject_richcompare,           /* tp_richcompare */
+	0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+	0,                                  /* tp_iter */
+	0,                                  /* tp_iternext */
+	swigobject_methods,		    /* tp_methods */ 
+	0,			            /* tp_members */
+	0,				    /* tp_getset */	    	
+	0,			            /* tp_base */	        
+	0,				    /* tp_dict */	    	
+	0,				    /* tp_descr_get */  	
+	0,				    /* tp_descr_set */  	
+	0,				    /* tp_dictoffset */ 	
+	0,				    /* tp_init */	    	
+	0,				    /* tp_alloc */	    	
+	0,			            /* tp_new */	    	
+	0,	                            /* tp_free */	   
+	0,                                  /* tp_is_gc */  
+	0,				    /* tp_bases */   
+	0,				    /* tp_mro */
+	0,				    /* tp_cache */   
+	0,				    /* tp_subclasses */
+	0,				    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+	0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+	0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+    swigpyobject_type = tmp;
+    /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
+#if PY_VERSION_HEX < 0x03000000
+    swigpyobject_type.ob_type = &PyType_Type;
+#endif
+    type_init = 1;
+  }
+  return &swigpyobject_type;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
+{
+  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
+  if (sobj) {
+    sobj->ptr  = ptr;
+    sobj->ty   = ty;
+    sobj->own  = own;
+    sobj->next = 0;
+  }
+  return (PyObject *)sobj;
+}
+
+/* -----------------------------------------------------------------------------
+ * Implements a simple Swig Packed type, and use it instead of string
+ * ----------------------------------------------------------------------------- */
+
+typedef struct {
+  PyObject_HEAD
+  void *pack;
+  swig_type_info *ty;
+  size_t size;
+} SwigPyPacked;
+
+SWIGRUNTIME int
+SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+{
+  char result[SWIG_BUFFER_SIZE];
+  fputs("<Swig Packed ", fp); 
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    fputs("at ", fp); 
+    fputs(result, fp); 
+  }
+  fputs(v->ty->name,fp); 
+  fputs(">", fp);
+  return 0; 
+}
+  
+SWIGRUNTIME PyObject *
+SwigPyPacked_repr(SwigPyPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
+    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
+  } else {
+    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
+  }  
+}
+
+SWIGRUNTIME PyObject *
+SwigPyPacked_str(SwigPyPacked *v)
+{
+  char result[SWIG_BUFFER_SIZE];
+  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
+    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
+  } else {
+    return SWIG_Python_str_FromChar(v->ty->name);
+  }  
+}
+
+SWIGRUNTIME int
+SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
+{
+  size_t i = v->size;
+  size_t j = w->size;
+  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
+  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
+}
+
+SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
+
+SWIGRUNTIME PyTypeObject*
+SwigPyPacked_type(void) {
+  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
+  return type;
+}
+
+SWIGRUNTIMEINLINE int
+SwigPyPacked_Check(PyObject *op) {
+  return ((op)->ob_type == _PySwigPacked_type()) 
+    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
+}
+
+SWIGRUNTIME void
+SwigPyPacked_dealloc(PyObject *v)
+{
+  if (SwigPyPacked_Check(v)) {
+    SwigPyPacked *sobj = (SwigPyPacked *) v;
+    free(sobj->pack);
+  }
+  PyObject_DEL(v);
+}
+
+SWIGRUNTIME PyTypeObject*
+_PySwigPacked_type(void) {
+  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
+  static PyTypeObject swigpypacked_type;
+  static int type_init = 0;  
+  if (!type_init) {
+    const PyTypeObject tmp
+      = {
+    /* PyObject header changed in Python 3 */
+#if PY_VERSION_HEX>=0x03000000
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
+#else
+	PyObject_HEAD_INIT(NULL)
+    0,				    /* ob_size */	
+#endif
+	(char *)"SwigPyPacked",		    /* tp_name */	
+	sizeof(SwigPyPacked),		    /* tp_basicsize */	
+	0,				    /* tp_itemsize */	
+	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */	
+	(printfunc)SwigPyPacked_print,	    /* tp_print */   	
+	(getattrfunc)0,			    /* tp_getattr */ 	
+	(setattrfunc)0,			    /* tp_setattr */ 	
+#if PY_VERSION_HEX>=0x03000000
+    0, /* tp_reserved in 3.0.1 */
+#else
+    (cmpfunc)SwigPyPacked_compare,	    /* tp_compare */
+#endif
+	(reprfunc)SwigPyPacked_repr,	    /* tp_repr */
+	0,	                            /* tp_as_number */
+	0,				    /* tp_as_sequence */
+	0,				    /* tp_as_mapping */
+	(hashfunc)0,			    /* tp_hash */
+	(ternaryfunc)0,			    /* tp_call */
+	(reprfunc)SwigPyPacked_str,	    /* tp_str */
+	PyObject_GenericGetAttr,            /* tp_getattro */
+	0,				    /* tp_setattro */
+	0,		                    /* tp_as_buffer */
+	Py_TPFLAGS_DEFAULT,	            /* tp_flags */
+	swigpacked_doc, 	            /* tp_doc */
+	0,                                  /* tp_traverse */
+	0,                                  /* tp_clear */
+	0,                                  /* tp_richcompare */
+	0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+	0,                                  /* tp_iter */
+	0,                                  /* tp_iternext */
+	0,		                    /* tp_methods */ 
+	0,			            /* tp_members */
+	0,				    /* tp_getset */	    	
+	0,			            /* tp_base */	        
+	0,				    /* tp_dict */	    	
+	0,				    /* tp_descr_get */  	
+	0,				    /* tp_descr_set */  	
+	0,				    /* tp_dictoffset */ 	
+	0,				    /* tp_init */	    	
+	0,				    /* tp_alloc */	    	
+	0,			            /* tp_new */	    	
+	0, 	                            /* tp_free */	   
+        0,                                  /* tp_is_gc */  
+	0,				    /* tp_bases */   
+	0,				    /* tp_mro */
+	0,				    /* tp_cache */   
+ 	0,				    /* tp_subclasses */
+	0,				    /* tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+	0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+	0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+    swigpypacked_type = tmp;
+    /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
+#if PY_VERSION_HEX < 0x03000000
+    swigpypacked_type.ob_type = &PyType_Type;
+#endif
+    type_init = 1;
+  }
+  return &swigpypacked_type;
+}
+
+SWIGRUNTIME PyObject *
+SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
+{
+  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
+  if (sobj) {
+    void *pack = malloc(size);
+    if (pack) {
+      memcpy(pack, ptr, size);
+      sobj->pack = pack;
+      sobj->ty   = ty;
+      sobj->size = size;
+    } else {
+      PyObject_DEL((PyObject *) sobj);
+      sobj = 0;
+    }
+  }
+  return (PyObject *) sobj;
+}
+
+SWIGRUNTIME swig_type_info *
+SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
+{
+  if (SwigPyPacked_Check(obj)) {
+    SwigPyPacked *sobj = (SwigPyPacked *)obj;
+    if (sobj->size != size) return 0;
+    memcpy(ptr, sobj->pack, size);
+    return sobj->ty;
+  } else {
+    return 0;
+  }
+}
+
+/* -----------------------------------------------------------------------------
+ * pointers/data manipulation
+ * ----------------------------------------------------------------------------- */
+
+SWIGRUNTIMEINLINE PyObject *
+_SWIG_This(void)
+{
+    return SWIG_Python_str_FromChar("this");
+}
+
+SWIGRUNTIME PyObject *
+SWIG_This(void)
+{
+  static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
+  return swig_this;
+}
+
+/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
+
+/* TODO: I don't know how to implement the fast getset in Python 3 right now */
+#if PY_VERSION_HEX>=0x03000000
+#define SWIG_PYTHON_SLOW_GETSET_THIS 
+#endif
+
+SWIGRUNTIME SwigPyObject *
+SWIG_Python_GetSwigThis(PyObject *pyobj) 
+{
+  if (SwigPyObject_Check(pyobj)) {
+    return (SwigPyObject *) pyobj;
+  } else {
+    PyObject *obj = 0;
+#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
+    if (PyInstance_Check(pyobj)) {
+      obj = _PyInstance_Lookup(pyobj, SWIG_This());      
+    } else {
+      PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
+      if (dictptr != NULL) {
+	PyObject *dict = *dictptr;
+	obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
+      } else {
+#ifdef PyWeakref_CheckProxy
+	if (PyWeakref_CheckProxy(pyobj)) {
+	  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
+	  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
+	}
+#endif
+	obj = PyObject_GetAttr(pyobj,SWIG_This());
+	if (obj) {
+	  Py_DECREF(obj);
+	} else {
+	  if (PyErr_Occurred()) PyErr_Clear();
+	  return 0;
+	}
+      }
+    }
+#else
+    obj = PyObject_GetAttr(pyobj,SWIG_This());
+    if (obj) {
+      Py_DECREF(obj);
+    } else {
+      if (PyErr_Occurred()) PyErr_Clear();
+      return 0;
+    }
+#endif
+    if (obj && !SwigPyObject_Check(obj)) {
+      /* a PyObject is called 'this', try to get the 'real this'
+	 SwigPyObject from it */ 
+      return SWIG_Python_GetSwigThis(obj);
+    }
+    return (SwigPyObject *)obj;
+  }
+}
+
+/* Acquire a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_AcquirePtr(PyObject *obj, int own) {
+  if (own == SWIG_POINTER_OWN) {
+    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
+    if (sobj) {
+      int oldown = sobj->own;
+      sobj->own = own;
+      return oldown;
+    }
+  }
+  return 0;
+}
+
+/* Convert a pointer value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
+  if (!obj) return SWIG_ERROR;
+  if (obj == Py_None) {
+    if (ptr) *ptr = 0;
+    return SWIG_OK;
+  } else {
+    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
+    if (own)
+      *own = 0;
+    while (sobj) {
+      void *vptr = sobj->ptr;
+      if (ty) {
+	swig_type_info *to = sobj->ty;
+	if (to == ty) {
+	  /* no type cast needed */
+	  if (ptr) *ptr = vptr;
+	  break;
+	} else {
+	  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+	  if (!tc) {
+	    sobj = (SwigPyObject *)sobj->next;
+	  } else {
+	    if (ptr) {
+              int newmemory = 0;
+              *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+              if (newmemory == SWIG_CAST_NEW_MEMORY) {
+                assert(own);
+                if (own)
+                  *own = *own | SWIG_CAST_NEW_MEMORY;
+              }
+            }
+	    break;
+	  }
+	}
+      } else {
+	if (ptr) *ptr = vptr;
+	break;
+      }
+    }
+    if (sobj) {
+      if (own)
+        *own = *own | sobj->own;
+      if (flags & SWIG_POINTER_DISOWN) {
+	sobj->own = 0;
+      }
+      return SWIG_OK;
+    } else {
+      int res = SWIG_ERROR;
+      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
+	SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
+	if (data && !data->implicitconv) {
+	  PyObject *klass = data->klass;
+	  if (klass) {
+	    PyObject *impconv;
+	    data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
+	    impconv = SWIG_Python_CallFunctor(klass, obj);
+	    data->implicitconv = 0;
+	    if (PyErr_Occurred()) {
+	      PyErr_Clear();
+	      impconv = 0;
+	    }
+	    if (impconv) {
+	      SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
+	      if (iobj) {
+		void *vptr;
+		res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
+		if (SWIG_IsOK(res)) {
+		  if (ptr) {
+		    *ptr = vptr;
+		    /* transfer the ownership to 'ptr' */
+		    iobj->own = 0;
+		    res = SWIG_AddCast(res);
+		    res = SWIG_AddNewMask(res);
+		  } else {
+		    res = SWIG_AddCast(res);		    
+		  }
+		}
+	      }
+	      Py_DECREF(impconv);
+	    }
+	  }
+	}
+      }
+      return res;
+    }
+  }
+}
+
+/* Convert a function ptr value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
+  if (!PyCFunction_Check(obj)) {
+    return SWIG_ConvertPtr(obj, ptr, ty, 0);
+  } else {
+    void *vptr = 0;
+    
+    /* here we get the method pointer for callbacks */
+    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
+    if (desc)
+      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
+    if (!desc) 
+      return SWIG_ERROR;
+    if (ty) {
+      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
+      if (tc) {
+        int newmemory = 0;
+        *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+        assert(!newmemory); /* newmemory handling not yet implemented */
+      } else {
+        return SWIG_ERROR;
+      }
+    } else {
+      *ptr = vptr;
+    }
+    return SWIG_OK;
+  }
+}
+
+/* Convert a packed value value */
+
+SWIGRUNTIME int
+SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
+  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
+  if (!to) return SWIG_ERROR;
+  if (ty) {
+    if (to != ty) {
+      /* check type cast? */
+      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
+      if (!tc) return SWIG_ERROR;
+    }
+  }
+  return SWIG_OK;
+}  
+
+/* -----------------------------------------------------------------------------
+ * Create a new pointer object
+ * ----------------------------------------------------------------------------- */
+
+/*
+  Create a new instance object, without calling __init__, and set the
+  'this' attribute.
+*/
+
+SWIGRUNTIME PyObject* 
+SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
+{
+#if (PY_VERSION_HEX >= 0x02020000)
+  PyObject *inst = 0;
+  PyObject *newraw = data->newraw;
+  if (newraw) {
+    inst = PyObject_Call(newraw, data->newargs, NULL);
+    if (inst) {
+#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+      PyObject **dictptr = _PyObject_GetDictPtr(inst);
+      if (dictptr != NULL) {
+	PyObject *dict = *dictptr;
+	if (dict == NULL) {
+	  dict = PyDict_New();
+	  *dictptr = dict;
+	  PyDict_SetItem(dict, SWIG_This(), swig_this);
+	}
+      }
+#else
+      PyObject *key = SWIG_This();
+      PyObject_SetAttr(inst, key, swig_this);
+#endif
+    }
+  } else {
+#if PY_VERSION_HEX >= 0x03000000
+    inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
+    PyObject_SetAttr(inst, SWIG_This(), swig_this);
+    Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
+#else
+    PyObject *dict = PyDict_New();
+    PyDict_SetItem(dict, SWIG_This(), swig_this);
+    inst = PyInstance_NewRaw(data->newargs, dict);
+    Py_DECREF(dict);
+#endif
+  }
+  return inst;
+#else
+#if (PY_VERSION_HEX >= 0x02010000)
+  PyObject *inst;
+  PyObject *dict = PyDict_New();
+  PyDict_SetItem(dict, SWIG_This(), swig_this);
+  inst = PyInstance_NewRaw(data->newargs, dict);
+  Py_DECREF(dict);
+  return (PyObject *) inst;
+#else
+  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
+  if (inst == NULL) {
+    return NULL;
+  }
+  inst->in_class = (PyClassObject *)data->newargs;
+  Py_INCREF(inst->in_class);
+  inst->in_dict = PyDict_New();
+  if (inst->in_dict == NULL) {
+    Py_DECREF(inst);
+    return NULL;
+  }
+#ifdef Py_TPFLAGS_HAVE_WEAKREFS
+  inst->in_weakreflist = NULL;
+#endif
+#ifdef Py_TPFLAGS_GC
+  PyObject_GC_Init(inst);
+#endif
+  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
+  return (PyObject *) inst;
+#endif
+#endif
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
+{
+ PyObject *dict;
+#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
+ PyObject **dictptr = _PyObject_GetDictPtr(inst);
+ if (dictptr != NULL) {
+   dict = *dictptr;
+   if (dict == NULL) {
+     dict = PyDict_New();
+     *dictptr = dict;
+   }
+   PyDict_SetItem(dict, SWIG_This(), swig_this);
+   return;
+ }
+#endif
+ dict = PyObject_GetAttrString(inst, (char*)"__dict__");
+ PyDict_SetItem(dict, SWIG_This(), swig_this);
+ Py_DECREF(dict);
+} 
+
+
+SWIGINTERN PyObject *
+SWIG_Python_InitShadowInstance(PyObject *args) {
+  PyObject *obj[2];
+  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
+    return NULL;
+  } else {
+    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
+    if (sthis) {
+      SwigPyObject_append((PyObject*) sthis, obj[1]);
+    } else {
+      SWIG_Python_SetSwigThis(obj[0], obj[1]);
+    }
+    return SWIG_Py_Void();
+  }
+}
+
+/* Create a new pointer object */
+
+SWIGRUNTIME PyObject *
+SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
+  if (!ptr) {
+    return SWIG_Py_Void();
+  } else {
+    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
+    PyObject *robj = SwigPyObject_New(ptr, type, own);
+    SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
+    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
+      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
+      if (inst) {
+	Py_DECREF(robj);
+	robj = inst;
+      }
+    }
+    return robj;
+  }
+}
+
+/* Create a new packed object */
+
+SWIGRUNTIMEINLINE PyObject *
+SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
+  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
+}
+
+/* -----------------------------------------------------------------------------*
+ *  Get type list 
+ * -----------------------------------------------------------------------------*/
+
+#ifdef SWIG_LINK_RUNTIME
+void *SWIG_ReturnGlobalTypeList(void *);
+#endif
+
+SWIGRUNTIME swig_module_info *
+SWIG_Python_GetModule(void) {
+  static void *type_pointer = (void *)0;
+  /* first check if module already created */
+  if (!type_pointer) {
+#ifdef SWIG_LINK_RUNTIME
+    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
+#else
+    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
+    if (PyErr_Occurred()) {
+      PyErr_Clear();
+      type_pointer = (void *)0;
+    }
+#endif
+  }
+  return (swig_module_info *) type_pointer;
+}
+
+#if PY_MAJOR_VERSION < 2
+/* PyModule_AddObject function was introduced in Python 2.0.  The following function
+   is copied out of Python/modsupport.c in python version 2.3.4 */
+SWIGINTERN int
+PyModule_AddObject(PyObject *m, char *name, PyObject *o)
+{
+  PyObject *dict;
+  if (!PyModule_Check(m)) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs module as first arg");
+    return SWIG_ERROR;
+  }
+  if (!o) {
+    PyErr_SetString(PyExc_TypeError,
+		    "PyModule_AddObject() needs non-NULL value");
+    return SWIG_ERROR;
+  }
+  
+  dict = PyModule_GetDict(m);
+  if (dict == NULL) {
+    /* Internal error -- modules must have a dict! */
+    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
+		 PyModule_GetName(m));
+    return SWIG_ERROR;
+  }
+  if (PyDict_SetItemString(dict, name, o))
+    return SWIG_ERROR;
+  Py_DECREF(o);
+  return SWIG_OK;
+}
+#endif
+
+SWIGRUNTIME void
+SWIG_Python_DestroyModule(void *vptr)
+{
+  swig_module_info *swig_module = (swig_module_info *) vptr;
+  swig_type_info **types = swig_module->types;
+  size_t i;
+  for (i =0; i < swig_module->size; ++i) {
+    swig_type_info *ty = types[i];
+    if (ty->owndata) {
+      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
+      if (data) SwigPyClientData_Del(data);
+    }
+  }
+  Py_DECREF(SWIG_This());
+}
+
+SWIGRUNTIME void
+SWIG_Python_SetModule(swig_module_info *swig_module) {
+  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
+
+#if PY_VERSION_HEX >= 0x03000000
+ /* Add a dummy module object into sys.modules */
+  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
+#else
+  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
+				   swig_empty_runtime_method_table);
+#endif
+  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
+  if (pointer && module) {
+    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
+  } else {
+    Py_XDECREF(pointer);
+  }
+}
+
+/* The python cached type query */
+SWIGRUNTIME PyObject *
+SWIG_Python_TypeCache(void) {
+  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
+  return cache;
+}
+
+SWIGRUNTIME swig_type_info *
+SWIG_Python_TypeQuery(const char *type)
+{
+  PyObject *cache = SWIG_Python_TypeCache();
+  PyObject *key = SWIG_Python_str_FromChar(type); 
+  PyObject *obj = PyDict_GetItem(cache, key);
+  swig_type_info *descriptor;
+  if (obj) {
+    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
+  } else {
+    swig_module_info *swig_module = SWIG_Python_GetModule();
+    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
+    if (descriptor) {
+      obj = PyCObject_FromVoidPtr(descriptor, NULL);
+      PyDict_SetItem(cache, key, obj);
+      Py_DECREF(obj);
+    }
+  }
+  Py_DECREF(key);
+  return descriptor;
+}
+
+/* 
+   For backward compatibility only
+*/
+#define SWIG_POINTER_EXCEPTION  0
+#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
+#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
+
+SWIGRUNTIME int
+SWIG_Python_AddErrMesg(const char* mesg, int infront)
+{  
+  if (PyErr_Occurred()) {
+    PyObject *type = 0;
+    PyObject *value = 0;
+    PyObject *traceback = 0;
+    PyErr_Fetch(&type, &value, &traceback);
+    if (value) {
+      char *tmp;
+      PyObject *old_str = PyObject_Str(value);
+      Py_XINCREF(type);
+      PyErr_Clear();
+      if (infront) {
+	PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
+      } else {
+	PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
+      }
+      SWIG_Python_str_DelForPy3(tmp);
+      Py_DECREF(old_str);
+    }
+    return 1;
+  } else {
+    return 0;
+  }
+}
+  
+SWIGRUNTIME int
+SWIG_Python_ArgFail(int argnum)
+{
+  if (PyErr_Occurred()) {
+    /* add information about failing argument */
+    char mesg[256];
+    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
+    return SWIG_Python_AddErrMesg(mesg, 1);
+  } else {
+    return 0;
+  }
+}
+
+SWIGRUNTIMEINLINE const char *
+SwigPyObject_GetDesc(PyObject *self)
+{
+  SwigPyObject *v = (SwigPyObject *)self;
+  swig_type_info *ty = v ? v->ty : 0;
+  return ty ? ty->str : (char*)"";
+}
+
+SWIGRUNTIME void
+SWIG_Python_TypeError(const char *type, PyObject *obj)
+{
+  if (type) {
+#if defined(SWIG_COBJECT_TYPES)
+    if (obj && SwigPyObject_Check(obj)) {
+      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
+      if (otype) {
+	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
+		     type, otype);
+	return;
+      }
+    } else 
+#endif      
+    {
+      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
+      if (otype) {
+	PyObject *str = PyObject_Str(obj);
+	const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
+	if (cstr) {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
+		       type, otype, cstr);
+          SWIG_Python_str_DelForPy3(cstr);
+	} else {
+	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
+		       type, otype);
+	}
+	Py_XDECREF(str);
+	return;
+      }
+    }   
+    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
+  } else {
+    PyErr_Format(PyExc_TypeError, "unexpected type is received");
+  }
+}
+
+
+/* Convert a pointer value, signal an exception on a type mismatch */
+SWIGRUNTIME void *
+SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
+  void *result;
+  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
+    PyErr_Clear();
+#if SWIG_POINTER_EXCEPTION
+    if (flags) {
+      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
+      SWIG_Python_ArgFail(argnum);
+    }
+#endif
+  }
+  return result;
+}
+
+
+#ifdef __cplusplus
+#if 0
+{ /* cc-mode */
+#endif
+}
+#endif
+
+
+
+#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
+
+#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
+
+
+
+/* -------- TYPES TABLE (BEGIN) -------- */
+
+#define SWIGTYPE_p_attrl swig_types[0]
+#define SWIGTYPE_p_attropl swig_types[1]
+#define SWIGTYPE_p_batch_status swig_types[2]
+#define SWIGTYPE_p_char swig_types[3]
+#define SWIGTYPE_p_int swig_types[4]
+#define SWIGTYPE_p_long swig_types[5]
+#define SWIGTYPE_p_p_char swig_types[6]
+static swig_type_info *swig_types[8];
+static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
+#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
+#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
+
+/* -------- TYPES TABLE (END) -------- */
+
+#if (PY_VERSION_HEX <= 0x02000000)
+# if !defined(SWIG_PYTHON_CLASSIC)
+#  error "This python version requires swig to be run with the '-classic' option"
+# endif
+#endif
+
+/*-----------------------------------------------
+              @(target):= _pbs.so
+  ------------------------------------------------*/
+#if PY_VERSION_HEX >= 0x03000000
+#  define SWIG_init    PyInit__pbs
+
+#else
+#  define SWIG_init    init_pbs
+
+#endif
+#define SWIG_name    "_pbs"
+
+#define SWIGVERSION 0x010340 
+#define SWIG_VERSION SWIGVERSION
+
+
+#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
+#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 
+
+
+
+#include "pbs_ifl.h"
+#include "pbs_error.h"
+#include "rm.h"
+#include "log.h"
+
+#define SARA_DEBUG 0
+
+//extern int pbs_errno;
+
+
+
+int Get_List_Size(PyObject *src)
+{
+  if (PyList_Check(src))
+    return(PyList_Size(src));
+
+  /* check if valid NULL pointer */
+  if ( PyString_Check(src) ) {
+    if ( ! strcmp(PyString_AsString(src), "NULL") )
+      return(0);
+  }
+  return(-1);
+
+} // end Get_List_Size()
+
+
+
+
+// The default constructor for struct attrl
+//
+struct attrl *new_attrl(int number)
+{
+  struct attrl *ptr;
+  struct attrl *prev, *current;
+  int i;
+
+  /* 
+    allocate memory as a one block is handy for Python scripts 
+    and fill in the next fields so it also works for the C-library
+  */
+  ptr = (struct attrl *) malloc(number * sizeof(struct attrl));
+
+  prev = NULL;
+  current = ptr + (number - 1);
+  for (i=0; i < number; i++)
+  { 
+    // printf("constructor called\n");
+    current->name     = (char *) malloc(MAXNAMLEN * sizeof(char));
+    current->resource = (char *) malloc(MAXNAMLEN * sizeof(char));
+    current->value    = (char *) malloc(MAXNAMLEN * sizeof(char));
+
+    bzero( (void*) current->name, sizeof(current->name));
+    bzero( (void*) current->resource, sizeof(current->resource));
+    bzero( (void*) current->value, sizeof(current->value));
+
+    current->next     = prev;
+    prev = current;
+    current--;
+  }
+  return (struct attrl *)ptr;
+
+} // end new_attrl()
+
+
+
+// The default constructor for struct attropl
+//
+struct attropl *new_attropl(int number)
+{
+  struct attropl *ptr;
+  struct attropl *prev, *current;
+  int i;
+
+  /* 
+    allocate memory as a one block is handy for Python scripts 
+    and fill in the next fields so it also works for the C-library
+  */
+  ptr = (struct attropl *) malloc(number * sizeof(struct attropl));
+
+  prev = NULL;
+  current = ptr + (number - 1);
+  for (i=0; i < number; i++)
+  { 
+    // printf("constructor called\n");
+    current->name     = (char *) malloc(MAXNAMLEN * sizeof(char));
+    current->resource = (char *) malloc(MAXNAMLEN * sizeof(char));
+    current->value    = (char *) malloc(MAXNAMLEN * sizeof(char));
+
+    bzero( (void*) current->name, sizeof(current->name));
+    bzero( (void*) current->resource, sizeof(current->resource));
+    bzero( (void*) current->value, sizeof(current->value));
+    current->op = 0;
+
+    current->next     = prev;
+    prev = current;
+    current--;
+  }
+  return (struct attropl *)ptr;
+
+} // end new_attropl()
+
+/* Not used only returned */
+struct batch_status *new_batch_status()
+{
+   struct batch_status *ptr;
+
+   ptr = (struct batch_status *) malloc(sizeof(struct batch_status));
+   return (struct batch_status *)ptr;
+} // end new struct batch_status
+
+int get_error()
+{
+   char *errmsg;
+
+   errmsg = pbse_to_txt(pbs_errno);
+   if (SARA_DEBUG)
+   {
+      printf("Bas = %d\n", pbs_errno);
+      printf("Bas = %d, text = %s\n", pbs_errno, errmsg);
+   }
+   return (pbs_errno);
+}
+
+
+
+
+#include <limits.h>
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+#   define LLONG_MAX __LONG_LONG_MAX__
+#   define LLONG_MIN (-LLONG_MAX - 1LL)
+#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
+#endif
+
+
+SWIGINTERN int
+SWIG_AsVal_double (PyObject *obj, double *val)
+{
+  int res = SWIG_TypeError;
+  if (PyFloat_Check(obj)) {
+    if (val) *val = PyFloat_AsDouble(obj);
+    return SWIG_OK;
+  } else if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    double v = PyLong_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    double d = PyFloat_AsDouble(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = d;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      long v = PyLong_AsLong(obj);
+      if (!PyErr_Occurred()) {
+	if (val) *val = v;
+	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
+      } else {
+	PyErr_Clear();
+      }
+    }
+  }
+#endif
+  return res;
+}
+
+
+#include <float.h>
+
+
+#include <math.h>
+
+
+SWIGINTERNINLINE int
+SWIG_CanCastAsInteger(double *d, double min, double max) {
+  double x = *d;
+  if ((min <= x && x <= max)) {
+   double fx = floor(x);
+   double cx = ceil(x);
+   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
+   if ((errno == EDOM) || (errno == ERANGE)) {
+     errno = 0;
+   } else {
+     double summ, reps, diff;
+     if (rd < x) {
+       diff = x - rd;
+     } else if (rd > x) {
+       diff = rd - x;
+     } else {
+       return 1;
+     }
+     summ = rd + x;
+     reps = diff/summ;
+     if (reps < 8*DBL_EPSILON) {
+       *d = rd;
+       return 1;
+     }
+   }
+  }
+  return 0;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_long (PyObject *obj, long* val)
+{
+  if (PyInt_Check(obj)) {
+    if (val) *val = PyInt_AsLong(obj);
+    return SWIG_OK;
+  } else if (PyLong_Check(obj)) {
+    long v = PyLong_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    long v = PyInt_AsLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
+	if (val) *val = (long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_int (PyObject * obj, int *val)
+{
+  long v;
+  int res = SWIG_AsVal_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v < INT_MIN || v > INT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (int)(v);
+    }
+  }  
+  return res;
+}
+
+
+  #define SWIG_From_long   PyInt_FromLong 
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_int  (int value)
+{    
+  return SWIG_From_long  (value);
+}
+
+
+SWIGINTERN swig_type_info*
+SWIG_pchar_descriptor(void)
+{
+  static int init = 0;
+  static swig_type_info* info = 0;
+  if (!init) {
+    info = SWIG_TypeQuery("_p_char");
+    init = 1;
+  }
+  return info;
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_FromCharPtrAndSize(const char* carray, size_t size)
+{
+  if (carray) {
+    if (size > INT_MAX) {
+      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+      return pchar_descriptor ? 
+	SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
+    } else {
+#if PY_VERSION_HEX >= 0x03000000
+      return PyUnicode_FromStringAndSize(carray, (int)(size));
+#else
+      return PyString_FromStringAndSize(carray, (int)(size));
+#endif
+    }
+  } else {
+    return SWIG_Py_Void();
+  }
+}
+
+
+SWIGINTERNINLINE PyObject * 
+SWIG_FromCharPtr(const char *cptr)
+{ 
+  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
+}
+
+
+SWIGINTERN int
+SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
+{
+#if PY_VERSION_HEX>=0x03000000
+  if (PyUnicode_Check(obj))
+#else  
+  if (PyString_Check(obj))
+#endif
+  {
+    char *cstr; Py_ssize_t len;
+#if PY_VERSION_HEX>=0x03000000
+    if (!alloc && cptr) {
+        /* We can't allow converting without allocation, since the internal
+           representation of string in Python 3 is UCS-2/UCS-4 but we require
+           a UTF-8 representation.
+           TODO(bhy) More detailed explanation */
+        return SWIG_RuntimeError;
+    }
+    obj = PyUnicode_AsUTF8String(obj);
+    PyBytes_AsStringAndSize(obj, &cstr, &len);
+    if(alloc) *alloc = SWIG_NEWOBJ;
+#else
+    PyString_AsStringAndSize(obj, &cstr, &len);
+#endif
+    if (cptr) {
+      if (alloc) {
+	/* 
+	   In python the user should not be able to modify the inner
+	   string representation. To warranty that, if you define
+	   SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
+	   buffer is always returned.
+
+	   The default behavior is just to return the pointer value,
+	   so, be careful.
+	*/ 
+#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
+	if (*alloc != SWIG_OLDOBJ) 
+#else
+	if (*alloc == SWIG_NEWOBJ) 
+#endif
+	  {
+	    *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
+	    *alloc = SWIG_NEWOBJ;
+	  }
+	else {
+	  *cptr = cstr;
+	  *alloc = SWIG_OLDOBJ;
+	}
+      } else {
+        #if PY_VERSION_HEX>=0x03000000
+        assert(0); /* Should never reach here in Python 3 */
+        #endif
+	*cptr = SWIG_Python_str_AsChar(obj);
+      }
+    }
+    if (psize) *psize = len + 1;
+#if PY_VERSION_HEX>=0x03000000
+    Py_XDECREF(obj);
+#endif
+    return SWIG_OK;
+  } else {
+    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
+    if (pchar_descriptor) {
+      void* vptr = 0;
+      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
+	if (cptr) *cptr = (char *) vptr;
+	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
+	if (alloc) *alloc = SWIG_OLDOBJ;
+	return SWIG_OK;
+      }
+    }
+  }
+  return SWIG_TypeError;
+}
+
+
+
+
+SWIGINTERN char *attrl___str__(struct attrl *self){
+    static char temp[4 * 255] ;
+    snprintf(temp, sizeof(temp), "(%s,%s,%s)", 
+      self->name, self->resource, self->value);
+    
+    return &temp[0];
+  }
+SWIGINTERN void delete_attrl(struct attrl *self){
+    if (SARA_DEBUG)
+       printf("Bas free attrl\n");
+
+    /*
+  	free(self);
+    */
+  }
+SWIGINTERN char *attropl___str__(struct attropl *self){
+    static char temp[4 * 255] ;
+    snprintf(temp, sizeof(temp), "(%s,%s,%s)", 
+      self->name, self->resource, self->value);
+    
+    return &temp[0];
+  }
+SWIGINTERN void delete_attropl(struct attropl *self){
+    if (SARA_DEBUG)
+       printf("Bas free attropl\n");
+
+    /*
+  	free(self);
+    */
+  }
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
+{
+  if (PyInt_Check(obj)) {
+    long v = PyInt_AsLong(obj);
+    if (v >= 0) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      return SWIG_OverflowError;
+    }
+  } else if (PyLong_Check(obj)) {
+    unsigned long v = PyLong_AsUnsignedLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    int dispatch = 0;
+    unsigned long v = PyLong_AsUnsignedLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_AddCast(SWIG_OK);
+    } else {
+      PyErr_Clear();
+    }
+    if (!dispatch) {
+      double d;
+      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
+      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
+	if (val) *val = (unsigned long)(d);
+	return res;
+      }
+    }
+  }
+#endif
+  return SWIG_TypeError;
+}
+
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
+{
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
+  if (SWIG_IsOK(res)) {
+    if ((v > UINT_MAX)) {
+      return SWIG_OverflowError;
+    } else {
+      if (val) *val = (unsigned int)(v);
+    }
+  }  
+  return res;
+}
+
+
+SWIGINTERN int
+SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
+{ 
+  char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
+  int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
+  if (SWIG_IsOK(res)) {
+    if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize;
+    if (csize <= size) {
+      if (val) {
+	if (csize) memcpy(val, cptr, csize*sizeof(char));
+	if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
+      }
+      if (alloc == SWIG_NEWOBJ) {
+	free((char*)cptr);
+	res = SWIG_DelNewMask(res);
+      }      
+      return res;
+    }
+    if (alloc == SWIG_NEWOBJ) free((char*)cptr);
+  }
+  return SWIG_TypeError;
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+SWIGINTERN PyObject *_wrap_new_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attrl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:new_attrl",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attrl" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (struct attrl *)new_attrl(arg1);
+  {
+    PyObject      *obj_batch;
+    struct attrl  *ptr;
+    int           i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attropl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:new_attropl",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_attropl" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (struct attropl *)new_attropl(arg1);
+  {
+    PyObject          *obj_batch;
+    struct attropl    *ptr;
+    int               i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Converteren c (struct attropl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); 
+      PyList_SetItem(resultobj, i, obj_batch); 
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_batch_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":new_batch_status")) SWIG_fail;
+  result = (struct batch_status *)new_batch_status();
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_get_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":get_error")) SWIG_fail;
+  result = (int)get_error();
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  struct attrl *arg2 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_next_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_next_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_next_set" "', argument " "2"" of type '" "struct attrl *""'"); 
+  }
+  arg2 = (struct attrl *)(argp2);
+  if (arg1) (arg1)->next = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attrl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_next_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_next_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (struct attrl *) ((arg1)->next);
+  {
+    PyObject      *obj_batch;
+    struct attrl  *ptr;
+    int           i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_name_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_name_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->name) free((char*)arg1->name);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->name = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_name_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_name_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (char *) ((arg1)->name);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_resource_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_resource_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->resource) free((char*)arg1->resource);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->resource = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->resource = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_resource_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_resource_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (char *) ((arg1)->resource);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_value_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attrl_value_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->value) free((char*)arg1->value);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->value = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->value = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_value_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_value_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (char *) ((arg1)->value);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  enum batch_op arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attrl_op_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_set" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attrl_op_set" "', argument " "2"" of type '" "enum batch_op""'");
+  } 
+  arg2 = (enum batch_op)(val2);
+  if (arg1) (arg1)->op = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  enum batch_op result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl_op_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl_op_get" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (enum batch_op) ((arg1)->op);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attrl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attrl___str__",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attrl___str__" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  result = (char *)attrl___str__(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_delete_attrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attrl *arg1 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:delete_attrl",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attrl" "', argument " "1"" of type '" "struct attrl *""'"); 
+  }
+  arg1 = (struct attrl *)(argp1);
+  delete_attrl(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *attrl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p_attrl, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject *_wrap_attropl_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  struct attropl *arg2 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_next_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_next_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_next_set" "', argument " "2"" of type '" "struct attropl *""'"); 
+  }
+  arg2 = (struct attropl *)(argp2);
+  if (arg1) (arg1)->next = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attropl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_next_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_next_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (struct attropl *) ((arg1)->next);
+  {
+    PyObject          *obj_batch;
+    struct attropl    *ptr;
+    int               i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Converteren c (struct attropl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attropl,1); 
+      PyList_SetItem(resultobj, i, obj_batch); 
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_name_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_name_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->name) free((char*)arg1->name);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->name = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_name_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_name_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (char *) ((arg1)->name);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_resource_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_resource_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_resource_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->resource) free((char*)arg1->resource);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->resource = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->resource = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_resource_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_resource_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_resource_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (char *) ((arg1)->resource);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_value_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "attropl_value_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->value) free((char*)arg1->value);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->value = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->value = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_value_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_value_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (char *) ((arg1)->value);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_op_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  enum batch_op arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:attropl_op_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_set" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "attropl_op_set" "', argument " "2"" of type '" "enum batch_op""'");
+  } 
+  arg2 = (enum batch_op)(val2);
+  if (arg1) (arg1)->op = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl_op_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  enum batch_op result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl_op_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl_op_get" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (enum batch_op) ((arg1)->op);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_attropl___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:attropl___str__",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "attropl___str__" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  result = (char *)attropl___str__(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_delete_attropl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct attropl *arg1 = (struct attropl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:delete_attropl",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_attropl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_attropl" "', argument " "1"" of type '" "struct attropl *""'"); 
+  }
+  arg1 = (struct attropl *)(argp1);
+  delete_attropl(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *attropl_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p_attropl, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN PyObject *_wrap_batch_status_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  struct batch_status *arg2 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_next_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_next_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_batch_status, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_next_set" "', argument " "2"" of type '" "struct batch_status *""'"); 
+  }
+  arg2 = (struct batch_status *)(argp2);
+  if (arg1) (arg1)->next = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_next_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_next_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  result = (struct batch_status *) ((arg1)->next);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_name_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_name_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->name) free((char*)arg1->name);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->name = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_name_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_name_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  result = (char *) ((arg1)->name);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_attribs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  struct attrl *arg2 = (struct attrl *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_attribs_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attrl, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_attribs_set" "', argument " "2"" of type '" "struct attrl *""'"); 
+  }
+  arg2 = (struct attrl *)(argp2);
+  if (arg1) (arg1)->attribs = arg2;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_attribs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  struct attrl *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_attribs_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_attribs_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  result = (struct attrl *) ((arg1)->attribs);
+  {
+    PyObject      *obj_batch;
+    struct attrl  *ptr;
+    int           i=0, len=0;
+    
+    if (SARA_DEBUG) printf("Converteren c (struct attrl *) -> python:\n");
+    
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_attrl,1); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      ptr = ptr->next;
+    }
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_text_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:batch_status_text_set",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_set" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "batch_status_text_set" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  if (arg1->text) free((char*)arg1->text);
+  if (arg2) {
+    size_t size = strlen((const char *)(arg2)) + 1;
+    arg1->text = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+  } else {
+    arg1->text = 0;
+  }
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_batch_status_text_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:batch_status_text_get",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "batch_status_text_get" "', argument " "1"" of type '" "struct batch_status *""'"); 
+  }
+  arg1 = (struct batch_status *)(argp1);
+  result = (char *) ((arg1)->text);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *batch_status_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *obj;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  SWIG_TypeNewClientData(SWIGTYPE_p_batch_status, SWIG_NewClientData(obj));
+  return SWIG_Py_Void();
+}
+
+SWIGINTERN int Swig_var_pbs_errno_set(PyObject *_val) {
+  {
+    int val;
+    int res = SWIG_AsVal_int(_val, &val);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_errno""' of type '""int""'");
+    }
+    pbs_errno = (int)(val);
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_pbs_errno_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_From_int((int)(pbs_errno));
+  return pyobj;
+}
+
+
+SWIGINTERN int Swig_var_pbs_server_set(PyObject *_val) {
+  {
+    char *cptr = 0; size_t csize = 0; int alloc = SWIG_NEWOBJ;
+    int res = SWIG_AsCharPtrAndSize(_val, &cptr, &csize, &alloc);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_server""' of type '""char *""'");
+    }
+    if (pbs_server) free((char*)pbs_server);
+    if (alloc == SWIG_NEWOBJ) {
+      pbs_server = cptr;
+    } else {
+      pbs_server = csize ? (char *)(char *)memcpy((char *)malloc((csize)*sizeof(char)), cptr, sizeof(char)*(csize)) : 0;
+    }
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_pbs_server_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_FromCharPtr(pbs_server);
+  return pyobj;
+}
+
+
+SWIGINTERN PyObject *_wrap_avail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:avail",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "avail" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avail" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  result = (char *)avail(arg1,arg2);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_asyrunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_asyrunjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_asyrunjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_asyrunjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_asyrunjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_asyrunjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_asyrunjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_alterjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_alterjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_alterjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_alterjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_alterjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_connect",&obj0)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pbs_connect" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  result = (int)pbs_connect(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_query_max_connections(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":pbs_query_max_connections")) SWIG_fail;
+  result = (int)pbs_query_max_connections();
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":pbs_default")) SWIG_fail;
+  result = (char *)pbs_default();
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_deljob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_deljob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_deljob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_deljob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_deljob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)pbs_deljob(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_disconnect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_disconnect",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_disconnect" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (int)pbs_disconnect(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_geterrmsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_geterrmsg",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_geterrmsg" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (char *)pbs_geterrmsg(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_holdjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_holdjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_holdjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_holdjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_holdjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_holdjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_holdjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_locjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_locjob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_locjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_locjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_locjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (char *)pbs_locjob(arg1,arg2,arg3);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_manager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int arg3 ;
+  char *arg4 = (char *) 0 ;
+  struct attropl *arg5 = (struct attropl *) 0 ;
+  char *arg6 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  int res6 ;
+  char *buf6 = 0 ;
+  int alloc6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:pbs_manager",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_manager" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_manager" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_manager" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_manager" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  {
+    PyObject          *py_obj;
+    struct attropl    *ptr, *prev;
+    char              s[255];
+    int               i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n");
+    
+    size = Get_List_Size(obj4);
+    
+    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    //printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg5 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj4, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg5 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
+  if (!SWIG_IsOK(res6)) {
+    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_manager" "', argument " "6"" of type '" "char *""'");
+  }
+  arg6 = (char *)(buf6);
+  result = (int)pbs_manager(arg1,arg2,arg3,arg4,arg5,arg6);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  return resultobj;
+fail:
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_movejob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_movejob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_movejob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_movejob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_movejob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_movejob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_movejob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_msgjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  int arg3 ;
+  char *arg4 = (char *) 0 ;
+  char *arg5 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  int res5 ;
+  char *buf5 = 0 ;
+  int alloc5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_msgjob",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_msgjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_msgjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_msgjob" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_msgjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_msgjob" "', argument " "5"" of type '" "char *""'");
+  }
+  arg5 = (char *)(buf5);
+  result = (int)pbs_msgjob(arg1,arg2,arg3,arg4,arg5);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_orderjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_orderjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_orderjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_orderjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_orderjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_orderjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_orderjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rescquery(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char **arg2 = (char **) 0 ;
+  int arg3 ;
+  int *arg4 = (int *) 0 ;
+  int *arg5 = (int *) 0 ;
+  int *arg6 = (int *) 0 ;
+  int *arg7 = (int *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  void *argp5 = 0 ;
+  int res5 = 0 ;
+  void *argp6 = 0 ;
+  int res6 = 0 ;
+  void *argp7 = 0 ;
+  int res7 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  PyObject * obj6 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:pbs_rescquery",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescquery" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    int       i=0, size=0;
+    PyObject  *py_obj;
+    
+    if (SARA_DEBUG) printf("Convert python -> c (char **):\n");
+    
+    size = Get_List_Size(obj1);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    // printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = (char **) malloc( (size+1) * sizeof(char *));
+    for (i=0; i < size; i++) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (PyString_Check(py_obj)) {
+        arg2[i] = PyString_AsString(py_obj);
+        if (SARA_DEBUG) printf("%s", arg2[i]);
+      }
+      else {
+        PyErr_SetString(PyExc_TypeError, "not a list of strings");
+        free(arg2);
+        return NULL; 
+      }
+    } // end for
+    arg2[i] = 0;
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_rescquery" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rescquery" "', argument " "4"" of type '" "int *""'"); 
+  }
+  arg4 = (int *)(argp4);
+  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_rescquery" "', argument " "5"" of type '" "int *""'"); 
+  }
+  arg5 = (int *)(argp5);
+  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res6)) {
+    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pbs_rescquery" "', argument " "6"" of type '" "int *""'"); 
+  }
+  arg6 = (int *)(argp6);
+  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res7)) {
+    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "pbs_rescquery" "', argument " "7"" of type '" "int *""'"); 
+  }
+  arg7 = (int *)(argp7);
+  result = (int)pbs_rescquery(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
+  resultobj = SWIG_From_int((int)(result));
+  {
+    free( (char *) arg2);
+  }
+  return resultobj;
+fail:
+  {
+    free( (char *) arg2);
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rescreserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char **arg2 = (char **) 0 ;
+  int arg3 ;
+  resource_t *arg4 = (resource_t *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rescreserve",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescreserve" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    int       i=0, size=0;
+    PyObject  *py_obj;
+    
+    if (SARA_DEBUG) printf("Convert python -> c (char **):\n");
+    
+    size = Get_List_Size(obj1);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    // printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = (char **) malloc( (size+1) * sizeof(char *));
+    for (i=0; i < size; i++) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (PyString_Check(py_obj)) {
+        arg2[i] = PyString_AsString(py_obj);
+        if (SARA_DEBUG) printf("%s", arg2[i]);
+      }
+      else {
+        PyErr_SetString(PyExc_TypeError, "not a list of strings");
+        free(arg2);
+        return NULL; 
+      }
+    } // end for
+    arg2[i] = 0;
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pbs_rescreserve" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rescreserve" "', argument " "4"" of type '" "resource_t *""'"); 
+  }
+  arg4 = (resource_t *)(argp4);
+  result = (int)pbs_rescreserve(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  {
+    free( (char *) arg2);
+  }
+  return resultobj;
+fail:
+  {
+    free( (char *) arg2);
+  }
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rescrelease(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  resource_t arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:pbs_rescrelease",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rescrelease" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_rescrelease" "', argument " "2"" of type '" "resource_t""'");
+  } 
+  arg2 = (resource_t)(val2);
+  result = (int)pbs_rescrelease(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rerunjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_rerunjob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rerunjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rerunjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_rerunjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)pbs_rerunjob(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_rlsjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_rlsjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_rlsjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_rlsjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_rlsjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_rlsjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_rlsjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_runjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_runjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_runjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_runjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_runjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_runjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_runjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_selectjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  struct attropl *arg2 = (struct attropl *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  char **result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_selectjob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_selectjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    PyObject          *py_obj;
+    struct attropl    *ptr, *prev;
+    char              s[255];
+    int               i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n");
+    
+    size = Get_List_Size(obj1);
+    
+    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    //printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg2 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_selectjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (char **)pbs_selectjob(arg1,arg2,arg3);
+  {
+    int len=0, i;
+    
+    if (SARA_DEBUG) 
+    printf("Converteren char ** -> python list\n");
+    
+    
+    if (result == NULL) 
+    resultobj = PyList_New(0);
+    else {
+      while (result[len]) 
+      len++;
+    }
+    
+    if (SARA_DEBUG) 
+    printf("\tSize of List: %d\n", len);
+    
+    resultobj = PyList_New(len);
+    if (SARA_DEBUG) 
+    printf("\t<Contents>\n");
+    for (i=0; i < len; i++ ) {
+      PyList_SetItem(resultobj, i , PyString_FromString(result[i])); 
+      if (SARA_DEBUG) 
+      printf("\t\t- %s\n", result[i]);
+    }
+    if (SARA_DEBUG) 
+    printf("\t</Contents>\n");
+  }
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_sigjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_sigjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_sigjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_sigjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_sigjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_sigjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_sigjob(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statfree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  struct batch_status *arg1 = (struct batch_status *) 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:pbs_statfree",&obj0)) SWIG_fail;
+  {
+    PyObject              *py_obj;
+    struct batch_status   *ptr, *prev;
+    char                  s[255];
+    int                   i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct batch_status *):\n");
+    
+    size = Get_List_Size(obj0);
+    if (SARA_DEBUG) printf("\tSize of batch_status list: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    // printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg1 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj0, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_batch_status, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg1 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      prev = ptr;
+      
+    } // end for
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  pbs_statfree(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statjob",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_statjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_statjob" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (struct batch_status *)pbs_statjob(arg1,arg2,arg3,arg4);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_selstat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  struct attropl *arg2 = (struct attropl *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_selstat",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_selstat" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    PyObject          *py_obj;
+    struct attropl    *ptr, *prev;
+    char              s[255];
+    int               i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n");
+    
+    size = Get_List_Size(obj1);
+    
+    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    //printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg2 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_selstat" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (struct batch_status *)pbs_selstat(arg1,arg2,arg3);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statque(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statque",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statque" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_statque" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_statque" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (struct batch_status *)pbs_statque(arg1,arg2,arg3,arg4);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statserver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  struct attrl *arg2 = (struct attrl *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_statserver",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statserver" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj1);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg2 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_statserver" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (struct batch_status *)pbs_statserver(arg1,arg2,arg3);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_statnode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  struct batch_status *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_statnode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_statnode" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_statnode" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_statnode" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (struct batch_status *)pbs_statnode(arg1,arg2,arg3,arg4);
+  {
+    PyObject              *obj_batch;
+    struct batch_status   *ptr;
+    int                   i=0, len=0;
+    
+    // printf("Ja we are in bussniss\n");
+    if (SARA_DEBUG) printf("Converteren c (struct batch_status *) -> python:\n");
+    
+    // Deterime length of list
+    //
+    ptr = result;
+    while (ptr != NULL) {
+      len++;
+      ptr = ptr->next;
+    }
+    resultobj = PyList_New(len);
+    
+    if (SARA_DEBUG) printf("\tSize of List: %d\n", len);
+    
+    // Make a list of batch_status pointers
+    //
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    ptr = result;
+    for (i=0; i < len; i++) {
+      obj_batch = SWIG_NewPointerObj((void *)ptr, SWIGTYPE_p_batch_status,0); 
+      PyList_SetItem(resultobj, i, obj_batch);
+      if (SARA_DEBUG)  {
+        printf("\t\t- %s\n", ptr->name);
+      }
+      ptr = ptr->next;
+    }
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_submit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  struct attropl *arg2 = (struct attropl *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  char *arg5 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  int res5 ;
+  char *buf5 = 0 ;
+  int alloc5 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOO:pbs_submit",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_submit" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  {
+    PyObject          *py_obj;
+    struct attropl    *ptr, *prev;
+    char              s[255];
+    int               i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n");
+    
+    size = Get_List_Size(obj1);
+    
+    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    //printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg2 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_submit" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_submit" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
+  if (!SWIG_IsOK(res5)) {
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_submit" "', argument " "5"" of type '" "char *""'");
+  }
+  arg5 = (char *)(buf5);
+  result = (char *)pbs_submit(arg1,arg2,arg3,arg4,arg5);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_terminate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_terminate",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_terminate" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pbs_terminate" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_terminate" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)pbs_terminate(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_totpool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:totpool",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "totpool" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "totpool" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  result = (int)totpool(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_usepool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:usepool",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "usepool" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "usepool" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  result = (int)usepool(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_fbserver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":pbs_fbserver")) SWIG_fail;
+  result = (char *)pbs_fbserver();
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_get_server_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)":pbs_get_server_list")) SWIG_fail;
+  result = (char *)pbs_get_server_list();
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_sigjobasync(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_sigjobasync",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_sigjobasync" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_sigjobasync" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_sigjobasync" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_sigjobasync" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_sigjobasync(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_alterjob_async(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  struct attrl *arg3 = (struct attrl *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:pbs_alterjob_async",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_alterjob_async" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_alterjob_async" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  {
+    PyObject      *py_obj;
+    struct attrl  *ptr, *prev;
+    char          s[255];
+    int           i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attrl *):\n");
+    
+    size = Get_List_Size(obj2);
+    if (SARA_DEBUG) printf("\tSize of attrl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg3 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj2, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attrl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg3 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pbs_alterjob_async" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  result = (int)pbs_alterjob_async(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_pbs_checkpointjob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:pbs_checkpointjob",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_checkpointjob" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_checkpointjob" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pbs_checkpointjob" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  result = (int)pbs_checkpointjob(arg1,arg2,arg3);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_openrm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  unsigned int arg2 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  unsigned int val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:openrm",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "openrm" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "openrm" "', argument " "2"" of type '" "unsigned int""'");
+  } 
+  arg2 = (unsigned int)(val2);
+  result = (int)openrm(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_closerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:closerm",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "closerm" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (int)closerm(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_downrm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:downrm",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "downrm" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (int)downrm(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_configrm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:configrm",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "configrm" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "configrm" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  result = (int)configrm(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_addreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:addreq",&obj0,&obj1)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "addreq" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "addreq" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  result = (int)addreq(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_allreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:allreq",&obj0)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "allreq" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  result = (int)allreq(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_getreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  char *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:getreq",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getreq" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  result = (char *)getreq(arg1);
+  resultobj = SWIG_FromCharPtr((const char *)result);
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_flushreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":flushreq")) SWIG_fail;
+  result = (int)flushreq();
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_activereq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":activereq")) SWIG_fail;
+  result = (int)activereq();
+  resultobj = SWIG_From_int((int)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_fullresp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:fullresp",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fullresp" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  fullresp(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN int Swig_var_log_event_mask_set(PyObject *_val) {
+  {
+    void *argp = 0;
+    int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_long,  0 );  
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""log_event_mask""' of type '""long *""'");
+    }
+    log_event_mask = (long *)(argp);
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_log_event_mask_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(log_event_mask), SWIGTYPE_p_long,  0 );
+  return pyobj;
+}
+
+
+SWIGINTERN int Swig_var_chk_file_sec_stderr_set(PyObject *_val) {
+  {
+    int val;
+    int res = SWIG_AsVal_int(_val, &val);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""chk_file_sec_stderr""' of type '""int""'");
+    }
+    chk_file_sec_stderr = (int)(val);
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_chk_file_sec_stderr_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_From_int((int)(chk_file_sec_stderr));
+  return pyobj;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:log_close",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_close" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  log_close(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_err(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOO:log_err",&obj0,&obj1,&obj2)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_err" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "log_err" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_err" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  log_err(arg1,arg2,arg3);
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:log_event",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_event" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "log_event" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_event" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "log_event" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  log_event(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_Py_Void();
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  char *arg2 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:log_open",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "log_open" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "log_open" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  result = (int)log_open(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_record(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int arg2 ;
+  char *arg3 = (char *) 0 ;
+  char *arg4 = (char *) 0 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:log_record",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_record" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "log_record" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_record" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "log_record" "', argument " "4"" of type '" "char *""'");
+  }
+  arg4 = (char *)(buf4);
+  log_record(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_Py_Void();
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return resultobj;
+fail:
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_roll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:log_roll",&obj0)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_roll" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  log_roll(arg1);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  long result;
+  
+  if (!PyArg_ParseTuple(args,(char *)":log_size")) SWIG_fail;
+  result = (long)log_size();
+  resultobj = SWIG_From_long((long)(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN int Swig_var_log_buffer_set(PyObject *_val) {
+  {
+    int res = SWIG_AsCharArray(_val, log_buffer, 16384);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""log_buffer""' of type '""char [16384]""'");
+    }
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_log_buffer_get(void) {
+  PyObject *pyobj = 0;
+  
+  size_t size = 16384;
+  
+  while (size && (log_buffer[size - 1] == '\0')) --size;
+  
+  pyobj = SWIG_FromCharPtrAndSize(log_buffer, size);
+  return pyobj;
+}
+
+
+SWIGINTERN PyObject *_wrap_chk_file_sec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  int arg2 ;
+  int arg3 ;
+  int arg4 ;
+  int arg5 ;
+  char *arg6 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  int val2 ;
+  int ecode2 = 0 ;
+  int val3 ;
+  int ecode3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  int val5 ;
+  int ecode5 = 0 ;
+  int res6 ;
+  char *buf6 = 0 ;
+  int alloc6 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  PyObject * obj4 = 0 ;
+  PyObject * obj5 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:chk_file_sec",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chk_file_sec" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  ecode2 = SWIG_AsVal_int(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "chk_file_sec" "', argument " "2"" of type '" "int""'");
+  } 
+  arg2 = (int)(val2);
+  ecode3 = SWIG_AsVal_int(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "chk_file_sec" "', argument " "3"" of type '" "int""'");
+  } 
+  arg3 = (int)(val3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "chk_file_sec" "', argument " "4"" of type '" "int""'");
+  } 
+  arg4 = (int)(val4);
+  ecode5 = SWIG_AsVal_int(obj4, &val5);
+  if (!SWIG_IsOK(ecode5)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "chk_file_sec" "', argument " "5"" of type '" "int""'");
+  } 
+  arg5 = (int)(val5);
+  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
+  if (!SWIG_IsOK(res6)) {
+    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "chk_file_sec" "', argument " "6"" of type '" "char *""'");
+  }
+  arg6 = (char *)(buf6);
+  result = (int)chk_file_sec(arg1,arg2,arg3,arg4,arg5,arg6);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_setup_env(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  PyObject * obj0 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:setup_env",&obj0)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setup_env" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  result = (int)setup_env(arg1);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_ext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  int arg1 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  int arg4 ;
+  int val1 ;
+  int ecode1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  int val4 ;
+  int ecode4 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:log_ext",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  ecode1 = SWIG_AsVal_int(obj0, &val1);
+  if (!SWIG_IsOK(ecode1)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_ext" "', argument " "1"" of type '" "int""'");
+  } 
+  arg1 = (int)(val1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "log_ext" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "log_ext" "', argument " "3"" of type '" "char *""'");
+  }
+  arg3 = (char *)(buf3);
+  ecode4 = SWIG_AsVal_int(obj3, &val4);
+  if (!SWIG_IsOK(ecode4)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "log_ext" "', argument " "4"" of type '" "int""'");
+  } 
+  arg4 = (int)(val4);
+  log_ext(arg1,arg2,arg3,arg4);
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  char *arg2 = (char *) 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:log_init",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "log_init" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "log_init" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = (char *)(buf2);
+  result = (int)log_init(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_log_remove_old(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  unsigned long arg2 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  unsigned long val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  int result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:log_remove_old",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "log_remove_old" "', argument " "1"" of type '" "char *""'");
+  }
+  arg1 = (char *)(buf1);
+  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "log_remove_old" "', argument " "2"" of type '" "unsigned long""'");
+  } 
+  arg2 = (unsigned long)(val2);
+  result = (int)log_remove_old(arg1,arg2);
+  resultobj = SWIG_From_int((int)(result));
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+  return NULL;
+}
+
+
+SWIGINTERN int Swig_var_msg_daemonname_set(PyObject *_val) {
+  {
+    char *cptr = 0; size_t csize = 0; int alloc = SWIG_NEWOBJ;
+    int res = SWIG_AsCharPtrAndSize(_val, &cptr, &csize, &alloc);
+    if (!SWIG_IsOK(res)) {
+      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""msg_daemonname""' of type '""char *""'");
+    }
+    if (msg_daemonname) free((char*)msg_daemonname);
+    if (alloc == SWIG_NEWOBJ) {
+      msg_daemonname = cptr;
+    } else {
+      msg_daemonname = csize ? (char *)(char *)memcpy((char *)malloc((csize)*sizeof(char)), cptr, sizeof(char)*(csize)) : 0;
+    }
+  }
+  return 0;
+fail:
+  return 1;
+}
+
+
+SWIGINTERN PyObject *Swig_var_msg_daemonname_get(void) {
+  PyObject *pyobj = 0;
+  
+  pyobj = SWIG_FromCharPtr(msg_daemonname);
+  return pyobj;
+}
+
+
+static PyMethodDef SwigMethods[] = {
+	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
+	 { (char *)"new_attrl", _wrap_new_attrl, METH_VARARGS, NULL},
+	 { (char *)"new_attropl", _wrap_new_attropl, METH_VARARGS, NULL},
+	 { (char *)"new_batch_status", _wrap_new_batch_status, METH_VARARGS, NULL},
+	 { (char *)"get_error", _wrap_get_error, METH_VARARGS, NULL},
+	 { (char *)"attrl_next_set", _wrap_attrl_next_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_next_get", _wrap_attrl_next_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_name_set", _wrap_attrl_name_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_name_get", _wrap_attrl_name_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_resource_set", _wrap_attrl_resource_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_resource_get", _wrap_attrl_resource_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_value_set", _wrap_attrl_value_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_value_get", _wrap_attrl_value_get, METH_VARARGS, NULL},
+	 { (char *)"attrl_op_set", _wrap_attrl_op_set, METH_VARARGS, NULL},
+	 { (char *)"attrl_op_get", _wrap_attrl_op_get, METH_VARARGS, NULL},
+	 { (char *)"attrl___str__", _wrap_attrl___str__, METH_VARARGS, NULL},
+	 { (char *)"delete_attrl", _wrap_delete_attrl, METH_VARARGS, NULL},
+	 { (char *)"attrl_swigregister", attrl_swigregister, METH_VARARGS, NULL},
+	 { (char *)"attropl_next_set", _wrap_attropl_next_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_next_get", _wrap_attropl_next_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_name_set", _wrap_attropl_name_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_name_get", _wrap_attropl_name_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_resource_set", _wrap_attropl_resource_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_resource_get", _wrap_attropl_resource_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_value_set", _wrap_attropl_value_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_value_get", _wrap_attropl_value_get, METH_VARARGS, NULL},
+	 { (char *)"attropl_op_set", _wrap_attropl_op_set, METH_VARARGS, NULL},
+	 { (char *)"attropl_op_get", _wrap_attropl_op_get, METH_VARARGS, NULL},
+	 { (char *)"attropl___str__", _wrap_attropl___str__, METH_VARARGS, NULL},
+	 { (char *)"delete_attropl", _wrap_delete_attropl, METH_VARARGS, NULL},
+	 { (char *)"attropl_swigregister", attropl_swigregister, METH_VARARGS, NULL},
+	 { (char *)"batch_status_next_set", _wrap_batch_status_next_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_next_get", _wrap_batch_status_next_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_name_set", _wrap_batch_status_name_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_name_get", _wrap_batch_status_name_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_attribs_set", _wrap_batch_status_attribs_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_attribs_get", _wrap_batch_status_attribs_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_text_set", _wrap_batch_status_text_set, METH_VARARGS, NULL},
+	 { (char *)"batch_status_text_get", _wrap_batch_status_text_get, METH_VARARGS, NULL},
+	 { (char *)"batch_status_swigregister", batch_status_swigregister, METH_VARARGS, NULL},
+	 { (char *)"avail", _wrap_avail, METH_VARARGS, NULL},
+	 { (char *)"pbs_asyrunjob", _wrap_pbs_asyrunjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_alterjob", _wrap_pbs_alterjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_connect", _wrap_pbs_connect, METH_VARARGS, NULL},
+	 { (char *)"pbs_query_max_connections", _wrap_pbs_query_max_connections, METH_VARARGS, NULL},
+	 { (char *)"pbs_default", _wrap_pbs_default, METH_VARARGS, NULL},
+	 { (char *)"pbs_deljob", _wrap_pbs_deljob, METH_VARARGS, NULL},
+	 { (char *)"pbs_disconnect", _wrap_pbs_disconnect, METH_VARARGS, NULL},
+	 { (char *)"pbs_geterrmsg", _wrap_pbs_geterrmsg, METH_VARARGS, NULL},
+	 { (char *)"pbs_holdjob", _wrap_pbs_holdjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_locjob", _wrap_pbs_locjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_manager", _wrap_pbs_manager, METH_VARARGS, NULL},
+	 { (char *)"pbs_movejob", _wrap_pbs_movejob, METH_VARARGS, NULL},
+	 { (char *)"pbs_msgjob", _wrap_pbs_msgjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_orderjob", _wrap_pbs_orderjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_rescquery", _wrap_pbs_rescquery, METH_VARARGS, NULL},
+	 { (char *)"pbs_rescreserve", _wrap_pbs_rescreserve, METH_VARARGS, NULL},
+	 { (char *)"pbs_rescrelease", _wrap_pbs_rescrelease, METH_VARARGS, NULL},
+	 { (char *)"pbs_rerunjob", _wrap_pbs_rerunjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_rlsjob", _wrap_pbs_rlsjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_runjob", _wrap_pbs_runjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_selectjob", _wrap_pbs_selectjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_sigjob", _wrap_pbs_sigjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_statfree", _wrap_pbs_statfree, METH_VARARGS, NULL},
+	 { (char *)"pbs_statjob", _wrap_pbs_statjob, METH_VARARGS, NULL},
+	 { (char *)"pbs_selstat", _wrap_pbs_selstat, METH_VARARGS, NULL},
+	 { (char *)"pbs_statque", _wrap_pbs_statque, METH_VARARGS, NULL},
+	 { (char *)"pbs_statserver", _wrap_pbs_statserver, METH_VARARGS, NULL},
+	 { (char *)"pbs_statnode", _wrap_pbs_statnode, METH_VARARGS, NULL},
+	 { (char *)"pbs_submit", _wrap_pbs_submit, METH_VARARGS, NULL},
+	 { (char *)"pbs_terminate", _wrap_pbs_terminate, METH_VARARGS, NULL},
+	 { (char *)"totpool", _wrap_totpool, METH_VARARGS, NULL},
+	 { (char *)"usepool", _wrap_usepool, METH_VARARGS, NULL},
+	 { (char *)"pbs_fbserver", _wrap_pbs_fbserver, METH_VARARGS, NULL},
+	 { (char *)"pbs_get_server_list", _wrap_pbs_get_server_list, METH_VARARGS, NULL},
+	 { (char *)"pbs_sigjobasync", _wrap_pbs_sigjobasync, METH_VARARGS, NULL},
+	 { (char *)"pbs_alterjob_async", _wrap_pbs_alterjob_async, METH_VARARGS, NULL},
+	 { (char *)"pbs_checkpointjob", _wrap_pbs_checkpointjob, METH_VARARGS, NULL},
+	 { (char *)"openrm", _wrap_openrm, METH_VARARGS, NULL},
+	 { (char *)"closerm", _wrap_closerm, METH_VARARGS, NULL},
+	 { (char *)"downrm", _wrap_downrm, METH_VARARGS, NULL},
+	 { (char *)"configrm", _wrap_configrm, METH_VARARGS, NULL},
+	 { (char *)"addreq", _wrap_addreq, METH_VARARGS, NULL},
+	 { (char *)"allreq", _wrap_allreq, METH_VARARGS, NULL},
+	 { (char *)"getreq", _wrap_getreq, METH_VARARGS, NULL},
+	 { (char *)"flushreq", _wrap_flushreq, METH_VARARGS, NULL},
+	 { (char *)"activereq", _wrap_activereq, METH_VARARGS, NULL},
+	 { (char *)"fullresp", _wrap_fullresp, METH_VARARGS, NULL},
+	 { (char *)"log_close", _wrap_log_close, METH_VARARGS, NULL},
+	 { (char *)"log_err", _wrap_log_err, METH_VARARGS, NULL},
+	 { (char *)"log_event", _wrap_log_event, METH_VARARGS, NULL},
+	 { (char *)"log_open", _wrap_log_open, METH_VARARGS, NULL},
+	 { (char *)"log_record", _wrap_log_record, METH_VARARGS, NULL},
+	 { (char *)"log_roll", _wrap_log_roll, METH_VARARGS, NULL},
+	 { (char *)"log_size", _wrap_log_size, METH_VARARGS, NULL},
+	 { (char *)"chk_file_sec", _wrap_chk_file_sec, METH_VARARGS, NULL},
+	 { (char *)"setup_env", _wrap_setup_env, METH_VARARGS, NULL},
+	 { (char *)"log_ext", _wrap_log_ext, METH_VARARGS, NULL},
+	 { (char *)"log_init", _wrap_log_init, METH_VARARGS, NULL},
+	 { (char *)"log_remove_old", _wrap_log_remove_old, METH_VARARGS, NULL},
+	 { NULL, NULL, 0, NULL }
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
+
+static swig_type_info _swigt__p_attrl = {"_p_attrl", "struct attrl *|attrl *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_attropl = {"_p_attropl", "struct attropl *|attropl *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_batch_status = {"_p_batch_status", "struct batch_status *|batch_status *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_int = {"_p_int", "int *|resource_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
+
+static swig_type_info *swig_type_initial[] = {
+  &_swigt__p_attrl,
+  &_swigt__p_attropl,
+  &_swigt__p_batch_status,
+  &_swigt__p_char,
+  &_swigt__p_int,
+  &_swigt__p_long,
+  &_swigt__p_p_char,
+};
+
+static swig_cast_info _swigc__p_attrl[] = {  {&_swigt__p_attrl, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_attropl[] = {  {&_swigt__p_attropl, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_batch_status[] = {  {&_swigt__p_batch_status, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_long[] = {  {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
+
+static swig_cast_info *swig_cast_initial[] = {
+  _swigc__p_attrl,
+  _swigc__p_attropl,
+  _swigc__p_batch_status,
+  _swigc__p_char,
+  _swigc__p_int,
+  _swigc__p_long,
+  _swigc__p_p_char,
+};
+
+
+/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
+
+static swig_const_info swig_const_table[] = {
+{0, 0, 0, 0.0, 0, 0}};
+
+#ifdef __cplusplus
+}
+#endif
+/* -----------------------------------------------------------------------------
+ * Type initialization:
+ * This problem is tough by the requirement that no dynamic 
+ * memory is used. Also, since swig_type_info structures store pointers to 
+ * swig_cast_info structures and swig_cast_info structures store pointers back
+ * to swig_type_info structures, we need some lookup code at initialization. 
+ * The idea is that swig generates all the structures that are needed. 
+ * The runtime then collects these partially filled structures. 
+ * The SWIG_InitializeModule function takes these initial arrays out of 
+ * swig_module, and does all the lookup, filling in the swig_module.types
+ * array with the correct data and linking the correct swig_cast_info
+ * structures together.
+ *
+ * The generated swig_type_info structures are assigned staticly to an initial 
+ * array. We just loop through that array, and handle each type individually.
+ * First we lookup if this type has been already loaded, and if so, use the
+ * loaded structure instead of the generated one. Then we have to fill in the
+ * cast linked list. The cast data is initially stored in something like a
+ * two-dimensional array. Each row corresponds to a type (there are the same
+ * number of rows as there are in the swig_type_initial array). Each entry in
+ * a column is one of the swig_cast_info structures for that type.
+ * The cast_initial array is actually an array of arrays, because each row has
+ * a variable number of columns. So to actually build the cast linked list,
+ * we find the array of casts associated with the type, and loop through it 
+ * adding the casts to the list. The one last trick we need to do is making
+ * sure the type pointer in the swig_cast_info struct is correct.
+ *
+ * First off, we lookup the cast->type name to see if it is already loaded. 
+ * There are three cases to handle:
+ *  1) If the cast->type has already been loaded AND the type we are adding
+ *     casting info to has not been loaded (it is in this module), THEN we
+ *     replace the cast->type pointer with the type pointer that has already
+ *     been loaded.
+ *  2) If BOTH types (the one we are adding casting info to, and the 
+ *     cast->type) are loaded, THEN the cast info has already been loaded by
+ *     the previous module so we just ignore it.
+ *  3) Finally, if cast->type has not already been loaded, then we add that
+ *     swig_cast_info to the linked list (because the cast->type) pointer will
+ *     be correct.
+ * ----------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* c-mode */
+#endif
+#endif
+
+#if 0
+#define SWIGRUNTIME_DEBUG
+#endif
+
+
+SWIGRUNTIME void
+SWIG_InitializeModule(void *clientdata) {
+  size_t i;
+  swig_module_info *module_head, *iter;
+  int found, init;
+  
+  clientdata = clientdata;
+  
+  /* check to see if the circular list has been setup, if not, set it up */
+  if (swig_module.next==0) {
+    /* Initialize the swig_module */
+    swig_module.type_initial = swig_type_initial;
+    swig_module.cast_initial = swig_cast_initial;
+    swig_module.next = &swig_module;
+    init = 1;
+  } else {
+    init = 0;
+  }
+  
+  /* Try and load any already created modules */
+  module_head = SWIG_GetModule(clientdata);
+  if (!module_head) {
+    /* This is the first module loaded for this interpreter */
+    /* so set the swig module into the interpreter */
+    SWIG_SetModule(clientdata, &swig_module);
+    module_head = &swig_module;
+  } else {
+    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
+    found=0;
+    iter=module_head;
+    do {
+      if (iter==&swig_module) {
+        found=1;
+        break;
+      }
+      iter=iter->next;
+    } while (iter!= module_head);
+    
+    /* if the is found in the list, then all is done and we may leave */
+    if (found) return;
+    /* otherwise we must add out module into the list */
+    swig_module.next = module_head->next;
+    module_head->next = &swig_module;
+  }
+  
+  /* When multiple interpeters are used, a module could have already been initialized in
+       a different interpreter, but not yet have a pointer in this interpreter.
+       In this case, we do not want to continue adding types... everything should be
+       set up already */
+  if (init == 0) return;
+  
+  /* Now work on filling in swig_module.types */
+#ifdef SWIGRUNTIME_DEBUG
+  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
+#endif
+  for (i = 0; i < swig_module.size; ++i) {
+    swig_type_info *type = 0;
+    swig_type_info *ret;
+    swig_cast_info *cast;
+    
+#ifdef SWIGRUNTIME_DEBUG
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+#endif
+    
+    /* if there is another module already loaded */
+    if (swig_module.next != &swig_module) {
+      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
+    }
+    if (type) {
+      /* Overwrite clientdata field */
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: found type %s\n", type->name);
+#endif
+      if (swig_module.type_initial[i]->clientdata) {
+        type->clientdata = swig_module.type_initial[i]->clientdata;
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
+#endif
+      }
+    } else {
+      type = swig_module.type_initial[i];
+    }
+    
+    /* Insert casting types */
+    cast = swig_module.cast_initial[i];
+    while (cast->type) {
+      /* Don't need to add information already in the list */
+      ret = 0;
+#ifdef SWIGRUNTIME_DEBUG
+      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
+#endif
+      if (swig_module.next != &swig_module) {
+        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
+#ifdef SWIGRUNTIME_DEBUG
+        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
+#endif
+      }
+      if (ret) {
+        if (type == swig_module.type_initial[i]) {
+#ifdef SWIGRUNTIME_DEBUG
+          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
+#endif
+          cast->type = ret;
+          ret = 0;
+        } else {
+          /* Check for casting already in the list */
+          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
+#ifdef SWIGRUNTIME_DEBUG
+          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
+#endif
+          if (!ocast) ret = 0;
+        }
+      }
+      
+      if (!ret) {
+#ifdef SWIGRUNTIME_DEBUG
+        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
+#endif
+        if (type->cast) {
+          type->cast->prev = cast;
+          cast->next = type->cast;
+        }
+        type->cast = cast;
+      }
+      cast++;
+    }
+    /* Set entry in modules->types array equal to the type */
+    swig_module.types[i] = type;
+  }
+  swig_module.types[i] = 0;
+  
+#ifdef SWIGRUNTIME_DEBUG
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+  for (i = 0; i < swig_module.size; ++i) {
+    int j = 0;
+    swig_cast_info *cast = swig_module.cast_initial[i];
+    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+    while (cast->type) {
+      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
+      cast++;
+      ++j;
+    }
+    printf("---- Total casts: %d\n",j);
+  }
+  printf("**** SWIG_InitializeModule: Cast List ******\n");
+#endif
+}
+
+/* This function will propagate the clientdata field of type to
+* any new swig_type_info structures that have been added into the list
+* of equivalent types.  It is like calling
+* SWIG_TypeClientData(type, clientdata) a second time.
+*/
+SWIGRUNTIME void
+SWIG_PropagateClientData(void) {
+  size_t i;
+  swig_cast_info *equiv;
+  static int init_run = 0;
+  
+  if (init_run) return;
+  init_run = 1;
+  
+  for (i = 0; i < swig_module.size; i++) {
+    if (swig_module.types[i]->clientdata) {
+      equiv = swig_module.types[i]->cast;
+      while (equiv) {
+        if (!equiv->converter) {
+          if (equiv->type && !equiv->type->clientdata)
+          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
+        }
+        equiv = equiv->next;
+      }
+    }
+  }
+}
+
+#ifdef __cplusplus
+#if 0
+{
+  /* c-mode */
+#endif
+}
+#endif
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+  
+  /* Python-specific SWIG API */
+#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
+#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
+#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
+  
+  /* -----------------------------------------------------------------------------
+   * global variable support code.
+   * ----------------------------------------------------------------------------- */
+  
+  typedef struct swig_globalvar {
+    char       *name;                  /* Name of global variable */
+    PyObject *(*get_attr)(void);       /* Return the current value */
+    int       (*set_attr)(PyObject *); /* Set the value */
+    struct swig_globalvar *next;
+  } swig_globalvar;
+  
+  typedef struct swig_varlinkobject {
+    PyObject_HEAD
+    swig_globalvar *vars;
+  } swig_varlinkobject;
+  
+  SWIGINTERN PyObject *
+  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
+#if PY_VERSION_HEX >= 0x03000000
+    return PyUnicode_InternFromString("<Swig global variables>");
+#else
+    return PyString_FromString("<Swig global variables>");
+#endif
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_str(swig_varlinkobject *v) {
+#if PY_VERSION_HEX >= 0x03000000
+    PyObject *str = PyUnicode_InternFromString("(");
+    PyObject *tail;
+    PyObject *joined;
+    swig_globalvar *var;
+    for (var = v->vars; var; var=var->next) {
+      tail = PyUnicode_FromString(var->name);
+      joined = PyUnicode_Concat(str, tail);
+      Py_DecRef(str);
+      Py_DecRef(tail);
+      str = joined;
+      if (var->next) {
+        tail = PyUnicode_InternFromString(", ");
+        joined = PyUnicode_Concat(str, tail);
+        Py_DecRef(str);
+        Py_DecRef(tail);
+        str = joined;
+      }
+    }
+    tail = PyUnicode_InternFromString(")");
+    joined = PyUnicode_Concat(str, tail);
+    Py_DecRef(str);
+    Py_DecRef(tail);
+    str = joined;
+#else
+    PyObject *str = PyString_FromString("(");
+    swig_globalvar *var;
+    for (var = v->vars; var; var=var->next) {
+      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
+      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
+    }
+    PyString_ConcatAndDel(&str,PyString_FromString(")"));
+#endif
+    return str;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
+    char *tmp;
+    PyObject *str = swig_varlink_str(v);
+    fprintf(fp,"Swig global variables ");
+    fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
+    SWIG_Python_str_DelForPy3(tmp);
+    Py_DECREF(str);
+    return 0;
+  }
+  
+  SWIGINTERN void
+  swig_varlink_dealloc(swig_varlinkobject *v) {
+    swig_globalvar *var = v->vars;
+    while (var) {
+      swig_globalvar *n = var->next;
+      free(var->name);
+      free(var);
+      var = n;
+    }
+  }
+  
+  SWIGINTERN PyObject *
+  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
+    PyObject *res = NULL;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->get_attr)();
+        break;
+      }
+      var = var->next;
+    }
+    if (res == NULL && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN int
+  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
+    int res = 1;
+    swig_globalvar *var = v->vars;
+    while (var) {
+      if (strcmp(var->name,n) == 0) {
+        res = (*var->set_attr)(p);
+        break;
+      }
+      var = var->next;
+    }
+    if (res == 1 && !PyErr_Occurred()) {
+      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
+    }
+    return res;
+  }
+  
+  SWIGINTERN PyTypeObject*
+  swig_varlink_type(void) {
+    static char varlink__doc__[] = "Swig var link object";
+    static PyTypeObject varlink_type;
+    static int type_init = 0;  
+    if (!type_init) {
+      const PyTypeObject tmp
+      = {
+        /* PyObject header changed in Python 3 */
+#if PY_VERSION_HEX >= 0x03000000
+        PyVarObject_HEAD_INIT(&PyType_Type, 0)
+#else
+        PyObject_HEAD_INIT(NULL)
+        0,                                  /* Number of items in variable part (ob_size) */
+#endif
+        (char *)"swigvarlink",              /* Type name (tp_name) */
+        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
+        0,                                  /* Itemsize (tp_itemsize) */
+        (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
+        (printfunc) swig_varlink_print,     /* Print (tp_print) */
+        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
+        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
+        0,                                  /* tp_compare */
+        (reprfunc) swig_varlink_repr,       /* tp_repr */
+        0,                                  /* tp_as_number */
+        0,                                  /* tp_as_sequence */
+        0,                                  /* tp_as_mapping */
+        0,                                  /* tp_hash */
+        0,                                  /* tp_call */
+        (reprfunc) swig_varlink_str,        /* tp_str */
+        0,                                  /* tp_getattro */
+        0,                                  /* tp_setattro */
+        0,                                  /* tp_as_buffer */
+        0,                                  /* tp_flags */
+        varlink__doc__,                     /* tp_doc */
+        0,                                  /* tp_traverse */
+        0,                                  /* tp_clear */
+        0,                                  /* tp_richcompare */
+        0,                                  /* tp_weaklistoffset */
+#if PY_VERSION_HEX >= 0x02020000
+        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
+#endif
+#if PY_VERSION_HEX >= 0x02030000
+        0,                                  /* tp_del */
+#endif
+#ifdef COUNT_ALLOCS
+        0,0,0,0                             /* tp_alloc -> tp_next */
+#endif
+      };
+      varlink_type = tmp;
+      /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
+#if PY_VERSION_HEX < 0x03000000
+      varlink_type.ob_type = &PyType_Type;
+#endif
+      type_init = 1;
+    }
+    return &varlink_type;
+  }
+  
+  /* Create a variable linking object for use later */
+  SWIGINTERN PyObject *
+  SWIG_Python_newvarlink(void) {
+    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
+    if (result) {
+      result->vars = 0;
+    }
+    return ((PyObject*) result);
+  }
+  
+  SWIGINTERN void 
+  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
+    swig_varlinkobject *v = (swig_varlinkobject *) p;
+    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
+    if (gv) {
+      size_t size = strlen(name)+1;
+      gv->name = (char *)malloc(size);
+      if (gv->name) {
+        strncpy(gv->name,name,size);
+        gv->get_attr = get_attr;
+        gv->set_attr = set_attr;
+        gv->next = v->vars;
+      }
+    }
+    v->vars = gv;
+  }
+  
+  SWIGINTERN PyObject *
+  SWIG_globals(void) {
+    static PyObject *_SWIG_globals = 0; 
+    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
+    return _SWIG_globals;
+  }
+  
+  /* -----------------------------------------------------------------------------
+   * constants/methods manipulation
+   * ----------------------------------------------------------------------------- */
+  
+  /* Install Constants */
+  SWIGINTERN void
+  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
+    PyObject *obj = 0;
+    size_t i;
+    for (i = 0; constants[i].type; ++i) {
+      switch(constants[i].type) {
+      case SWIG_PY_POINTER:
+        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+        break;
+      case SWIG_PY_BINARY:
+        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
+        break;
+      default:
+        obj = 0;
+        break;
+      }
+      if (obj) {
+        PyDict_SetItemString(d, constants[i].name, obj);
+        Py_DECREF(obj);
+      }
+    }
+  }
+  
+  /* -----------------------------------------------------------------------------*/
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  /* -----------------------------------------------------------------------------*/
+  
+  SWIGINTERN void
+  SWIG_Python_FixMethods(PyMethodDef *methods,
+    swig_const_info *const_table,
+    swig_type_info **types,
+    swig_type_info **types_initial) {
+    size_t i;
+    for (i = 0; methods[i].ml_name; ++i) {
+      const char *c = methods[i].ml_doc;
+      if (c && (c = strstr(c, "swig_ptr: "))) {
+        int j;
+        swig_const_info *ci = 0;
+        const char *name = c + 10;
+        for (j = 0; const_table[j].type; ++j) {
+          if (strncmp(const_table[j].name, name, 
+              strlen(const_table[j].name)) == 0) {
+            ci = &(const_table[j]);
+            break;
+          }
+        }
+        if (ci) {
+          size_t shift = (ci->ptype) - types;
+          swig_type_info *ty = types_initial[shift];
+          size_t ldoc = (c - methods[i].ml_doc);
+          size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
+          char *ndoc = (char*)malloc(ldoc + lptr + 10);
+          if (ndoc) {
+            char *buff = ndoc;
+            void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
+            if (ptr) {
+              strncpy(buff, methods[i].ml_doc, ldoc);
+              buff += ldoc;
+              strncpy(buff, "swig_ptr: ", 10);
+              buff += 10;
+              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
+              methods[i].ml_doc = ndoc;
+            }
+          }
+        }
+      }
+    }
+  } 
+  
+#ifdef __cplusplus
+}
+#endif
+
+/* -----------------------------------------------------------------------------*
+ *  Partial Init method
+ * -----------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+extern "C"
+#endif
+
+SWIGEXPORT 
+#if PY_VERSION_HEX >= 0x03000000
+PyObject*
+#else
+void
+#endif
+SWIG_init(void) {
+  PyObject *m, *d;  
+#if PY_VERSION_HEX >= 0x03000000
+  static struct PyModuleDef SWIG_module = {
+    PyModuleDef_HEAD_INIT,
+    (char *) SWIG_name,
+    NULL,
+    -1,
+    SwigMethods,
+    NULL,
+    NULL,
+    NULL,
+    NULL
+  };
+#endif
+  
+  /* Fix SwigMethods to carry the callback ptrs when needed */
+  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
+  
+#if PY_VERSION_HEX >= 0x03000000
+  m = PyModule_Create(&SWIG_module);
+#else
+  m = Py_InitModule((char *) SWIG_name, SwigMethods);
+#endif
+  d = PyModule_GetDict(m);
+  
+  SWIG_InitializeModule(0);
+  SWIG_InstallConstants(d,swig_const_table);
+  
+  
+  SWIG_Python_SetConstant(d, "ATTR_a",SWIG_FromCharPtr("Execution_Time"));
+  SWIG_Python_SetConstant(d, "ATTR_c",SWIG_FromCharPtr("Checkpoint"));
+  SWIG_Python_SetConstant(d, "ATTR_e",SWIG_FromCharPtr("Error_Path"));
+  SWIG_Python_SetConstant(d, "ATTR_f",SWIG_FromCharPtr("fault_tolerant"));
+  SWIG_Python_SetConstant(d, "ATTR_g",SWIG_FromCharPtr("group_list"));
+  SWIG_Python_SetConstant(d, "ATTR_h",SWIG_FromCharPtr("Hold_Types"));
+  SWIG_Python_SetConstant(d, "ATTR_j",SWIG_FromCharPtr("Join_Path"));
+  SWIG_Python_SetConstant(d, "ATTR_k",SWIG_FromCharPtr("Keep_Files"));
+  SWIG_Python_SetConstant(d, "ATTR_l",SWIG_FromCharPtr("Resource_List"));
+  SWIG_Python_SetConstant(d, "ATTR_m",SWIG_FromCharPtr("Mail_Points"));
+  SWIG_Python_SetConstant(d, "ATTR_o",SWIG_FromCharPtr("Output_Path"));
+  SWIG_Python_SetConstant(d, "ATTR_p",SWIG_FromCharPtr("Priority"));
+  SWIG_Python_SetConstant(d, "ATTR_q",SWIG_FromCharPtr("destination"));
+  SWIG_Python_SetConstant(d, "ATTR_r",SWIG_FromCharPtr("Rerunable"));
+  SWIG_Python_SetConstant(d, "ATTR_t",SWIG_FromCharPtr("job_array_request"));
+  SWIG_Python_SetConstant(d, "ATTR_array_id",SWIG_FromCharPtr("job_array_id"));
+  SWIG_Python_SetConstant(d, "ATTR_u",SWIG_FromCharPtr("User_List"));
+  SWIG_Python_SetConstant(d, "ATTR_v",SWIG_FromCharPtr("Variable_List"));
+  SWIG_Python_SetConstant(d, "ATTR_A",SWIG_FromCharPtr("Account_Name"));
+  SWIG_Python_SetConstant(d, "ATTR_M",SWIG_FromCharPtr("Mail_Users"));
+  SWIG_Python_SetConstant(d, "ATTR_N",SWIG_FromCharPtr("Job_Name"));
+  SWIG_Python_SetConstant(d, "ATTR_S",SWIG_FromCharPtr("Shell_Path_List"));
+  SWIG_Python_SetConstant(d, "ATTR_depend",SWIG_FromCharPtr("depend"));
+  SWIG_Python_SetConstant(d, "ATTR_inter",SWIG_FromCharPtr("interactive"));
+  SWIG_Python_SetConstant(d, "ATTR_stagein",SWIG_FromCharPtr("stagein"));
+  SWIG_Python_SetConstant(d, "ATTR_stageout",SWIG_FromCharPtr("stageout"));
+  SWIG_Python_SetConstant(d, "ATTR_jobtype",SWIG_FromCharPtr("jobtype"));
+  SWIG_Python_SetConstant(d, "ATTR_ctime",SWIG_FromCharPtr("ctime"));
+  SWIG_Python_SetConstant(d, "ATTR_exechost",SWIG_FromCharPtr("exec_host"));
+  SWIG_Python_SetConstant(d, "ATTR_mtime",SWIG_FromCharPtr("mtime"));
+  SWIG_Python_SetConstant(d, "ATTR_qtime",SWIG_FromCharPtr("qtime"));
+  SWIG_Python_SetConstant(d, "ATTR_session",SWIG_FromCharPtr("session_id"));
+  SWIG_Python_SetConstant(d, "ATTR_euser",SWIG_FromCharPtr("euser"));
+  SWIG_Python_SetConstant(d, "ATTR_egroup",SWIG_FromCharPtr("egroup"));
+  SWIG_Python_SetConstant(d, "ATTR_hashname",SWIG_FromCharPtr("hashname"));
+  SWIG_Python_SetConstant(d, "ATTR_hopcount",SWIG_FromCharPtr("hop_count"));
+  SWIG_Python_SetConstant(d, "ATTR_security",SWIG_FromCharPtr("security"));
+  SWIG_Python_SetConstant(d, "ATTR_sched_hint",SWIG_FromCharPtr("sched_hint"));
+  SWIG_Python_SetConstant(d, "ATTR_substate",SWIG_FromCharPtr("substate"));
+  SWIG_Python_SetConstant(d, "ATTR_name",SWIG_FromCharPtr("Job_Name"));
+  SWIG_Python_SetConstant(d, "ATTR_owner",SWIG_FromCharPtr("Job_Owner"));
+  SWIG_Python_SetConstant(d, "ATTR_used",SWIG_FromCharPtr("resources_used"));
+  SWIG_Python_SetConstant(d, "ATTR_state",SWIG_FromCharPtr("job_state"));
+  SWIG_Python_SetConstant(d, "ATTR_queue",SWIG_FromCharPtr("queue"));
+  SWIG_Python_SetConstant(d, "ATTR_server",SWIG_FromCharPtr("server"));
+  SWIG_Python_SetConstant(d, "ATTR_maxrun",SWIG_FromCharPtr("max_running"));
+  SWIG_Python_SetConstant(d, "ATTR_maxreport",SWIG_FromCharPtr("max_report"));
+  SWIG_Python_SetConstant(d, "ATTR_total",SWIG_FromCharPtr("total_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_comment",SWIG_FromCharPtr("comment"));
+  SWIG_Python_SetConstant(d, "ATTR_cookie",SWIG_FromCharPtr("cookie"));
+  SWIG_Python_SetConstant(d, "ATTR_qrank",SWIG_FromCharPtr("queue_rank"));
+  SWIG_Python_SetConstant(d, "ATTR_altid",SWIG_FromCharPtr("alt_id"));
+  SWIG_Python_SetConstant(d, "ATTR_etime",SWIG_FromCharPtr("etime"));
+  SWIG_Python_SetConstant(d, "ATTR_exitstat",SWIG_FromCharPtr("exit_status"));
+  SWIG_Python_SetConstant(d, "ATTR_forwardx11",SWIG_FromCharPtr("forward_x11"));
+  SWIG_Python_SetConstant(d, "ATTR_submit_args",SWIG_FromCharPtr("submit_args"));
+  SWIG_Python_SetConstant(d, "ATTR_tokens",SWIG_FromCharPtr("tokens"));
+  SWIG_Python_SetConstant(d, "ATTR_netcounter",SWIG_FromCharPtr("net_counter"));
+  SWIG_Python_SetConstant(d, "ATTR_umask",SWIG_FromCharPtr("umask"));
+  SWIG_Python_SetConstant(d, "ATTR_start_time",SWIG_FromCharPtr("start_time"));
+  SWIG_Python_SetConstant(d, "ATTR_start_count",SWIG_FromCharPtr("start_count"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_dir",SWIG_FromCharPtr("checkpoint_dir"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_name",SWIG_FromCharPtr("checkpoint_name"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_time",SWIG_FromCharPtr("checkpoint_time"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_restart_status",SWIG_FromCharPtr("checkpoint_restart_status"));
+  SWIG_Python_SetConstant(d, "ATTR_restart_name",SWIG_FromCharPtr("restart_name"));
+  SWIG_Python_SetConstant(d, "ATTR_comp_time",SWIG_FromCharPtr("comp_time"));
+  SWIG_Python_SetConstant(d, "ATTR_reported",SWIG_FromCharPtr("reported"));
+  SWIG_Python_SetConstant(d, "ATTR_intcmd",SWIG_FromCharPtr("inter_cmd"));
+  SWIG_Python_SetConstant(d, "ATTR_aclgren",SWIG_FromCharPtr("acl_group_enable"));
+  SWIG_Python_SetConstant(d, "ATTR_aclgroup",SWIG_FromCharPtr("acl_groups"));
+  SWIG_Python_SetConstant(d, "ATTR_aclhten",SWIG_FromCharPtr("acl_host_enable"));
+  SWIG_Python_SetConstant(d, "ATTR_aclhost",SWIG_FromCharPtr("acl_hosts"));
+  SWIG_Python_SetConstant(d, "ATTR_acluren",SWIG_FromCharPtr("acl_user_enable"));
+  SWIG_Python_SetConstant(d, "ATTR_acluser",SWIG_FromCharPtr("acl_users"));
+  SWIG_Python_SetConstant(d, "ATTR_altrouter",SWIG_FromCharPtr("alt_router"));
+  SWIG_Python_SetConstant(d, "ATTR_checkpoint_min",SWIG_FromCharPtr("checkpoint_min"));
+  SWIG_Python_SetConstant(d, "ATTR_enable",SWIG_FromCharPtr("enabled"));
+  SWIG_Python_SetConstant(d, "ATTR_fromroute",SWIG_FromCharPtr("from_route_only"));
+  SWIG_Python_SetConstant(d, "ATTR_hostlist",SWIG_FromCharPtr("hostlist"));
+  SWIG_Python_SetConstant(d, "ATTR_killdelay",SWIG_FromCharPtr("kill_delay"));
+  SWIG_Python_SetConstant(d, "ATTR_maxgrprun",SWIG_FromCharPtr("max_group_run"));
+  SWIG_Python_SetConstant(d, "ATTR_maxque",SWIG_FromCharPtr("max_queuable"));
+  SWIG_Python_SetConstant(d, "ATTR_maxuserque",SWIG_FromCharPtr("max_user_queuable"));
+  SWIG_Python_SetConstant(d, "ATTR_maxuserrun",SWIG_FromCharPtr("max_user_run"));
+  SWIG_Python_SetConstant(d, "ATTR_qtype",SWIG_FromCharPtr("queue_type"));
+  SWIG_Python_SetConstant(d, "ATTR_rescassn",SWIG_FromCharPtr("resources_assigned"));
+  SWIG_Python_SetConstant(d, "ATTR_rescdflt",SWIG_FromCharPtr("resources_default"));
+  SWIG_Python_SetConstant(d, "ATTR_rescmax",SWIG_FromCharPtr("resources_max"));
+  SWIG_Python_SetConstant(d, "ATTR_rescmin",SWIG_FromCharPtr("resources_min"));
+  SWIG_Python_SetConstant(d, "ATTR_rerunnable",SWIG_FromCharPtr("restartable"));
+  SWIG_Python_SetConstant(d, "ATTR_rndzretry",SWIG_FromCharPtr("rendezvous_retry"));
+  SWIG_Python_SetConstant(d, "ATTR_routedest",SWIG_FromCharPtr("route_destinations"));
+  SWIG_Python_SetConstant(d, "ATTR_routeheld",SWIG_FromCharPtr("route_held_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_routewait",SWIG_FromCharPtr("route_waiting_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_routeretry",SWIG_FromCharPtr("route_retry_time"));
+  SWIG_Python_SetConstant(d, "ATTR_routelife",SWIG_FromCharPtr("route_lifetime"));
+  SWIG_Python_SetConstant(d, "ATTR_rsvexpdt",SWIG_FromCharPtr("reserved_expedite"));
+  SWIG_Python_SetConstant(d, "ATTR_rsvsync",SWIG_FromCharPtr("reserved_sync"));
+  SWIG_Python_SetConstant(d, "ATTR_start",SWIG_FromCharPtr("started"));
+  SWIG_Python_SetConstant(d, "ATTR_count",SWIG_FromCharPtr("state_count"));
+  SWIG_Python_SetConstant(d, "ATTR_number",SWIG_FromCharPtr("number_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_acllogic",SWIG_FromCharPtr("acl_logic_or"));
+  SWIG_Python_SetConstant(d, "ATTR_aclgrpslpy",SWIG_FromCharPtr("acl_group_sloppy"));
+  SWIG_Python_SetConstant(d, "ATTR_keepcompleted",SWIG_FromCharPtr("keep_completed"));
+  SWIG_Python_SetConstant(d, "ATTR_disallowedtypes",SWIG_FromCharPtr("disallowed_types"));
+  SWIG_Python_SetConstant(d, "ATTR_is_transit",SWIG_FromCharPtr("is_transit"));
+  SWIG_Python_SetConstant(d, "ATTR_aclroot",SWIG_FromCharPtr("acl_roots"));
+  SWIG_Python_SetConstant(d, "ATTR_managers",SWIG_FromCharPtr("managers"));
+  SWIG_Python_SetConstant(d, "ATTR_dfltque",SWIG_FromCharPtr("default_queue"));
+  SWIG_Python_SetConstant(d, "ATTR_dispsvrsuffix",SWIG_FromCharPtr("display_job_server_suffix"));
+  SWIG_Python_SetConstant(d, "ATTR_jobsuffixalias",SWIG_FromCharPtr("job_suffix_alias"));
+  SWIG_Python_SetConstant(d, "ATTR_defnode",SWIG_FromCharPtr("default_node"));
+  SWIG_Python_SetConstant(d, "ATTR_locsvrs",SWIG_FromCharPtr("location_servers"));
+  SWIG_Python_SetConstant(d, "ATTR_logevents",SWIG_FromCharPtr("log_events"));
+  SWIG_Python_SetConstant(d, "ATTR_logfile",SWIG_FromCharPtr("log_file"));
+  SWIG_Python_SetConstant(d, "ATTR_loglevel",SWIG_FromCharPtr("log_level"));
+  SWIG_Python_SetConstant(d, "ATTR_mailfrom",SWIG_FromCharPtr("mail_from"));
+  SWIG_Python_SetConstant(d, "ATTR_nodepack",SWIG_FromCharPtr("node_pack"));
+  SWIG_Python_SetConstant(d, "ATTR_nodesuffix",SWIG_FromCharPtr("node_suffix"));
+  SWIG_Python_SetConstant(d, "ATTR_operators",SWIG_FromCharPtr("operators"));
+  SWIG_Python_SetConstant(d, "ATTR_queryother",SWIG_FromCharPtr("query_other_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_resccost",SWIG_FromCharPtr("resources_cost"));
+  SWIG_Python_SetConstant(d, "ATTR_rescavail",SWIG_FromCharPtr("resources_available"));
+  SWIG_Python_SetConstant(d, "ATTR_schedit",SWIG_FromCharPtr("scheduler_iteration"));
+  SWIG_Python_SetConstant(d, "ATTR_scheduling",SWIG_FromCharPtr("scheduling"));
+  SWIG_Python_SetConstant(d, "ATTR_status",SWIG_FromCharPtr("server_state"));
+  SWIG_Python_SetConstant(d, "ATTR_syscost",SWIG_FromCharPtr("system_cost"));
+  SWIG_Python_SetConstant(d, "ATTR_pingrate",SWIG_FromCharPtr("node_ping_rate"));
+  SWIG_Python_SetConstant(d, "ATTR_ndchkrate",SWIG_FromCharPtr("node_check_rate"));
+  SWIG_Python_SetConstant(d, "ATTR_tcptimeout",SWIG_FromCharPtr("tcp_timeout"));
+  SWIG_Python_SetConstant(d, "ATTR_jobstatrate",SWIG_FromCharPtr("job_stat_rate"));
+  SWIG_Python_SetConstant(d, "ATTR_polljobs",SWIG_FromCharPtr("poll_jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_downonerror",SWIG_FromCharPtr("down_on_error"));
+  SWIG_Python_SetConstant(d, "ATTR_disableserveridcheck",SWIG_FromCharPtr("disable_server_id_check"));
+  SWIG_Python_SetConstant(d, "ATTR_jobnanny",SWIG_FromCharPtr("job_nanny"));
+  SWIG_Python_SetConstant(d, "ATTR_ownerpurge",SWIG_FromCharPtr("owner_purge"));
+  SWIG_Python_SetConstant(d, "ATTR_qcqlimits",SWIG_FromCharPtr("queue_centric_limits"));
+  SWIG_Python_SetConstant(d, "ATTR_momjobsync",SWIG_FromCharPtr("mom_job_sync"));
+  SWIG_Python_SetConstant(d, "ATTR_maildomain",SWIG_FromCharPtr("mail_domain"));
+  SWIG_Python_SetConstant(d, "ATTR_pbsversion",SWIG_FromCharPtr("pbs_version"));
+  SWIG_Python_SetConstant(d, "ATTR_submithosts",SWIG_FromCharPtr("submit_hosts"));
+  SWIG_Python_SetConstant(d, "ATTR_allownodesubmit",SWIG_FromCharPtr("allow_node_submit"));
+  SWIG_Python_SetConstant(d, "ATTR_allowproxyuser",SWIG_FromCharPtr("allow_proxy_user"));
+  SWIG_Python_SetConstant(d, "ATTR_autonodenp",SWIG_FromCharPtr("auto_node_np"));
+  SWIG_Python_SetConstant(d, "ATTR_servername",SWIG_FromCharPtr("server_name"));
+  SWIG_Python_SetConstant(d, "ATTR_logfilemaxsize",SWIG_FromCharPtr("log_file_max_size"));
+  SWIG_Python_SetConstant(d, "ATTR_logfilerolldepth",SWIG_FromCharPtr("log_file_roll_depth"));
+  SWIG_Python_SetConstant(d, "ATTR_logkeepdays",SWIG_FromCharPtr("log_keep_days"));
+  SWIG_Python_SetConstant(d, "ATTR_nextjobnum",SWIG_FromCharPtr("next_job_number"));
+  SWIG_Python_SetConstant(d, "ATTR_extraresc",SWIG_FromCharPtr("extra_resc"));
+  SWIG_Python_SetConstant(d, "ATTR_schedversion",SWIG_FromCharPtr("sched_version"));
+  SWIG_Python_SetConstant(d, "ATTR_acctkeepdays",SWIG_FromCharPtr("accounting_keep_days"));
+  SWIG_Python_SetConstant(d, "ATTR_lockfile",SWIG_FromCharPtr("lock_file"));
+  SWIG_Python_SetConstant(d, "ATTR_credentiallifetime",SWIG_FromCharPtr("credential_lifetime"));
+  SWIG_Python_SetConstant(d, "ATTR_jobmustreport",SWIG_FromCharPtr("job_must_report"));
+  SWIG_Python_SetConstant(d, "ATTR_LockfileUpdateTime",SWIG_FromCharPtr("lock_file_update_time"));
+  SWIG_Python_SetConstant(d, "ATTR_LockfileCheckTime",SWIG_FromCharPtr("lock_file_check_time"));
+  SWIG_Python_SetConstant(d, "ATTR_npdefault",SWIG_FromCharPtr("np_default"));
+  SWIG_Python_SetConstant(d, "ATTR_jobstarttimeout",SWIG_FromCharPtr("job_start_timeout"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_state",SWIG_FromCharPtr("state"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_np",SWIG_FromCharPtr("np"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_properties",SWIG_FromCharPtr("properties"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_ntype",SWIG_FromCharPtr("ntype"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_jobs",SWIG_FromCharPtr("jobs"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_status",SWIG_FromCharPtr("status"));
+  SWIG_Python_SetConstant(d, "ATTR_NODE_note",SWIG_FromCharPtr("note"));
+  SWIG_Python_SetConstant(d, "ATTR_mailsubjectfmt",SWIG_FromCharPtr("mail_subject_fmt"));
+  SWIG_Python_SetConstant(d, "ATTR_mailbodyfmt",SWIG_FromCharPtr("mail_body_fmt"));
+  SWIG_Python_SetConstant(d, "CHECKPOINT_UNSPECIFIED",SWIG_FromCharPtr("u"));
+  SWIG_Python_SetConstant(d, "NO_HOLD",SWIG_FromCharPtr("n"));
+  SWIG_Python_SetConstant(d, "NO_JOIN",SWIG_FromCharPtr("n"));
+  SWIG_Python_SetConstant(d, "NO_KEEP",SWIG_FromCharPtr("n"));
+  SWIG_Python_SetConstant(d, "MAIL_AT_ABORT",SWIG_FromCharPtr("a"));
+  SWIG_Python_SetConstant(d, "DELDELAY",SWIG_FromCharPtr("deldelay="));
+  SWIG_Python_SetConstant(d, "DELPURGE",SWIG_FromCharPtr("delpurge="));
+  SWIG_Python_SetConstant(d, "PURGECOMP",SWIG_FromCharPtr("purgecomplete="));
+  SWIG_Python_SetConstant(d, "EXECQUEONLY",SWIG_FromCharPtr("exec_queue_only"));
+  SWIG_Python_SetConstant(d, "RERUNFORCE",SWIG_FromCharPtr("force"));
+  SWIG_Python_SetConstant(d, "USER_HOLD",SWIG_FromCharPtr("u"));
+  SWIG_Python_SetConstant(d, "OTHER_HOLD",SWIG_FromCharPtr("o"));
+  SWIG_Python_SetConstant(d, "SYSTEM_HOLD",SWIG_FromCharPtr("s"));
+  SWIG_Python_SetConstant(d, "ND_free",SWIG_FromCharPtr("free"));
+  SWIG_Python_SetConstant(d, "ND_offline",SWIG_FromCharPtr("offline"));
+  SWIG_Python_SetConstant(d, "ND_down",SWIG_FromCharPtr("down"));
+  SWIG_Python_SetConstant(d, "ND_reserve",SWIG_FromCharPtr("reserve"));
+  SWIG_Python_SetConstant(d, "ND_job_exclusive",SWIG_FromCharPtr("job-exclusive"));
+  SWIG_Python_SetConstant(d, "ND_job_sharing",SWIG_FromCharPtr("job-sharing"));
+  SWIG_Python_SetConstant(d, "ND_busy",SWIG_FromCharPtr("busy"));
+  SWIG_Python_SetConstant(d, "ND_state_unknown",SWIG_FromCharPtr("state-unknown"));
+  SWIG_Python_SetConstant(d, "ND_timeshared",SWIG_FromCharPtr("time-shared"));
+  SWIG_Python_SetConstant(d, "ND_cluster",SWIG_FromCharPtr("cluster"));
+  SWIG_Python_SetConstant(d, "Q_DT_batch",SWIG_FromCharPtr("batch"));
+  SWIG_Python_SetConstant(d, "Q_DT_interactive",SWIG_FromCharPtr("interactive"));
+  SWIG_Python_SetConstant(d, "Q_DT_rerunable",SWIG_FromCharPtr("rerunable"));
+  SWIG_Python_SetConstant(d, "Q_DT_nonrerunable",SWIG_FromCharPtr("nonrerunable"));
+  SWIG_Python_SetConstant(d, "Q_DT_fault_tolerant",SWIG_FromCharPtr("fault_tolerant"));
+  SWIG_Python_SetConstant(d, "Q_DT_fault_intolerant",SWIG_FromCharPtr("fault_intolerant"));
+  SWIG_Python_SetConstant(d, "Q_DT_job_array",SWIG_FromCharPtr("job_array"));
+  SWIG_Python_SetConstant(d, "MAX_ENCODE_BFR",SWIG_From_int((int)(100)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_CREATE",SWIG_From_int((int)(0)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_DELETE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_SET",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_UNSET",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_LIST",SWIG_From_int((int)(4)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_PRINT",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "MGR_CMD_ACTIVE",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_NONE",SWIG_From_int((int)(-1)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_SERVER",SWIG_From_int((int)(0)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_QUEUE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_JOB",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "MGR_OBJ_NODE",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "MSG_OUT",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "MSG_ERR",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "SHUT_SIG",SWIG_From_int((int)(-1)));
+  SWIG_Python_SetConstant(d, "SHUT_IMMEDIATE",SWIG_From_int((int)(0)));
+  SWIG_Python_SetConstant(d, "SHUT_DELAY",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "SHUT_QUICK",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "SIG_RESUME",SWIG_FromCharPtr("resume"));
+  SWIG_Python_SetConstant(d, "SIG_SUSPEND",SWIG_FromCharPtr("suspend"));
+  SWIG_Python_SetConstant(d, "PBS_MAXHOSTNAME",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "MAXPATHLEN",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "MAXNAMLEN",SWIG_From_int((int)(255)));
+  SWIG_Python_SetConstant(d, "MAX_NOTE",SWIG_From_int((int)(256)));
+  SWIG_Python_SetConstant(d, "MAX_NOTE_STR",SWIG_FromCharPtr("256"));
+  SWIG_Python_SetConstant(d, "PBS_MAXUSER",SWIG_From_int((int)(32)));
+  SWIG_Python_SetConstant(d, "PBS_MAXGRPN",SWIG_From_int((int)(16)));
+  SWIG_Python_SetConstant(d, "PBS_MAXQUEUENAME",SWIG_From_int((int)(15)));
+  SWIG_Python_SetConstant(d, "PBS_MAXSERVERNAME",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "PBS_MAXJOBARRAYLEN",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "PBS_MAXSEQNUM",SWIG_From_int((int)(8)));
+  SWIG_Python_SetConstant(d, "PBS_MAXPORTNUM",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "PBS_MAXJOBARRAY",SWIG_From_int((int)(99999)));
+  SWIG_Python_SetConstant(d, "PBS_MAXSVRJOBID",SWIG_From_int((int)((8+1024+5+6+2))));
+  SWIG_Python_SetConstant(d, "PBS_MAXCLTJOBID",SWIG_From_int((int)(((8+1024+5+6+2) +1024+5+6+2))));
+  SWIG_Python_SetConstant(d, "PBS_MAXDEST",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "PBS_MAXROUTEDEST",SWIG_From_int((int)((15+1024+5+2))));
+  SWIG_Python_SetConstant(d, "PBS_USE_IFF",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "PBS_INTERACTIVE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "PBS_TERM_BUF_SZ",SWIG_From_int((int)(80)));
+  SWIG_Python_SetConstant(d, "PBS_TERM_CCA",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "PBS_QS_VERSION_BASE",SWIG_From_int((int)(0x00020300)));
+  SWIG_Python_SetConstant(d, "PBS_QS_VERSION_INT",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "PBS_QS_VERSION",SWIG_From_int((int)((0x00020300+1))));
+  SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_NAME",SWIG_FromCharPtr("pbs"));
+  SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_PORT",SWIG_From_int((int)(15001)));
+  SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_NAME_DIS",SWIG_FromCharPtr("pbs_dis"));
+  SWIG_Python_SetConstant(d, "PBS_BATCH_SERVICE_PORT_DIS",SWIG_From_int((int)(15001)));
+  SWIG_Python_SetConstant(d, "PBS_MOM_SERVICE_NAME",SWIG_FromCharPtr("pbs_mom"));
+  SWIG_Python_SetConstant(d, "PBS_MOM_SERVICE_PORT",SWIG_From_int((int)(15002)));
+  SWIG_Python_SetConstant(d, "PBS_MANAGER_SERVICE_NAME",SWIG_FromCharPtr("pbs_resmon"));
+  SWIG_Python_SetConstant(d, "PBS_MANAGER_SERVICE_PORT",SWIG_From_int((int)(15003)));
+  SWIG_Python_SetConstant(d, "PBS_SCHEDULER_SERVICE_NAME",SWIG_FromCharPtr("pbs_sched"));
+  SWIG_Python_SetConstant(d, "PBS_SCHEDULER_SERVICE_PORT",SWIG_From_int((int)(15004)));
+  SWIG_Python_SetConstant(d, "CHECKPOINTHOLD",SWIG_FromCharPtr("checkpoint_hold"));
+  SWIG_Python_SetConstant(d, "CHECKPOINTCONT",SWIG_FromCharPtr("checkpoint_cont"));
+  SWIG_Python_SetConstant(d, "MOM_DEFAULT_CHECKPOINT_DIR",SWIG_FromCharPtr("$MOMDEFAULTCHECKPOINTDIR$"));
+  SWIG_Python_SetConstant(d, "SET",SWIG_From_int((int)(SET)));
+  SWIG_Python_SetConstant(d, "UNSET",SWIG_From_int((int)(UNSET)));
+  SWIG_Python_SetConstant(d, "INCR",SWIG_From_int((int)(INCR)));
+  SWIG_Python_SetConstant(d, "DECR",SWIG_From_int((int)(DECR)));
+  SWIG_Python_SetConstant(d, "EQ",SWIG_From_int((int)(EQ)));
+  SWIG_Python_SetConstant(d, "NE",SWIG_From_int((int)(NE)));
+  SWIG_Python_SetConstant(d, "GE",SWIG_From_int((int)(GE)));
+  SWIG_Python_SetConstant(d, "GT",SWIG_From_int((int)(GT)));
+  SWIG_Python_SetConstant(d, "LE",SWIG_From_int((int)(LE)));
+  SWIG_Python_SetConstant(d, "LT",SWIG_From_int((int)(LT)));
+  SWIG_Python_SetConstant(d, "DFLT",SWIG_From_int((int)(DFLT)));
+  SWIG_Python_SetConstant(d, "MERGE",SWIG_From_int((int)(MERGE)));
+  PyDict_SetItemString(d,(char*)"cvar", SWIG_globals());
+  SWIG_addvarlink(SWIG_globals(),(char*)"pbs_errno",Swig_var_pbs_errno_get, Swig_var_pbs_errno_set);
+  SWIG_addvarlink(SWIG_globals(),(char*)"pbs_server",Swig_var_pbs_server_get, Swig_var_pbs_server_set);
+  SWIG_Python_SetConstant(d, "LOG_BUF_SIZE",SWIG_From_int((int)(16384)));
+  SWIG_Python_SetConstant(d, "LOG_EMERG",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "LOG_ALERT",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "LOG_CRIT",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "LOG_ERR",SWIG_From_int((int)(4)));
+  SWIG_Python_SetConstant(d, "LOG_WARNING",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "LOG_NOTICE",SWIG_From_int((int)(7)));
+  SWIG_Python_SetConstant(d, "LOG_INFO",SWIG_From_int((int)(8)));
+  SWIG_Python_SetConstant(d, "LOG_DEBUG",SWIG_From_int((int)(9)));
+  SWIG_addvarlink(SWIG_globals(),(char*)"log_event_mask",Swig_var_log_event_mask_get, Swig_var_log_event_mask_set);
+  SWIG_addvarlink(SWIG_globals(),(char*)"chk_file_sec_stderr",Swig_var_chk_file_sec_stderr_get, Swig_var_chk_file_sec_stderr_set);
+  SWIG_addvarlink(SWIG_globals(),(char*)"log_buffer",Swig_var_log_buffer_get, Swig_var_log_buffer_set);
+  SWIG_Python_SetConstant(d, "PBSEVENT_ERROR",SWIG_From_int((int)(0x0001)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_SYSTEM",SWIG_From_int((int)(0x0002)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_ADMIN",SWIG_From_int((int)(0x0004)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_JOB",SWIG_From_int((int)(0x0008)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_JOB_USAGE",SWIG_From_int((int)(0x0010)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_SECURITY",SWIG_From_int((int)(0x0020)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_SCHED",SWIG_From_int((int)(0x0040)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_DEBUG",SWIG_From_int((int)(0x0080)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_DEBUG2",SWIG_From_int((int)(0x0100)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_FORCE",SWIG_From_int((int)(0x8000)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_SERVER",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_QUEUE",SWIG_From_int((int)(2)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_JOB",SWIG_From_int((int)(3)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_REQUEST",SWIG_From_int((int)(4)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_FILE",SWIG_From_int((int)(5)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_ACCT",SWIG_From_int((int)(6)));
+  SWIG_Python_SetConstant(d, "PBS_EVENTCLASS_NODE",SWIG_From_int((int)(7)));
+  SWIG_Python_SetConstant(d, "PBSEVENT_MASK",SWIG_From_int((int)(0x01ff)));
+  SWIG_Python_SetConstant(d, "MAX_PATH_LEN",SWIG_From_int((int)(1024)));
+  SWIG_Python_SetConstant(d, "SECS_PER_DAY",SWIG_From_int((int)(86400)));
+  SWIG_Python_SetConstant(d, "TRUE",SWIG_From_int((int)(1)));
+  SWIG_Python_SetConstant(d, "FALSE",SWIG_From_int((int)(0)));
+  SWIG_addvarlink(SWIG_globals(),(char*)"msg_daemonname",Swig_var_msg_daemonname_get, Swig_var_msg_daemonname_set);
+#if PY_VERSION_HEX >= 0x03000000
+  return m;
+#else
+  return;
+#endif
+}
+
Index: /tags/4.6.0/src/C/rm.h
===================================================================
--- /tags/4.6.0/src/C/rm.h	(revision 342)
+++ /tags/4.6.0/src/C/rm.h	(revision 342)
@@ -0,0 +1,94 @@
+/*
+*         OpenPBS (Portable Batch System) v2.3 Software License
+*
+* Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+* All rights reserved.
+*
+* ---------------------------------------------------------------------------
+* For a license to use or redistribute the OpenPBS software under conditions
+* other than those described below, or to purchase support for this software,
+* please contact Veridian Systems, PBS Products Department ("Licensor") at:
+*
+*    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+*                        877 902-4PBS (US toll-free)
+* ---------------------------------------------------------------------------
+*
+* This license covers use of the OpenPBS v2.3 software (the "Software") at
+* your site or location, and, for certain users, redistribution of the
+* Software to other sites and locations.  Use and redistribution of
+* OpenPBS v2.3 in source and binary forms, with or without modification,
+* are permitted provided that all of the following conditions are met.
+* After December 31, 2001, only conditions 3-6 must be met:
+*
+* 1. Commercial and/or non-commercial use of the Software is permitted
+*    provided a current software registration is on file at www.OpenPBS.org.
+*    If use of this software contributes to a publication, product, or
+*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
+*
+* 2. Redistribution in any form is only permitted for non-commercial,
+*    non-profit purposes.  There can be no charge for the Software or any
+*    software incorporating the Software.  Further, there can be no
+*    expectation of revenue generated as a consequence of redistributing
+*    the Software.
+*
+* 3. Any Redistribution of source code must retain the above copyright notice
+*    and the acknowledgment contained in paragraph 6, this list of conditions
+*    and the disclaimer contained in paragraph 7.
+*
+* 4. Any Redistribution in binary form must reproduce the above copyright
+*    notice and the acknowledgment contained in paragraph 6, this list of
+*    conditions and the disclaimer contained in paragraph 7 in the
+*    documentation and/or other materials provided with the distribution.
+*
+* 5. Redistributions in any form must be accompanied by information on how to
+*    obtain complete source code for the OpenPBS software and any
+*    modifications and/or additions to the OpenPBS software.  The source code
+*    must either be included in the distribution or be available for no more
+*    than the cost of distribution plus a nominal fee, and all modifications
+*    and additions to the Software must be freely redistributable by any party
+*    (including Licensor) without restriction.
+*
+* 6. All advertising materials mentioning features or use of the Software must
+*    display the following acknowledgment:
+*
+*     "This product includes software developed by NASA Ames Research Center,
+*     Lawrence Livermore National Laboratory, and Veridian Information
+*     Solutions, Inc.
+*     Visit www.OpenPBS.org for OpenPBS software support,
+*     products, and information."
+*
+* 7. DISCLAIMER OF WARRANTY
+*
+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+* ARE EXPRESSLY DISCLAIMED.
+*
+* IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+* U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* This license will be governed by the laws of the Commonwealth of Virginia,
+* without reference to its choice of law rules.
+*/
+
+/*
+** Header file defineing the library calls for connecting
+** to the resource monitor.
+*/
+
+int openrm(char *, unsigned int);
+int closerm(int);
+int downrm(int);
+int configrm(int, char *);
+int addreq(int, char *);
+int allreq(char *);
+char* getreq(int);
+int flushreq(void);
+int activereq(void);
+void fullresp(int);
Index: /tags/4.6.0/src/PBSQuery.py
===================================================================
--- /tags/4.6.0/src/PBSQuery.py	(revision 342)
+++ /tags/4.6.0/src/PBSQuery.py	(revision 342)
@@ -0,0 +1,629 @@
+#
+# Authors: Roy Dragseth (roy.dragseth@cc.uit.no)
+#          Bas van der Vlies (basv@sara.nl)
+#
+# SVN INFO:
+#   $Id$
+#
+"""
+Usage: from PBSQuery import PBSQuery
+
+This class gets the info from the pbs_server via the pbs.py module
+for the several batch objects. All get..() functions return an dictionary
+with id as key and batch object as value
+
+There are four batch objects:
+ - server
+ - queue
+ - job
+ - node
+
+Each object can be handled as an dictionary and has several member
+functions. The second parameter is an python list and can be used if you
+are only interested in certain resources, see example
+
+There are the following functions for PBSQuery:
+  job -
+    getjob(job_id, attributes=<default is all>)
+    getjobs(attributes=<default is all>)
+
+  node -
+    getnode(node_id, attributes=<default is all>)
+    getnodes(attributes=<default is all>)
+
+  queue -
+    getqueue(queue_id, attributes=<default is all>)
+    getqueues(attributes=<default is all>)
+
+  server -
+    get_serverinfo(attributes=<default is all>)
+
+Here is an example how to use the module:
+    from PBSQuery import PBSQuery
+    p = PBSQuery()
+    nodes = p.getnodes()
+    for name,node in nodes.items():
+        print name
+        if node.is_free():
+           print node, node['state']
+
+    l = [ 'state', 'np' ]
+    nodes = p.getnodes(l)
+    for name,node in nodes.items():
+           print node, node['state']
+
+The parameter 'attributes' is an python list of resources that
+you are interested in, eg: only show state of nodes
+        l = list()
+    l.append('state')
+    nodes = p.getnodes(l)
+"""
+import pbs
+import UserDict
+import string
+import sys
+import re
+import types
+
+
+REG_SUBRANGE = re.compile(r'^\d+(-\d+)?$')
+"""
+>>> b='rectime=1424696750,macaddr=40:a8:f0:2f:17:f4,cpuclock=Fixed,varattr=,jobs=419[1].master(cput=236745,energy_used=0,mem=6562224kb,vmem=7391872kb,walltime=22647,session_id=15941) 446[1].master(cput=7385,energy_used=0,mem=202936kb,vmem=368184kb,walltime=7391,session_id=30940) 446[2].master(cput=7385,energy_used=0,mem=204016kb,vmem=368184kb,walltime=7387,session_id=31168) 446[3].master(cput=7384,energy_used=0,mem=202380kb,vmem=368184kb,walltime=7387,session_id=31344) 446[4].master(cput=7384,energy_used=0,mem=204108kb,vmem=368184kb,walltime=7386,session_id=31536) 446[5].master(cput=7384,energy_used=0,mem=203940kb,vmem=368184kb,walltime=7386,session_id=31718) 446[6].master(cput=7383,energy_used=0,mem=188720kb,vmem=352608kb,walltime=7386,session_id=31904),state=free,size=456341748kb:459945088kb,netload=587288451179,gres=,loadave=18.07,ncpus=24,physmem=65850220kb,availmem=77961112kb,totmem=86821736kb,idletime=13933,nusers=1,nsessions=7,sessions=31904 31718 31536 31344 31168 30940 15941,uname=Linux node24 3.10.0 #1 SMP Wed Feb 4 08:16:54 CET 2015 x86_64,opsys=linux'
+>>> c=','.join([x[1] for x in re.compile(r'((:?[^,(]+(?:\(.*?\))?))(?:,|$)').findall(b)])
+>>> c == b
+True
+
+"""
+REG_SPLIT_COMMA_BRACE = re.compile(r'((:?[^,(]+(?:\(.*?\))?))(?:,|$)')
+"""
+>>> d='jobs=419[1].master(cput=236745,energy_used=0,mem=6562224kb,vmem=7391872kb,walltime=22647,session_id=15941) 446[1].master(cput=7385,energy_used=0,mem=202936kb,vmem=368184kb,walltime=7391,session_id=30940) 446[2].master(cput=7385,energy_used=0,mem=204016kb,vmem=368184kb,walltime=7387,session_id=31168) 446[3].master(cput=7384,energy_used=0,mem=202380kb,vmem=368184kb,walltime=7387,session_id=31344) 446[4].master(cput=7384,energy_used=0,mem=204108kb,vmem=368184kb,walltime=7386,session_id=31536) 446[5].master(cput=7384,energy_used=0,mem=203940kb,vmem=368184kb,walltime=7386,session_id=31718) 446[6].master(cput=7383,energy_used=0,mem=188720kb,vmem=352608kb,walltime=7386,session_id=31904)'
+>>> e='='.join([x[1] for x in re.compile(r'((:?[^=(]+(?:\(.*?\))?))(?:=|$)').findall(d)])
+>>> d == e
+True
+"""
+REG_SPLIT_EQUAL_BRACE = re.compile(r'((:?[^=(]+(?:\(.*?\))?))(?:=|$)')
+
+JOB_RE = re.compile('(?:^|,)(?:((?:[\d,-]+)?\d+)/)?(.+)')
+
+
+def convert_range(rangetxt):
+    """
+    Convert range string into list of id strings: eg.g '3,5,7-9' -> ['3','5','7','8','9']
+    """
+    ids=[]
+    for subrange in [r.split('-') for r in rangetxt.split(',')]:
+        start = int(subrange[0])
+        if(len(subrange) == 2 ):
+            end = int(subrange[1]) + 1
+        else:
+            end = start + 1
+        ids.extend([str(i) for i in range(start,end)])
+    return ids
+
+
+class PBSError(Exception):
+    def __init__(self, msg=''):
+        self.msg = msg
+        Exception.__init__(self, msg)
+
+    def __repr__(self):
+        return self.msg
+
+    __str__ = __repr__
+
+
+class PBSQuery:
+
+    # a[key] = value, key and value are data type string
+    #
+    OLD_DATA_STRUCTURE = False
+
+    def __init__(self, server=None):
+        if not server:
+            self.server = pbs.pbs_default()
+        else:
+            self.server = server
+
+        self._connect()
+        ## this is needed for getjob a jobid is made off:
+        #    sequence_number.server (is not self.server)
+        #
+        self.job_server_id = list(self.get_serverinfo())[0]
+        self._disconnect()
+
+
+    def _connect(self):
+        """Connect to the PBS/Torque server"""
+        self.con = pbs.pbs_connect(self.server)
+        if self.con < 0:
+            str = "Could not make a connection with %s\n" %(self.server)
+            raise PBSError(str)
+
+    def _disconnect(self):
+        """Close the PBS/Torque connection"""
+        pbs.pbs_disconnect(self.con)
+        self.attribs = 'NULL'
+
+    def _list_2_attrib(self, list):
+        """Convert a python list to an attrib list suitable for pbs"""
+        self.attribs = pbs.new_attrl( len(list) )
+        i = 0
+        for attrib in list:
+            # So we can user Resource
+            attrib = attrib.split('.')
+            self.attribs[i].name = attrib[0]
+            i = i + 1
+
+    def _pbsstr_2_list(self, str, delimiter):
+        """Convert a string to a python list and use delimiter as spit char"""
+        l = sting.splitfields(str, delimiter)
+        if len(l) > 1:
+            return l
+
+    def _list_2_dict(self, l, class_func):
+        """
+        Convert a pbsstat function list to a class dictionary, The
+        data structure depends on the function new_data_structure().
+
+        Default data structure is:
+            class[key] = value, Where key and value are of type string
+
+        Future release, can be set by new_data_structure():
+            - class[key] = value where value can be:
+              1. a list of values of type string
+              2. a dictionary with as list of values of type string. If
+                 values contain a '=' character
+
+          eg:
+                print node['np']
+                >> [ '2' ]
+
+                print node['status']['arch']
+                >> [ 'x86_64' ]
+        """
+        self.d = {}
+        for item in l:
+            new = class_func()
+
+            self.d[item.name] = new
+
+            new.name = item.name
+
+            for a in item.attribs:
+
+                if self.OLD_DATA_STRUCTURE:
+
+                    if a.resource:
+                        key = '%s.%s' %(a.name, a.resource)
+                    else:
+                        key = '%s' %(a.name)
+
+                    new[key] = a.value
+
+                else:
+                    # Don't split , between ()
+                    values = [x[1] for x in REG_SPLIT_COMMA_BRACE.findall(a.value)]
+
+                    # We must creat sub dicts, only for specified
+                    # key values
+                    #
+                    if a.name in ['status', 'Variable_List']:
+
+                        for v in values:
+
+                            # Don't split between ()
+                            tmp_l = [x[1] for x in REG_SPLIT_EQUAL_BRACE.findall(v)]
+
+                            ## Support for multiple EVENT mesages in format [key=value:]+
+                            #  format eg: message=EVENT:sample.time=1288864220.003,EVENT:kernel=upgrade,cputotals.user=0
+                            #             message=ERROR <text>
+                            #
+                            if tmp_l[0] in ['message']:
+
+                                if tmp_l[1].startswith('EVENT:'):
+
+                                    tmp_d  = dict()
+                                    new['event'] = class_func(tmp_d)
+
+                                    message_list = v.split(':')
+                                    for event_type in message_list[1:]:
+                                        tmp_l = event_type.split('=')
+                                        new['event'][ tmp_l[0] ] = tmp_l[1:]
+
+                                else:
+
+                                    ## ERROR message
+                                    #
+                                    new['error'] = tmp_l [1:]
+
+                            elif tmp_l[0].startswith('EVENT:'):
+
+                                  message_list = v.split(':')
+                                  for event_type in message_list[1:]:
+                                      tmp_l = event_type.split('=')
+                                      new['event'][ tmp_l[0] ] = tmp_l[1:]
+
+                            else:
+                                  ## Check if we already added the key
+                                  #
+                                  if new.has_key(a.name):
+
+                                      new[a.name][ tmp_l[0] ] = tmp_l[1:]
+
+                                  else:
+
+                                      tmp_d  = dict()
+                                      tmp_d[ tmp_l[0] ] = tmp_l[1:]
+                                      new[a.name] = class_func(tmp_d)
+
+                    else:
+
+                        ## Check if it is a resource type variable, eg:
+                        #  - Resource_List.(nodes, walltime, ..)
+                        #
+                        if a.resource:
+
+                            if new.has_key(a.name):
+                                new[a.name][a.resource] = values
+
+                            else:
+                                tmp_d = dict()
+                                tmp_d[a.resource] = values
+                                new[a.name] = class_func(tmp_d)
+                        else:
+                            # Simple value
+                            #
+                            new[a.name] = values
+
+        self._free(l)
+
+    def _free(self, memory):
+        """
+        freeing up used memmory
+
+        """
+        pbs.pbs_statfree(memory)
+
+    def _statserver(self, attrib_list=None):
+        """Get the server config from the pbs server"""
+        if attrib_list:
+            self._list_2_attrib(attrib_list)
+        else:
+            self.attribs = 'NULL'
+
+        self._connect()
+        serverinfo = pbs.pbs_statserver(self.con, self.attribs, 'NULL')
+        self._disconnect()
+
+        self._list_2_dict(serverinfo, server)
+
+    def get_serverinfo(self, attrib_list=None):
+        self._statserver(attrib_list)
+        return self.d
+
+    def _statqueue(self, queue_name='', attrib_list=None):
+        """Get the queue config from the pbs server"""
+        if attrib_list:
+            self._list_2_attrib(attrib_list)
+        else:
+            self.attribs = 'NULL'
+
+        self._connect()
+        queues = pbs.pbs_statque(self.con, queue_name, self.attribs, 'NULL')
+        self._disconnect()
+
+        self._list_2_dict(queues, queue)
+
+    def getqueue(self, name, attrib_list=None):
+        self._statqueue(name, attrib_list)
+        try:
+            return self.d[name]
+        except KeyError, detail:
+            return self.d
+
+    def getqueues(self, attrib_list=None):
+        self._statqueue('', attrib_list)
+        return self.d
+
+    def _statnode(self, select='', attrib_list=None, property=None):
+        """Get the node config from the pbs server"""
+        if attrib_list:
+            self._list_2_attrib(attrib_list)
+        else:
+            self.attribs = 'NULL'
+
+        if property:
+            select = ':%s' %(property)
+
+        self._connect()
+        nodes = pbs.pbs_statnode(self.con, select, self.attribs, 'NULL')
+        self._disconnect()
+
+        self._list_2_dict(nodes, node)
+
+    def getnode(self, name, attrib_list=None):
+        self._statnode(name, attrib_list)
+        try:
+            return self.d[name]
+        except KeyError, detail:
+            return self.d
+
+    def getnodes(self, attrib_list=None):
+        self._statnode('', attrib_list)
+        return self.d
+
+    def getnodes_with_property(self, property, attrib_list=None):
+        self._statnode('', attrib_list, property)
+        return self.d
+
+    def _statjob(self, job_name='', attrib_list=None):
+        """Get the job config from the pbs server"""
+        if attrib_list:
+            self._list_2_attrib(attrib_list)
+        else:
+            self.attribs = 'NULL'
+
+        self._connect()
+        jobs = pbs.pbs_statjob(self.con, job_name, self.attribs, 'NULL')
+        self._disconnect()
+
+        self._list_2_dict(jobs, job)
+
+    def getjob(self, name, attrib_list=None):
+        ## To make sure we use the full name of a job; Changes a name
+        # like 1234567 into 1234567.job_server_id
+        #
+        if len(name.split('.')) == 1 :
+            name = name.split('.')[0] + "." + self.job_server_id
+
+        self._statjob(name, attrib_list)
+        try:
+            return self.d[name]
+        except KeyError, detail:
+            return self.d
+
+    def getjobs(self, attrib_list=None):
+        self._statjob('', attrib_list)
+        return self.d
+
+    def get_server_name(self):
+        return self.server
+
+    def new_data_structure(self):
+        """
+        Use the new data structure. Is now the default
+        """
+        self.OLD_DATA_STRUCTURE = False
+
+    def old_data_structure(self):
+        """
+        Use the old data structure. This function is obselete and
+        will be removed in a future release
+        """
+        self.OLD_DATA_STRUCTURE = True
+
+class _PBSobject(UserDict.UserDict):
+    TRUE  = 1
+    FALSE = 0
+
+    def __init__(self, dictin = None):
+        UserDict.UserDict.__init__(self)
+        self.name = None
+
+        if dictin:
+            if dictin.has_key('name'):
+                self.name = dictin['name']
+                del dictin['name']
+            self.data = dictin
+
+    def get_value(self, key):
+        if self.has_key(key):
+            return self[key]
+        else:
+            return None
+
+    def __repr__(self):
+        return repr(self.data)
+
+    def __str__(self):
+        return str(self.data)
+
+    def __getattr__(self, name):
+        """
+        override the class attribute get method. Return the value
+        from the Userdict
+        """
+        try:
+            return self.data[name]
+        except KeyError:
+            error = 'Attribute key error: %s' %(name)
+            raise PBSError(error)
+
+    def __iter__(self):
+        return iter(self.data.keys())
+
+    def __nonzero__(self):
+        if self.data:
+            return True
+        else:
+            return False
+
+    def uniq(self, list):
+        """Filter out unique items of a list"""
+        uniq_items = {}
+        for item in list:
+            uniq_items[item] = 1
+        return uniq_items.keys()
+
+    def return_value(self, key):
+        """Function that returns a value independent of new or old data structure"""
+        if isinstance(self[key], types.ListType):
+            return self[key][0]
+        else:
+            return self[key]
+
+class job(_PBSobject):
+    """PBS job class"""
+    def is_running(self):
+
+        value = self.return_value('job_state')
+        if value == 'Q':
+            return self.TRUE
+        else:
+            return self.FALSE
+
+    def get_nodes(self, unique=None):
+        """
+        Returns a list of the nodes which run this job
+        format:
+          * exec_host: gb-r10n14/5+gb-r10n14/4+gb-r10n14/3+gb-r10n14/2+gb-r10n14/1+gb-r10n14/0
+          * split on '+' and if uniq is set split on '/'
+        """
+        nodes = self.get_value('exec_host')
+        if not nodes:
+            return list()
+
+        if isinstance(nodes, str):
+            nodelist = string.split(nodes,'+')
+        else:
+            nodelist = []
+            for n in nodes:
+                if REG_SUBRANGE.search(n):
+                    # This is a range split by _list_2_dict in a list
+                    # E.g. exec_host node1/4,5,8-9 is after _list_dict ['node1/4', '5', '8-9']
+                    # Re-join them with the last node
+                    nodelist[-1] += ',%s' % n
+                else:
+                    nodelist.extend(n.split('+'))
+
+        res=[]
+        for n in nodelist:
+            t = string.split(n,'/')
+
+            if not unique:
+                res.extend(["%s/%s" % (t[0],i) for i in convert_range(t[1])])
+            else:
+                if t[0] not in res:
+                    res.append(t[0])
+
+        return res
+
+
+class node(_PBSobject):
+    """PBS node class"""
+
+    def is_free(self):
+        """Check if node is free"""
+
+        value = self.return_value('state')
+        if value == 'free':
+            return self.TRUE
+        else:
+            return self.FALSE
+
+    def has_job(self):
+        """Does the node run a job"""
+        try:
+            a = self['jobs']
+            return self.TRUE
+        except KeyError, detail:
+            return self.FALSE
+
+    def get_jobs(self, unique=None):
+        """Returns a list of the currently running job-id('s) on the node"""
+
+        jobs = self.get_value('jobs')
+        if not jobs:
+            return list()
+
+        if isinstance(jobs, str):
+            jlist = re.compile('[^\\ /]\\d+[^/.]').findall( jobs )
+
+            if not unique:
+                return jlist
+            else:
+                return self.uniq(jlist)
+
+        else:
+            # Support id ranges before job id
+            joblist = []
+            # Jobs might be splitted in ranges, but here _list_2_dict does
+            # 1,3,7-9/jobid -> ['1','3','7-9/jobid']
+            # Process in reverse order
+            for j in jobs[::-1]:
+                if REG_SUBRANGE.search(j):
+                    joblist[-1] = '%s,%s' % (j, joblist[-1])
+                else:
+                    joblist.append(j)
+            
+            # extend with nodes
+            l = []
+            
+            for j in joblist[::-1]:
+                r=JOB_RE.search(j)
+                # 1st match is range, second part is jobid
+                jobstr=r.groups()[1]
+                if unique:
+                    if jobstr not in l:
+                        l.append(jobstr)
+                else:
+                    l.extend(["%s/%s"%(i,jobstr) for i in convert_range(r.groups()[0])])
+                    
+            return l
+
+
+class queue(_PBSobject):
+    """PBS queue class"""
+    def is_enabled(self):
+
+        value = self.return_value('enabled')
+        if value == 'True':
+            return self.TRUE
+        else:
+            return self.FALSE
+
+    def is_execution(self):
+
+        value = self.return_value('queue_type')
+        if value == 'Execution':
+            return self.TRUE
+        else:
+            return self.FALSE
+
+class server(_PBSobject):
+    """PBS server class"""
+
+    def get_version(self):
+        return self.get_value('pbs_version')
+
+def main():
+    p = PBSQuery() 
+    serverinfo = p.get_serverinfo()
+    for server in serverinfo.keys():
+        print server, ' version: ', serverinfo[server].get_version()
+    for resource in serverinfo[server].keys():
+        print '\t ', resource, ' = ', serverinfo[server][resource]
+
+    queues = p.getqueues()
+    for queue in queues.keys():
+        print queue
+        if queues[queue].is_execution():
+            print '\t ', queues[queue]
+        if queues[queue].has_key('acl_groups'):
+            print '\t acl_groups: yes'
+        else:
+            print '\t acl_groups: no'
+
+    jobs = p.getjobs()
+    for name,job in jobs.items():
+        if job.is_running():
+            print job
+
+    l = ['state']
+    nodes = p.getnodes(l)
+    for name,node in nodes.items():
+        if node.is_free(): 
+            print node
+
+if __name__ == "__main__":
+    main()
Index: /tags/4.6.0/src/PBSacct.py
===================================================================
--- /tags/4.6.0/src/PBSacct.py	(revision 342)
+++ /tags/4.6.0/src/PBSacct.py	(revision 342)
@@ -0,0 +1,212 @@
+#!/usr/bin/env python
+#
+"""
+ Author: Bas van der Vlies
+ Date  : 1 June 2012
+ Desc. : Standard python module to parse accounting files for TORQUE
+
+ SVN Info:
+    $Id$
+    $URL$
+
+Torque Info:
+ abort   Job has been aborted by the server
+  C   checkpoint  Job has been checkpointed and held
+  D   delete  Job has been deleted
+  E   exit    Job has exited (either successfully or unsuccessfully)
+  Q   queue   Job has been submitted/queued
+  R   rerun   Attempt to rerun the job has been made
+  S   start   Attempt to start the job has been made (if the job fails to properly start, it may have multiple job start records)
+  T   restart     Attempt to restart the job (from checkpoint) has been made (if the job fails to properly start, it may have multiple job start records)
+
+ ctime   Time job was created
+ etime   Time job became eligible to run
+ qtime   Time job was queued
+ start   Time job started to run
+
+  05/30/2012 23:59:46;E;6155805.batch1.irc.sara.nl;user=rvosmeer group=rvosmeer jo
+  bname=grid_ef_GROUP18 queue=serial ctime=1338411242 qtime=1338411242 etime=13384
+  11242 start=1338414827 owner=rvosmeer@login4.irc.sara.nl exec_host=gb-r3n8/7+gb-r3n8/6+gb-r3n8/5+gb-r3n8/4+gb-r3n8/3+gb-r3n8/2+gb-r3n8/1+gb-r3n8/0 Resource_List.arch=x86_64 Resource_List.ncpus=1 Resource_List.neednodes=1:cores8:ppn=8 Resource_List.nodect=1 Resource_List.nodes=1:cores8:ppn=8 Resource_List.walltime=00:20:00 session=22781 end=1338415186 Exit_status=0 resources_used.cput=00:05:49 resources_used.mem=238052kb resources_used.vmem=351124kb resources_used.walltime=00:06:00
+
+"""
+import os
+import string
+import re
+import sys
+
+def get_nodes(nodes, unique=None):
+    """
+    Returns a list of the nodes which run this job
+    format:
+    * exec_host: gb-r10n14/5+gb-r10n14/4+gb-r10n14/3+gb-r10n14/2+gb-r10n14/1+gb-r10n14/0
+    * split on '+' and if uniq is set split on '/'
+"""
+
+    if nodes:
+        nodelist = string.split(nodes,'+') 
+        if not unique:
+             return nodelist
+        else:
+            l = list()
+
+            for n in nodelist:
+                t = string.split(n,'/')
+                if t[0] not in l:
+                    l.append(t[0])
+
+            return l
+
+def get_racks( host_l ):
+
+    NODE_EXPR = "gb-r(?P<racknr>[0-9]+)n(?P<nodenr>[0-9]+)"
+
+    racks = list()
+    for h in host_l:
+        parts = re.search( r'%s' % NODE_EXPR, h, re.VERBOSE )
+
+        try:
+
+            racknr = parts.group( 'racknr' )
+            if not racknr in racks:
+                racks.append(racknr)
+
+        except Exception: 
+            pass
+
+        return racks
+            
+
+
+
+def parse_key_value( d, state, line):
+    """
+    user=rvosmeer group=rvosmeer jobname=FRAME_398_SPq.adf.job ...
+    a value can also contain a '=' character
+    """
+    key_value_pairs = line.split()
+
+    for entry in key_value_pairs:
+        key_value_l = entry.split('=')
+        k = key_value_l[0].strip()
+        v = ''.join(key_value_l[1:]).strip()
+        d[state][ k ] = v
+
+        if k in ['exec_host']:
+            d[state]['host_list'] = get_nodes( v, True)
+            d[state]['rack_list'] = get_racks( d[state]['host_list'] )
+
+
+def read_file(file, d):
+
+    fd = open(file, 'r')
+
+    go = True
+    while go:
+        line = fd.readline() 
+        
+        l = line.split(';') 
+        
+        if not line: 
+            break
+   
+        jobid = l[2].strip()
+        if not d.has_key( jobid ):
+            d[ jobid ] = dict()
+   
+
+        if l[1] == 'S':
+
+            try:
+                d[ jobid ]['start']['retry_count'] += 1
+                parse_key_value( d[ jobid ], 'start', ' '.join(l[3:])) 
+
+            except KeyError:
+                d[ jobid ]['start'] = dict()
+                d[ jobid ]['start']['retry_count'] = 0
+                parse_key_value( d[ jobid ], 'start', ' '.join(l[3:])) 
+
+        elif l[1] == 'C':
+            d[ jobid ]['checkpoint'] =  l[3:]
+            parse_key_value( d[ jobid ], 'checkpoint', ' '.join(l[3:])) 
+
+        elif l[1] == 'D':
+            d[ jobid ]['deleted'] = dict()
+            parse_key_value( d[ jobid ], 'deleted', ' '.join(l[3:])) 
+
+        elif l[1] == 'E':
+            d[ jobid ]['exit'] = dict()
+            parse_key_value( d[ jobid ], 'exit', ' '.join(l[3:])) 
+
+        elif l[1] == 'Q':
+            d[ jobid ]['queued'] = dict()
+            parse_key_value( d[ jobid ], 'queued', ' '.join(l[3:])) 
+
+        elif l[1] == 'R':
+            d[ jobid ]['rerun'] = dict()
+            parse_key_value( d[ jobid ], 'rerun', ' '.join(l[3:])) 
+
+        elif l[1] == 'T':
+            d[ jobid ]['restart'] = dict()
+            parse_key_value( d[ jobid ], 'restart', ' '.join(l[3:])) 
+
+
+
+serial_jobs = 0
+parallel_jobs = 0
+express_jobs = 0
+serial_jobs_on_parallel_node = 0
+total_jobs = 0
+
+jobs = dict()
+parallel_job_len = dict()
+
+for f in sys.argv[1:] :
+
+    read_file(f, jobs)
+
+
+#for j in jobs.keys():
+#
+#    if jobs[j].has_key('restart'):
+#        print j, jobs[j]['restart']
+
+for j in jobs.keys():
+
+    if jobs[j].has_key('exit'):
+
+        record = jobs[j]['exit']
+
+        total_jobs += 1
+
+        if record['queue'] in [ 'serial']:
+            serial_jobs += 1 
+
+            if record['rack_list'][0] in [ '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13' ]:
+                serial_jobs_on_parallel_node += 1
+
+        elif record['queue'] in [ 'parallel']:
+            parallel_jobs += 1
+            try:
+                number_of_hosts = len(record['host_list']) 
+                parallel_job_len[ number_of_hosts ]['number'] += 1
+                #parallel_job_len[ number_of_hosts ] ['walltime'].append(record['Resource_List.walltime'])
+
+            except KeyError:
+                parallel_job_len[ number_of_hosts ] = dict()
+                parallel_job_len[ number_of_hosts ] ['number'] = 1
+                #parallel_job_len[ number_of_hosts ] ['walltime'] = list()
+                #parallel_job_len[ number_of_hosts ] ['walltime'].append(record['Resource_List.walltime'])
+
+        elif record['queue'] in [ 'express']:
+            express_jobs += 1
+
+
+
+print 'total_jobs :', total_jobs 
+print 'serial_jobs :', serial_jobs
+print 'parallel_jobs :', parallel_jobs
+print 'express_jobs :', express_jobs
+print 'serial_jobs_on_parallel_node :', serial_jobs_on_parallel_node
+
+for p in parallel_job_len:
+    print p, parallel_job_len[p]
