|
Re: I/O proccessing
I did think of another method which is a bit bizzare but, well as im new to python im trying to work through step by step, making my program based on consoles, then once i start nearing completion i indtend to look into using Tkinter to program a GUI for it.
My other solution is to open a new script in a different console window, ofcourse indoing this ill have to check OS etc, anyway then the main script receives the call from PC A then launches the new script window which simple reads from a text file, print say last 50 lines to the console then appends user input to the end.
The main script would take all data sent to it and rather than echoing it onto the screen it would output it to the file. Then send a simple command to a thread section in the script that is reading the files to tell it to reload the file and then append the input to the end of it once again
When the user inputs information this could then be sent back to the min program via the socket connection established between it and the main script which can then forward it to PC A...and then PC A takes appropriate action.
This is a possible way, thus neating th whole lot up also as it links the sending of commands to the received commands all to one window with no mixing from other PC's.
|