diff --git a/Control/AthenaPython/python/Bindings.py b/Control/AthenaPython/python/Bindings.py
index 661d4f01febf3961763af698b576eb60eba024d5..0efa54a88be5bd1623b552446627e22df8fc269b 100644
--- a/Control/AthenaPython/python/Bindings.py
+++ b/Control/AthenaPython/python/Bindings.py
@@ -1,8 +1,10 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 # @file: AthenaPython/python/Bindings.py
 # @author: Sebastien Binet <binet@cern.ch>
 
+from __future__ import print_function
+
 ### data
 __version__ = "$Revision: 1.30 $"
 __author__  = """
@@ -37,7 +39,7 @@ def _import_ROOT():
         def __call__(self, *args):
             try:
                 result = ROOT._Template.__call__(self, *args)
-            except Exception,err:
+            except Exception as err:
                 # try again...
                 result = ROOT._Template.__call__(self, *args)
 
@@ -98,7 +100,7 @@ class _PyAthenaBindingsCatalog(object):
         """
         try:
             if cb is None: eval( 'cb = _py_init_%s'%klass )
-        except Exception, err:
+        except Exception as err:
             _msg = _PyAthenaBindingsCatalog.msg
             _msg.error("Problem registering callback for [%s]" % klass)
             _msg.error("Exception: %s", err)
@@ -174,7 +176,7 @@ def py_svc(svcName, createIf=True, iface=None):
         svc = PyComponents.instances[svcName]
 
     if svc:
-        import PyAthena
+        from AthenaPython import PyAthena
         setattr(PyAthena.services, svcName, svc)
     return svc
 
@@ -227,7 +229,7 @@ def py_tool(toolName, createIf=True, iface=None):
         tool = PyComponents.instances[toolName]
 
     if tool:
-        import PyAthena
+        from AthenaPython import PyAthena
         setattr(PyAthena.services.ToolSvc, toolName, tool)
     return tool
 
@@ -272,7 +274,7 @@ def py_alg(algName, iface='IAlgorithm'):
         alg = PyComponents.instances[algName]
 
     if alg:
-        import PyAthena
+        from AthenaPython import PyAthena
         setattr(PyAthena.algs, algName, alg)
     return alg
 
@@ -406,8 +408,8 @@ def _py_init_ClassIDSvc():
     IClassIDSvc = cppyy.gbl.IClassIDSvc
 
     _missing_clids  = {
-        'DataHistory' : 83814411L, 
-        83814411L     : 'DataHistory',
+        'DataHistory' : 83814411, 
+        83814411     : 'DataHistory',
         }
 
     # re-use the python-based clid generator
@@ -473,7 +475,7 @@ def _py_init_THistSvc():
     # to improve look-up time from python
     for n in ('Hist', 'Graph', 'Tree'):
         code = "ITHistSvc._cpp_reg%s = ITHistSvc.reg%s" % (n,n)
-        exec code in globals(),locals()
+        exec (code, globals(),locals())
 
     def book(self, oid, obj=None, *args, **kw):
         """book a histogram, profile or tree
@@ -632,7 +634,7 @@ def reg%s(self, oid, oid_type=None):
     raise ValueError(err)
 ITHistSvc.reg%s = reg%s
 del reg%s""" % (n,n,n,n,n)
-        exec code in globals(),locals()
+        exec (code, globals(),locals())
         pass
     def load(self, oid, oid_type):
         """Helper method to load a given object `oid' from a stream, knowing
@@ -666,7 +668,7 @@ def %s(self, *args, **kw):
     return self._py_cache.%s(*args,**kw)
 ITHistSvc.%s = %s
 del %s""" % (n,n,n,n,n)
-        exec code in globals(),locals()
+        exec (code, globals(),locals())
     def pop(self, k):
         obj = self.get(k)
         assert self.deReg(obj).isSuccess(), \
diff --git a/Control/AthenaPython/python/ConfigLib.py b/Control/AthenaPython/python/ConfigLib.py
index 8cbff5ce6b0e553fd675f2a64cbbc1960a9c60d5..6aae57900a66c51927d9efcc2d8c40aa7203262b 100644
--- a/Control/AthenaPython/python/ConfigLib.py
+++ b/Control/AthenaPython/python/ConfigLib.py
@@ -1,9 +1,11 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 # @file AthenaPython/ConfigLib.py
 # @purpose functions to ease the configuration of reading/copying files
 # @date January 2010
 
