Skip to content

Tag: python

How to assign variables to worker Thread in Python PyQt5?

I have designed a GUI program using pyqt5. I have a main thread and a worker thread. When the GUI starts, i get some inputs from user such as age, name, … and i want to process the inputs in worker. For example How can i send the inputs which i get using self.ui.firstname.text() to the worker? in other …

How do i convert a modified list of The Alphabet into a number?

i want to convert the sentence from variable (salam) into numbers. The conversion table is like a modified alphabet just like in (char2). My expected output is a 3×3 matrix, inside is the converted number from(salam) using (char2) and the output is here is the image for clarity Answer The problem is from…

Regular Expression: match word in a blank of a sentence

I have the following line: I _ foo and _ I want to match anything (case insensitive) that matches the text and has a words that replace the underscores e. g. So in this case I want to get the whole sentences back: [“I want foo and bar”, “I implemented foo and foo”, “i use Foo and…