IPC standard for describing component orientations in XYRS data
[hw/altusmetrum] / packages / pinheader / 50milpitch.py
index 76b1b78414860747973500fdba2a5dad93965699..7897ac918189ac364e217ca5e5c6abee52cf5e7d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 # Copyright 2011 by Bdale Garbee <bdale@gag.com>.  GPLv2
 #
 # Program to emit PCB footprint for
@@ -24,26 +24,26 @@ if pins > 15:
        sys.stderr.write('Must be no more than 15 pins\n')
        sys.exit(1)
 
-print '# author: Bdale Garbee'
-print '# email: bdale@gag.com'
-print '# dist-license: GPL 2'
-print '# use-license: unlimited'
+print ('# author: Bdale Garbee')
+print ('# email: bdale@gag.com')
+print ('# dist-license: GPL 2')
+print ('# use-license: unlimited')
 
-print 'Element[0x0 "50mil%ipin"' % pins,'"" "" 0 0 0 0 0 100 0x0]'
-print "("
+print ('Element[0x0 "50mil%ipin"' % pins,'"" "" 0 0 0 0 0 100 0x0]')
+print ("(")
 for pin in range (1,pins+1):
     pinnum = pins + 1 - pin
     if pinnum == 1:
-       Flags = '0x0101'
+        Flags = '0x0101'
     else:
-       Flags = '0x0001'
-    print '   Pin[', \
+        Flags = '0x0001'
+    print ('   Pin[', \
        mm2mils100((pins-1)*PinSpacing - (pin-1)*PinSpacing), \
        0, \
        4200, \
        1200, \
        4800, \
        2800, \
-       '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']'
+       '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']')
 
-print ")"
+print (")")