X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=packages%2Fmolex%2Fpico-ezmate.py;h=c3e82abdeff56964553158885b1d7fbcb56463f9;hb=1e7ff399634c3c002d8c73d3a179830ccb159941;hp=efb9e71b3a5798ec82768864b67ef6592b99a8c0;hpb=86ab56fea650108ca8ef638a91cd27722a80e3db;p=hw%2Faltusmetrum diff --git a/packages/molex/pico-ezmate.py b/packages/molex/pico-ezmate.py index efb9e71..c3e82ab 100644 --- a/packages/molex/pico-ezmate.py +++ b/packages/molex/pico-ezmate.py @@ -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]