X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=packages%2Fmolex%2Fpicoblade-th-v.py;h=e9477e744c42c4ae255da8082dc7f89f9b00ec49;hb=1e7ff399634c3c002d8c73d3a179830ccb159941;hp=35261be078e6d16232c24d20c5b7506186558098;hpb=86ab56fea650108ca8ef638a91cd27722a80e3db;p=hw%2Faltusmetrum diff --git a/packages/molex/picoblade-th-v.py b/packages/molex/picoblade-th-v.py index 35261be..e9477e7 100755 --- a/packages/molex/picoblade-th-v.py +++ b/packages/molex/picoblade-th-v.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/python3 # Copyright 2008 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for @@ -29,56 +29,56 @@ 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 "PicoBlade%i"' % pins,'"" "" 0 0 0 0 0 100 0x0]' -print "(" +print('Element[0x0 "PicoBlade%i"' % 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, \ 3500, \ 1200, \ 4100, \ mm2mils100(PinDiam), \ - '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']' + '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']') BoxWidth = (BoxEnd * 2) + ((pins - 1) * PinSpacing); -print ' ElementLine[', \ +print(' ElementLine[', \ mm2mils100(-BoxEnd), \ mm2mils100(-BoxOffset), \ mm2mils100(-BoxEnd), \ mm2mils100(BoxHeight-BoxOffset), \ - LineWidth, ']' + LineWidth, ']') -print ' ElementLine[', \ +print(' ElementLine[', \ mm2mils100(-BoxEnd), \ mm2mils100(BoxHeight-BoxOffset), \ mm2mils100(BoxWidth-BoxEnd), \ mm2mils100(BoxHeight-BoxOffset), \ - LineWidth, ']' + LineWidth, ']') -print ' ElementLine[', \ +print(' ElementLine[', \ mm2mils100(BoxWidth-BoxEnd), \ mm2mils100(BoxHeight-BoxOffset), \ mm2mils100(BoxWidth-BoxEnd), \ mm2mils100(-BoxOffset), \ - LineWidth, ']' + LineWidth, ']') -print ' ElementLine[', \ +print(' ElementLine[', \ mm2mils100(BoxWidth-BoxEnd), \ mm2mils100(-BoxOffset), \ mm2mils100(-BoxEnd), \ mm2mils100(-BoxOffset), \ - LineWidth, ']' + LineWidth, ']') -print ")" +print(")")