convert to python3
[pinmux.git] / src / spec / base.py
index 372099c49d5b952cd072afb2037b8a97f2be31d3..dc2cf0c8b23ab1578fcabead77db6b608c49fed6 100644 (file)
@@ -18,7 +18,7 @@ class PinSpec(Pinouts):
         bankspec = OrderedDict()
         self.offs = 0
         pkeys = self.pinbanks.keys()
-        print self.pinbanks
+        print (self.pinbanks)
         for kn in pkeys:
             bankspec[kn] = self.offs
             self.offs += self.pinbanks[kn]
@@ -37,9 +37,10 @@ class PinSpec(Pinouts):
 
         self.scenarios.append((name, needed, eint, pwm, descriptions))
 
-    def write(self, pyf, of, pinmap):
+    def pywrite(self, pyf, pinmap):
+        return python_dict_fns(pyf, pinmap, self, self.function_names)
 
-        fns = python_dict_fns(pyf, pinmap, self, self.function_names)
+    def write(self, of):
 
         of.write("""# Pinouts (PinMux)
 auto-generated by [[pinouts.py]]