+from __future__ import print_function
+
 __doc__ = "functions to ease the configuration of reading/copying files"
 __version__ = "$Revision: 285924 $"
 __author__ = "Sebastien Binet <binet@cern.ch>"
@@ -372,7 +374,7 @@ class AutoCfg(object):
                         genevt = evtdata.get('McEventCollection', [])
                         if 'GEN_EVENT' in genevt:
                             return True
-            except Exception, err:
+            except Exception as err:
                 self.msg.info('caught:\n%s', err)
         return False
 
@@ -390,7 +392,7 @@ class AutoCfg(object):
                         'StreamHITS',
                         )):
                         return True
-            except Exception, err:
+            except Exception as err:
                 self.msg.info('caught:\n%s', err)
         return False
         
@@ -418,7 +420,7 @@ class AutoCfg(object):
                                            'RawChannelContainer',
                                            'RdoContainer',)):
                                 return True
-            except Exception, err:
+            except Exception as err:
                 self.msg.info('caught:\n%s', err)
         return False
 
@@ -441,7 +443,7 @@ class AutoCfg(object):
                         'StreamD2ESDM',
                         )):
                         return True
-            except Exception, err:
+            except Exception as err:
                 self.msg.info('caught:\n%s', err)
         return False
 
@@ -465,7 +467,7 @@ class AutoCfg(object):
                         'StreamD2AODM',
                         )):
                         return True
-            except Exception, err:
+            except Exception as err:
                 self.msg.info('caught:\n%s', err)
         return False
 
@@ -481,7 +483,7 @@ class AutoCfg(object):
                 for stream_name in infos['stream_names']:
                     if stream_name.startswith(('StreamTAG', 'TAG')):
                         return True
-            except Exception, err:
+            except Exception as err:
                 self.msg.info('caught:\n%s', err)
         return False
 
@@ -499,7 +501,7 @@ class AutoCfg(object):
                         'StreamUSR',
                         )):
                         return True
-            except Exception, err:
+            except Exception as err:
                 self.msg.info('caught:\n%s', err)
         return False
         
diff --git a/Control/AthenaPython/python/Configurables.py b/Control/AthenaPython/python/Configurables.py
index ee5b79030d3f537e9cc997353f92edab704e78d3..09f35cc25761faa1882ae55418f2af279a93cce4 100644
--- a/Control/AthenaPython/python/Configurables.py
+++ b/Control/AthenaPython/python/Configurables.py
@@ -1,9 +1,11 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 # @file: Configurables.py
 # @purpose: a set of Configurables for the PyAthena components
 # @author: Sebastien Binet <binet@cern.ch>
 
+from __future__ import print_function
+
 import AthenaCommon.Constants as Lvl
 from AthenaCommon.Configurable import *
 from AthenaCommon import CfgMgr
@@ -99,7 +101,7 @@ class CfgPyAlgorithm( ConfigurableAlgorithm ):
         if not hasattr( svcMgr, 'PyComponentMgr' ):
             svcMgr += CfgMgr.PyAthena__PyComponentMgr('PyComponentMgr')
 
-        import PyAthena
+        from AthenaPython import PyAthena
         
         ## populate the PyComponents instances repository
         name = self.getJobOptName()
@@ -144,7 +146,7 @@ class CfgPyService( ConfigurableService ):
         if not hasattr( svcMgr, 'PyComponentMgr' ):
             svcMgr += CfgMgr.PyAthena__PyComponentMgr('PyComponentMgr')
         
-        import PyAthena
+        from AthenaPython import PyAthena
 
         ## populate the PyComponents instances repository
         name = self.getJobOptName()
diff --git a/Control/AthenaPython/python/FilePeekerLib.py b/Control/AthenaPython/python/FilePeekerLib.py
index 916fe8b606a714b8e5269b6fc70f59963e286d89..16b4b7573ae16aff90a47a607ff383efcb07d761 100644
--- a/Control/AthenaPython/python/FilePeekerLib.py
+++ b/Control/AthenaPython/python/FilePeekerLib.py
@@ -1,10 +1,12 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 # @file PyAthena.FilePeekerLib
 # @purpose provide components to peek into pool files
 # @author Sebastien Binet
 # @date February 2010
 
+from __future__ import print_function
+
 __version__= "$Revision: 668532 $"
 __author__ = "Sebastien Binet"
 __doc__ = "provide components to peek into pool files"
