# ecp_printer.Printer test script import win32com.client x = win32com.client.Dispatch('ecp_printer.Printer') x.ScaleMode = 'vbInches' x.FontName = 'Arial' x.FontSize = 14 x.ecpPrint('"Hello", from ' + str(x.ecp_printer_version)) x.ecpPrint(str(x.DriverName) + ' on ' + str(x.DeviceName)) x.DrawWidth = 20 for i in range(25): x1 = 0 x2 = ((float(i) * 3.0)/10.0) y1 = 0.5 + ((float(i) * 1.5)/10.0) y2 = 8.0 - (0.5 + ((float(i) * 1.5)/10.0)) red = hex(271 - (i * 10 + 15))[2:4] green = '00' blue = hex((i * 10 + 15))[2:4] color = '&H' + blue + green + red x.Line(x1, y1, x2, y2, color) x.EndDoc()