button(text='submit'command=onsubmitgrid(row=rownumcolumn= columnspan= box title('getfilegui- 'box bind(''(lambda eventonsubmit())mainloop(this version makes similar window (figure - )but adds button at the bottom that does the same thing as an enter key press--it runs the getfile client procedure generally speakingimporting and calling functions (as done hereis faster than running command linesespecially if done more than once the getfile script is set up to work either way--as program or function library figure - getfilegui- in action using reusable form-layout class if you're like methoughwriting all the gui form layout code in those two scripts can seem bit tediouswhether you use packing or grids in factit became so tedious to me that decided to write general-purpose form-layout classshown in example - which handles most of the gui layout grunt work example - pp \internet\sockets\form py ""################################################################# reusable form classused by getfilegui (and others#################################################################""from tkinter import entrysize class formdef __init__(selflabelsparent=none)labelsize max(len(xfor in labels box frame(parentbox pack(expand=yesfill=xrows frame(boxbd= relief=grooverows pack(side=topexpand=yesfill=xself content { network scripting add non-modal form box pass field labels list box has rowsbuttons rows has row frames go=button or return key runs onsubmit method