@@ -183,7 +185,7 @@ class FilePeeker(PyAthena.Alg):
         msg = self.msg
         try:
             obj = store[metadata_name]
-        except KeyError,err:
+        except KeyError as err:
             msg.warning('could not retrieve [%s]', metadata_name)
             return
         msg.info('processing container [%s]', obj.folderName())
@@ -198,7 +200,7 @@ class FilePeeker(PyAthena.Alg):
                 payloads.append(_tmp.at(ii))
             pass
         for ii,payload in zip(range(payloads_sz), payloads):
-            # print "-->",ii,payload,type(payload),'\n' 
+            # print ("-->",ii,payload,type(payload),'\n' )
             if not payload:
                 msg.info ("**error** null-pointer ?")
                 continue
@@ -270,9 +272,9 @@ class FilePeeker(PyAthena.Alg):
         
         #payload.dump()
         ##  if len(data)>1 and obj.folderName() == "/TagInfo":
-        ##      print "="*80,metadata_name
+        ##      print ("="*80,metadata_name)
         ##      for d in data:
-        ##        print "==",d
+        ##        print ("==",d)
         return data
 
     def finalize(self):
@@ -385,7 +387,7 @@ class FilePeeker(PyAthena.Alg):
             item_list = esi.item_list()
             item_list = map(_make_item_list, item_list)
             peeked_data['eventdata_items'] = item_list
-            # print "======",len(item_list)
+            # print ("======",len(item_list))
             peeked_data['lumi_block'] = esi.lumi_blocks()
             peeked_data['run_number'] = esi.run_numbers()
             #peeked_data['evt_number'] = esi.event_number()
@@ -620,7 +622,7 @@ class FilePeeker(PyAthena.Alg):
                 clid_name = _typename(clid)
                 if clid_name:
                     clid = clid_name
-            except Exception,err:
+            except Exception as err:
                 msg.info("no typename for clid [%s] (%s)", clid, err)
             item_list.append((str(clid), sgkey))
 
diff --git a/Control/AthenaPython/python/PyAthena.py b/Control/AthenaPython/python/PyAthena.py
index 13b39046a55b642ddebda3fef859bdb44daf0e0d..55a1601ea90edbc86bdd3543ac865a4680961955 100644
--- a/Control/AthenaPython/python/PyAthena.py
+++ b/Control/AthenaPython/python/PyAthena.py
@@ -1,9 +1,11 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 # @file: PyAthena.py
 # @purpose: a set of Python classes for PyAthena
 # @author: Sebastien Binet <binet@cern.ch>
 
+from __future__ import print_function
+
 __doc__     = """Module containing a set of Python base classes for PyAthena"""
 __version__ = "$Revision: 1.16 $"
 __author__  = "Sebastien Binet <binet@cern.ch>"
@@ -118,13 +120,13 @@ def py_reload (*args):
     import types, sys
     for i,arg in enumerate(args):
         if isinstance (arg, types.ModuleType):
-##             print " ==> moduletype"
+##             print (" ==> moduletype")
             reload (arg)
         elif isinstance (arg, types.StringType):
             # no-op
             continue
         elif isinstance (arg, types.MethodType):
-##             print " ==> methodtype"
+##             print (" ==> methodtype")
             # reload module holding the class' definition
             modname = arg.im_self.__class__.__module__
             module = reload (sys.modules[modname])
@@ -134,11 +136,11 @@ def py_reload (*args):
             fct_name = arg.im_func.__name__
             new_fct = getattr (klass, fct_name)
             #new_fct.im_class = klass
-##             print "-->fct:",new_fct.im_func
+##             print ("-->fct:",new_fct.im_func)
             setattr (obj, fct_name,
                      new_fct.__get__(obj))
         elif hasattr (arg, '__class__'):
-##             print " ==> classtype"
+##             print (" ==> classtype")
             # reload module holding the class' definition
             modname = arg.__class__.__module__
             module = reload (sys.modules[modname])
@@ -154,24 +156,24 @@ def py_reload (*args):
                     v = getattr (klass, k)
                     try:
                         v = v.__get__ (arg)
-                    except AttributeError, err:
+                    except AttributeError as err:
                         # 'handle' not-yet-set gaudi properties
                         continue
                     setattr (arg, k, v.__get__(arg))
                 # FIXME: should we remove methods which disappeared ?
                 v = getattr (arg, k)
