translate most modules to using print() as imported from __future__
[myslice.git] / unfold / composite.py
index 16e28f3..7787551 100644 (file)
@@ -1,13 +1,16 @@
-from unfold.plugin import Plugin
+from __future__ import print_function
 
-# this is a simple base class for plugins that contain/arrange a set of other plugins
-# sons is expected to be a list of the contained plugins, and 
-# active_domid is the domid for the one son that should be displayed as active
-# some subclasses of Composite, like e.g. Tabs, will not behave as expected 
-# if a valid active_domid is not provided
+from unfold.plugin import Plugin
 
 class Composite (Plugin):
 
+    """a simple base class for plugins that contain/arrange a set of other plugins
+sons is expected to be a list of the contained plugins, and 
+active_domid is the domid for the one son that should be displayed as active
+some subclasses of Composite, like e.g. Tabs, will not behave as expected 
+if a valid active_domid is not provided
+"""
+
     def __init__ (self, sons=None, active_domid=None, *args, **kwds):
         Plugin.__init__ (self, *args, **kwds)
         self.sons= sons if sons else []
@@ -18,8 +21,8 @@ class Composite (Plugin):
     def check_active_domid(self):
         matches= [ son for son in self.sons if son.domid==self.active_domid ]
         if len(matches)!=1: 
-            print "WARNING: %s has %d valid son(s) for being active - expecting 1, resetting"%\
-                (self,len(matches))
+            print("WARNING: %s has %d valid son(s) for being active - expecting 1, resetting"%\
+                (self,len(matches)))
             self.active_domid=None
         
     def insert (self, plugin):