Since there is little information, I am assuming Windows XP, Tkinter GUI, and Python code client.
Let's say your client code is saved as Client1.py to the working folder and might look like this ...
# print out a given year's monthly calendars
import calendar
calendar.prcal(2005)
# optional console wait for keypress
raw_input('Press Enter...')
... then this Tkinter code should run the client from the code ...
from Tkinter import *
def runClient():
execfile("client1.py")
form1 = Tk()
push1 = Button(form1, text='Click to run client program', command=runClient)
push1.pack()
form1.mainloop()
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
One way to do this would be to save your client output as a text file and then on your end load the file into a string and assign it to the multiline edit window text in your GUI program. I don't know anything about your client, so I have to guess.
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
Your client needs something like a KeyboardInterrupt which is normally the control-c or delete key.
try:
# send data
except KeyboardInterrupt:
# stop sending data
Just a guess!
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
Use the Edit Shell in your BOA Constructor and type
help('wxPython.wx.wxKeyEvent.GetKeyCode')
I think that's what you are looking for. You have to bind that method to your button click event.
The key code globals come up when you type
help('wxPython.wx')
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417