Index: trunk/examples/new_rack_pbsmon.py.in
===================================================================
--- trunk/examples/new_rack_pbsmon.py.in	(revision 364)
+++ trunk/examples/new_rack_pbsmon.py.in	(revision 365)
@@ -109,32 +109,4 @@
     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'
@@ -152,9 +124,9 @@
     return not any(x not in list_b for x in list_a)
 
-## Import argparse here, as I need the _print function
+## Import argparse here, as I need the print function
 try:
     import argparse
 except ImportError:
-    _print('Cannot find argparse module', file=sys.stderr)
+    print('Cannot find argparse module', file=sys.stderr)
     sys.exit(1)
 
@@ -301,5 +273,5 @@
             p = PBSQuery( OPT_SERVERNAME )
     except PBSError, reason:
-        _print('Error: %s' % reason)
+        print('Error: %s' % reason)
         sys.exit( -1 )
 
@@ -311,5 +283,5 @@
         nodes = p.getnodes( attr )
     except PBSError, reason:
-        _print('Error: %s' % reason)
+        print('Error: %s' % reason)
         sys.exit( -1 )
 
@@ -435,6 +407,6 @@
     save_column = None
     
-    _print()    
-    _print('  ', end=' ')
+    print()    
+    print('  ', end=' ')
     for rack in xrange( START_RACK, racknr + 1 ):
         
@@ -450,10 +422,10 @@
                     char = save_column
                     save_column = None
-                _print(char, end=' ')
-        else:
-            _print(char, end=' ')
-    _print()    
-
-    _print('  ', end=' ')
+                print(char, end=' ')
+        else:
+            print(char, end=' ')
+    print()    
+
+    print('  ', end=' ')
     for rack in xrange( START_RACK, racknr + 1 ):
         
@@ -461,11 +433,11 @@
         if OPT_SKIP_EMPTY_RACKS:
             if nodes.has_key( rack ):
-                _print(char, end=' ')
-        else:
-            _print(char, end=' ')
-    _print()
+                print(char, end=' ')
+        else:
+            print(char, end=' ')
+    print()
 
     for node in xrange( 1, nodenr + 1 ):
-        _print('%2d' % node, end=' ')
+        print('%2d' % node, end=' ')
 
         for rack in xrange( START_RACK, racknr + 1 ):
@@ -486,17 +458,17 @@
                 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=' ')
+                        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=' ')
+                        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=' ')
+                        print(color.YELLOW + nodes[ rack ][ node ][ 'state_char' ] + color.END, end=' ')
                     else:
-                        _print('M', end=' ')
+                        print('M', end=' ')
                 else:
-                    _print(nodes[ rack ][ node ][ 'state_char' ], end=' ')
+                    print(nodes[ rack ][ node ][ 'state_char' ], end=' ')
             except KeyError:
-                _print(' ', end=' ')
-        _print()
-    _print()
+                print(' ', end=' ')
+        print()
+    print()
 
 def print_table_summary():
@@ -510,5 +482,5 @@
             p = PBSQuery( OPT_SERVERNAME )
     except PBSError, reason:
-        _print('error: %s' % reason)
+        print('error: %s' % reason)
         sys.exit(-1)
 
@@ -518,5 +490,5 @@
         nodes = p.getnodes(attr)
     except PBSError, reason:
-        _print('error: %s' % reason)
+        print('error: %s' % reason)
         sys.exit(-1)
 
@@ -542,5 +514,5 @@
         if node.is_free():                          # can happen for single CPU jobs
             if node.has_job():
-#               _print('TD: %s' % nodename, node)
+#               print('TD: %s' % nodename, node)
                 state_char = PBS_STATES[pbs_ND_single]
                 count_states[pbs.ND_free] -=  1
@@ -566,16 +538,16 @@
     n = 0
     for state in legend:
-        _print('  %s  %-13s : %-5d' % (PBS_STATES[state], state, count_states[state]), end=' ')
+        print('  %s  %-13s : %-5d' % (PBS_STATES[state], state, count_states[state]), end=' ')
 
         n = n + 1
         if not (n & 1):
-            _print()
+            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)
+        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):
@@ -606,9 +578,9 @@
         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()
+    print()
+    print(row_header)
+    print(EXTENDED_PATTERNS[ 'line' ] % ( EXTENDED_PATTERNS[ 'line_char' ] * LENGTH_ROW ))
+    print('\n'.join( rows_str ))
+    print()
 
 if __name__ == '__main__':
@@ -661,5 +633,5 @@
         print_table(args.properties, args.jobs)
     else:
-        _print('Something is wrong, bye!', file=sys.stderr)
+        print('Something is wrong, bye!', file=sys.stderr)
         sys.exit( -1 )
 
Index: trunk/examples/sara_nodes.py.in
===================================================================
--- trunk/examples/sara_nodes.py.in	(revision 364)
+++ trunk/examples/sara_nodes.py.in	(revision 365)
@@ -33,38 +33,9 @@
 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
+## Import argparse here, as I need the print function
 try:
     import argparse
 except ImportError:
-    _print('Cannot find argparse module', file=sys.stderr)
+    print('Cannot find argparse module', file=sys.stderr)
     sys.exit(1)
 
@@ -196,5 +167,5 @@
     '''This function retrieves the information from your batch environment'''
     if ARGS_VERBOSE:
-        _print('func:print_get_nodes input:%s' % str(hosts), file=sys.stderr)
+        print('func:print_get_nodes input:%s' % str(hosts), file=sys.stderr)
 
     ## there are 2 possible filters, by hostname, or by state
@@ -204,5 +175,5 @@
 
     if ARGS_VERBOSE: 
-        _print('func:print_get_nodes fetching node information', file=sys.stderr)
+        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():
@@ -226,5 +197,5 @@
     
     if ARGS_VERBOSE: 
-        _print('func:print_get_nodes returning values', file=sys.stderr)
+        print('func:print_get_nodes returning values', file=sys.stderr)
     return split_1, split_2
 
@@ -232,9 +203,9 @@
     '''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)
+        print('func:print_process_dict input:%s' % str(dictin), file=sys.stderr)
+
+    lineprint = 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
@@ -275,9 +246,9 @@
             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
+        lineprint.append(add_dict)
+
+    if ARGS_VERBOSE: 
+        print('func:print_process_dict returning values', file=sys.stderr)
+    return lineprint
 
 def print_create_list(values):
@@ -290,5 +261,5 @@
     '''Print the default overview'''
     if ARGS_VERBOSE: 
-        _print('func:print_overview_normal input:%s' % str(hosts), file=sys.stderr)
+        print('func:print_overview_normal input:%s' % str(hosts), file=sys.stderr)
 
     ## Determine some default values for the column width
@@ -339,6 +310,6 @@
             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 ]))
+        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
@@ -358,5 +329,5 @@
             show_line_fields.append([w_note,line['note']])
 
-        _print(' %s' % ' | '.join(print_create_list(show_line_fields)))
+        print(' %s' % ' | '.join(print_create_list(show_line_fields)))
 
 def print_overview_format(hosts=None, format=None):
@@ -369,5 +340,5 @@
 
     for line in print_list:
-        _print(format % line)
+        print(format % line)
 ## END functions for printing
 ####
@@ -381,5 +352,5 @@
         '''A function to retrieve the current message'''
         if ARGS_VERBOSE: 
-            _print('class:SaraNodes func:_get_current_notes input:%s' % str(nodes), file=sys.stderr)
+            print('class:SaraNodes func:_get_current_notes input:%s' % str(nodes), file=sys.stderr)
 
         pbsq = PBSQuery.PBSQuery()
@@ -395,5 +366,5 @@
         '''Returns the current time'''
         if ARGS_VERBOSE: 
-            _print('class:SaraNodes func:_get_curdate', file=sys.stderr)
+            print('class:SaraNodes func:_get_curdate', file=sys.stderr)
         return time.strftime('%d-%m %H:%M', time.localtime())
 
@@ -401,5 +372,5 @@
         '''Get the username'''
         if ARGS_VERBOSE: 
-            _print('class:SaraNodes func:_get_uid input:%s' % prev_uid, file=sys.stderr)
+            print('class:SaraNodes func:_get_uid input:%s' % prev_uid, file=sys.stderr)
         cur_uid = getpass.getuser()
         if prev_uid and cur_uid == 'root':
@@ -410,5 +381,5 @@
         '''Check if we already have a ticket number'''
         if ARGS_VERBOSE: 
-            _print('class:SaraNodes func:_get_ticket input:%s' % prev_ticket, file=sys.stderr)
+            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:
@@ -425,5 +396,5 @@
         '''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)
