update to python3
[hw/altusmetrum] / packages / molex / pico-ezmate.py
index efb9e71b3a5798ec82768864b67ef6592b99a8c0..c3e82abdeff56964553158885b1d7fbcb56463f9 100644 (file)
@@ -1,3 +1,4 @@
+#!/usr/bin/python3
 # author: Keith Packard
 # email: keithp@keithp.com
 # dist-license: GPL 2
@@ -23,13 +24,13 @@ OutlineYHold = OutlineYPad + 4.5
 
 NumPad=int(sys.argv[1])
 
-print '# author: Keith Packard'
-print '# email: keithp@keithp.com'
-print '# dist-license: GPL 2'
-print '# use-license: unlimited'
+print('# author: Keith Packard')
+print('# email: keithp@keithp.com')
+print('# dist-license: GPL 2')
+print('# use-license: unlimited')
 
-print 'Element["" "pico-ezmate-%d" "" "" 0 0 0 0 0 100 ""]' % NumPad
-print "("
+print('Element["" "pico-ezmate-%d" "" "" 0 0 0 0 0 100 ""]' % NumPad)
+print("(")
 
 PadX = PadSpacing * NumPad / 2
 
@@ -56,7 +57,7 @@ def pad(cx, cy, w, h, name, num):
         x2 = cx
         y2 = cy + (h - w) / 2
     mask = thickness + Clearance / 2
-    print '    Pad[',\
+    print('    Pad[',\
         mm2mils100(x1), \
         mm2mils100(y1), \
         mm2mils100(x2), \
@@ -64,15 +65,15 @@ def pad(cx, cy, w, h, name, num):
         mm2mils100(thickness), \
         mm2mils100(Clearance), \
         mm2mils100(mask),\
-        '"%s"' % name, '"%s"' % num, '"square"]'
+        '"%s"' % name, '"%s"' % num, '"square"]')
     
 def line(x1, y1, x2, y2):
-    print '    ElementLine[',\
+    print('    ElementLine[',\
         mm2mils100(x1), \
         mm2mils100(y1), \
         mm2mils100(x2), \
         mm2mils100(y2), \
-        '500]'
+        '500]')
     
 def rect(x, y, w, h):
     line(x,y,x+w,y)
@@ -97,7 +98,7 @@ rect(padx(1) - OutlineX, OutlineYPad,
      PadSpacing * (NumPad-1) + OutlineX*2,
      4.5)
 
-print '    )'    
+print('    )')
        # 11000 2000
 #      ElementLine[-11000 -1000 -3600 -1000 100]
 #      ElementLine[  3600 -1000 11000 -1000 100]