But I take it when you're saying the app is determining which printer to print, you feel that your user is hemmed in and has no choice of his own to choose which printer?
Good programming always lets the user make his own choice, if possible. In most cases with printing, you're limited to the installed printers on the Windows operating system.
I would use the Printers Collection object in VB6 to find them as follows:
dim prn as Printer, intIndex as Integer
dim iMyPrinters() as integer ' an array of installed printer Indexes
dim strPrinters() as string
intIndex = 0
for each prn in Printers
debug.print prn.name, intIndex
Redim Preserve iMyPrinters(intIndex)
Redim Preserve strPrinters(intIndex)
strPrinters(intIndex) = prn.Name
intIndex = intIndex + 1
That code's off the top of my head-- i.e. it may not be accurate. But that should give you a general idea of how you determine what printers are on the system. Once you've decided which printer you want to use through code, then let the user set the printer to the printer of his choice:
Set Printer = intIndex
Of course, you'll have to write code to determine which is the correct index number to use. The printers index ranges from from 0 to Printers.Count-1.
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: