Python Forum

Full Version: Help finding example code please
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am a python3 neophyte:

I would like to create a program that:
1) has a display (Tkinter? PyQT?) containing text fields and a button
2) can receive messages from other programs (socket? wamp?) which modify the text fields
3) and can send a message to another program when the button is pressed

Can you recommend existing code or a framework that can accomplish this?
Thank you
received from which program?
Note you should keep in mind the communication to the outside programs does not involve your GUI world as that is going to be basically straight python (or should be) and all your using the GUI library for is the GUI using this approach whatever GUI you choose depends on just your GUI needs and nothing more -- it also simplifies your GUI
Let's call the program "display". Let's call the program that will send the messages "card_reader".

The card_reader program is waiting for a card (serial connection). When a card is inserted, the card_reader looks up the name associated with the card from a database and opens a socket connection to the display. (The display program is a socket server). The display program receives the message and shows the name "Hi Alex! Welcome".

The display program also has a button which, when pressed will write to a database.

What I do not understand is how to mix a socket server with a PyQT r Tkinter, how do I insert code in the loop?
See my PM to you
Gary get a good grasp of python- data types, built ins, modules, classes, oop, logic and the rest. write your program so it works from command line, use your favorite interpreter to work out the details. So from your post create a data base- input a key and output a value. Then tackle the serial connection and finally work on the GUI- it's just a suggestion. Al Sweigart has written several books check out [url=https://automatetheboringstuff.com/al's book[/url]