-##                 print " ==> reloading [%s.%s <- %s]" % (
+##                 print (" ==> reloading [%s.%s <- %s]" % (
 ##                     arg.__class__.__name__,
-##                     k, v)
+##                     k, v))
                 py_reload (v)
         else:
-            print "*** unhandled type: [%s] (arg #%i) ***" % (type(arg),i)
+            print ("*** unhandled type: [%s] (arg #%i) ***" % (type(arg),i))
         pass
     return
 
 ### imports
-import PyAthenaComps
-from Bindings import _PyAthenaBindingsCatalog as _pycat
+from AthenaPython import PyAthenaComps
+from AthenaPython.Bindings import _PyAthenaBindingsCatalog as _pycat
 
 ### module facade to allow loading classes as attributes ----------------------
 import types
diff --git a/Control/AthenaPython/python/PyAthenaComps.py b/Control/AthenaPython/python/PyAthenaComps.py
index e4efef9a384d5cde63c9a6dd7611443b076b71c7..98ee533eb5a1926353c9dcb0fe3ab6c87331309a 100644
--- a/Control/AthenaPython/python/PyAthenaComps.py
+++ b/Control/AthenaPython/python/PyAthenaComps.py
@@ -1,9 +1,11 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 # @file: PyAthenaComps.py
 # @purpose: a set of Python classes for PyAthena
 # @author: Sebastien Binet <binet@cern.ch>
 
+from __future__ import print_function
+
 __doc__     = """Module containing a set of Python base classes for PyAthena"""
 __version__ = "$Revision: 1.12 $"
 __author__  = "Sebastien Binet <binet@cern.ch>"
@@ -23,10 +25,10 @@ __all__ = [ 'StatusCode',
 import sys
 from AthenaCommon.Logging import logging
 from AthenaCommon.Configurable  import *
-from Configurables import (CfgPyAlgorithm,
-                           CfgPyService,
-                           CfgPyAlgTool,
-                           CfgPyAud)
+from AthenaPython.Configurables import (CfgPyAlgorithm,
+                                        CfgPyService,
+                                        CfgPyAlgTool,
+                                        CfgPyAud)
 
 ### helpers -------------------------------------------------------------------
 import weakref
diff --git a/Control/AthenaPython/python/tests/PyTHistTestsLib.py b/Control/AthenaPython/python/tests/PyTHistTestsLib.py
index 89888d8df87a894ab95656a50bec07aa87b368ae..8dfff2708064d16392c2e161244094e094aeb8e9 100644
--- a/Control/AthenaPython/python/tests/PyTHistTestsLib.py
+++ b/Control/AthenaPython/python/tests/PyTHistTestsLib.py
@@ -1,9 +1,11 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 # @file    AthenaPython/python/tests/PyTHistTestsLib.py
 # @purpose Test read and write histograms and trees via the @c ITHistSvc
 # @author  Sebastien Binet <binet@cern.ch>
 
+from __future__ import print_function
+
 __doc__ = """Test read and write histograms and trees via ITHistSvc"""
 __version__ = "$Revision: 1.4 $"
 __author__  = "Sebastien Binet <binet@cern.ch>"
@@ -53,7 +55,7 @@ class PyHistReader(PyAthena.Alg):
         try:
             o = self.hsvc.load('/read2/trees/stuff/tree1', oid_type='tree')
             _info(' -%-20s: %i', o.GetName(), o.GetEntries())
-        except KeyError,err:
+        except KeyError as err:
             self.msg.error(err)
             self.msg.error('bug #36379 still not fixed...')
         return StatusCode.Success
diff --git a/Control/AthenaPython/python/tests/PyTestsLib.py b/Control/AthenaPython/python/tests/PyTestsLib.py
index 6364cc8e3e21b73a539c78bf76f22b0a286ac931..13701ff2f79b47a81e59793d6263ff08a71b0c12 100644
--- a/Control/AthenaPython/python/tests/PyTestsLib.py
+++ b/Control/AthenaPython/python/tests/PyTestsLib.py
@@ -1,9 +1,11 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 # @file: AthenaPython/python/tests/PyTestsLib.py
 # @purpose: a set of py-components to test various aspects of PyAthena
 # @author: Sebastien Binet <binet@cern.ch>
 
+from __future__ import print_function
+
 __doc__ = """Module containing a set of py-components to test various aspects
 of PyAthena.
 """