+            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
@@ -457,5 +428,5 @@
 
         if ARGS_VERBOSE: 
-            _print('class:SaraNodes func:do_offline input:%s,%s' % (str(nodes), note), file=sys.stderr)
+            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
@@ -478,5 +449,5 @@
 
         if ARGS_VERBOSE: 
-            _print('class:SaraNodes func:do_clear input:%s' % str(nodes), file=sys.stderr)
+            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
@@ -499,5 +470,5 @@
 
         if ARGS_VERBOSE: 
-            _print('class:SaraNodes func:do_modify input:%s,%s' % (str(nodes), note), file=sys.stderr)
+            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
@@ -517,5 +488,5 @@
 
         if ARGS_VERBOSE: 
-            _print('class:SaraNodes func:do_clear_note input:%s' % str(nodes), file=sys.stderr)
+            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
@@ -535,14 +506,14 @@
 
         if ARGS_VERBOSE: 
-            _print('class:SaraNodes func:_process input:%s' % str(batch_list), file=sys.stderr)
+            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)
+            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)
+            print('class:SaraNodes func:_process pbs_server:%s' % pbs_server, file=sys.stderr)
 
         ## If dry-run is not specified create a connection
@@ -557,7 +528,7 @@
                 if rcode > 0:
                     errno, text = pbs.error()
-                    _print('PBS error for node \'%s\': %s (%s)' % (node[0], text, errno), file=sys.stderr)
+                    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])))
+                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
@@ -596,5 +567,5 @@
 
     if ARGS_VERBOSE: 
-        _print('func:__main__ checking type of operation', file=sys.stderr)
+        print('func:__main__ checking type of operation', file=sys.stderr)
 
     if args.nodes and args.jobs:
@@ -606,5 +577,5 @@
     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)
+            print('You did not specify any nodes, see --help', file=sys.stderr)
             sys.exit(1)
 
@@ -615,35 +586,35 @@
         if args.offline:
             if ARGS_VERBOSE: 
-                _print('func:__main__ call sn.do_offline', file=sys.stderr)
+                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)
+                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)
+                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)
+                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')
+                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)
+            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('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('func:__main__ call print_overview_normal', file=sys.stderr)
             print_overview_normal(args.nodes)
    
     if ARGS_VERBOSE: 
-        _print('func:__main__ exit', file=sys.stderr)
+        print('func:__main__ exit', file=sys.stderr)
Index: trunk/release.json
===================================================================
--- trunk/release.json	(revision 364)
+++ trunk/release.json	(revision 365)
@@ -1,7 +1,7 @@
 {
-  "version": "4.6.1",
-  "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 ",
+  "version": "4.6.4",
+  "changes": "Use system Python instead of environment Python",
   "state": "stable",
   "scope": "bug fixes",
-  "download": "ftp://ftp.surfsara.nl/pub/outgoing/pbs_python-4.6.1.tar.gz"
+  "download": "ftp://ftp.surfsara.nl/pub/outgoing/pbs_python-4.6.4.tar.gz"
 }
