Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to swap two numbers in fields in python
Post: RE: How to swap two numbers in fields in python

Hi, Yes I am using tkinter. There are already numbers in the user entry fields. I just want to have an extra swap button which can swap these two numbers written in the user entry field.
Joni_Engr General Coding Help 5 1,858 Jan-11-2022, 08:13 AM
    Thread: How to swap two numbers in fields in python
Post: RE: How to swap two numbers in fields in python

Hi, it is basically a user entry field and there are already numbers in them. I would like to have another button which can swap the numbers in the user entry field when the swap button is pressed.
Joni_Engr General Coding Help 5 1,858 Jan-10-2022, 12:15 PM
    Thread: How to swap two numbers in fields in python
Post: How to swap two numbers in fields in python

Hi, I have two numbers written in the user field. I would like to swap these numbers in the fields when the swap button is pressed. I did a basic search but I could not find the suitable code for tha...
Joni_Engr General Coding Help 5 1,858 Jan-10-2022, 08:26 AM
    Thread: How to clean UART string
Post: How to clean UART string

Hi, I am saving the UART data in the text file which appear as. b' All is well ' How can I remove the b' in the start and ' at the end ?
Joni_Engr General Coding Help 4 2,483 Dec-03-2021, 11:36 AM
    Thread: Grid the radio buttons
Post: RE: Grid the radio buttons

Hi, yes now I able to run this code having radio buttons which are arranged in rows and cols and are linked together. The buttons A and B are linked and have their value in same variable. Same is true...
Joni_Engr GUI 6 4,781 Nov-24-2021, 09:54 AM
    Thread: Grid the radio buttons
Post: Grid the radio buttons

Hi, How can I position the radio buttons with with grid command and rows and col import tkinter as tk root = tk.Tk() var_1 = tk.IntVar() var_2 = tk.IntVar() tk.Label(root, text="""Rad...
Joni_Engr GUI 6 4,781 Nov-23-2021, 03:33 PM
    Thread: How to find I2C library in Python
Post: How to find I2C library in Python

Hi, I am looking for I2C library that I can use to read the data from I2C slave module using MCP2221. Does compatible library exist ?
Joni_Engr General Coding Help 1 1,776 Oct-08-2021, 02:02 PM
    Thread: How to terminate a loop in python with button in GUI
Post: RE: How to terminate a loop in python with button ...

I am using tkinter. Here is my code. There are two buttons on the GUI. STRAT and STOP. If I press START then a counter up to 30 should be printed on the shell but if I press STOP anytime before the co...
Joni_Engr GUI 6 11,081 Sep-09-2021, 11:16 AM
    Thread: How to terminate a loop in python with button in GUI
Post: RE: How to terminate a loop in python with button ...

Yes exactly, this I want to implement. A flag variable can be set outside of the while loop when the STOP button is pressed while the while loop is running in a separate thread. In side the while lo...
Joni_Engr GUI 6 11,081 Sep-09-2021, 08:27 AM
    Thread: How to terminate a loop in python with button in GUI
Post: How to terminate a loop in python with button in G...

Hi, in my GUI I have a function with a while loop inside which is ruining when START button is pressed. The function drive a microcontroller continuously. I am wondering is it possible to terminate th...
Joni_Engr GUI 6 11,081 Sep-09-2021, 07:58 AM
    Thread: Serial connection connection issue
Post: RE: Serial connection connection issue

I just have installed a fresh python on another computer. Now at least I am able to run this code but the problem is that I am not able to receive the line from Microcontroller. I know which line Micr...
Joni_Engr General Coding Help 15 8,038 Aug-30-2021, 02:17 PM
    Thread: Serial connection connection issue
Post: RE: Serial connection connection issue

Hi, yes it has two versions. How to delete the previous version. O:\>py -0 Installed Pythons found by py Launcher for Windows -3.9-64 * -3.8-64
Joni_Engr General Coding Help 15 8,038 Aug-30-2021, 01:38 PM
    Thread: Serial connection connection issue
Post: RE: Serial connection connection issue

Hi, yes it shows the following. O:\>pip -V pip 21.1.3 from e:\program_files\python-3.9.6\lib\site-packages\pip (python 3.9) O:\>python -V Python 3.9.6 O:\>python -c "import sys;print(sys....
Joni_Engr General Coding Help 15 8,038 Aug-30-2021, 01:16 PM
    Thread: Serial connection connection issue
Post: RE: Serial connection connection issue

I am running on Windows 10.
Joni_Engr General Coding Help 15 8,038 Aug-30-2021, 12:44 PM
    Thread: Serial connection connection issue
Post: RE: Serial connection connection issue

Hi, if I run just "import serial" than I get the error "ModuleNotFoundError: No module named 'serial'". I am not sure how to fix the problem. The COM port is shown in the device manager.
Joni_Engr General Coding Help 15 8,038 Aug-30-2021, 10:39 AM
    Thread: Serial connection connection issue
Post: RE: Serial connection connection issue

(Aug-26-2021, 03:04 PM)popejose Wrote: Can you confirm you have installed the pyserial module? If not, pip install pyserial should do it. Hi, yes it is installed but I am not able to connect to the...
Joni_Engr General Coding Help 15 8,038 Aug-30-2021, 09:20 AM
    Thread: Serial connection connection issue
Post: Serial connection connection issue

Hi, I am not able to connect to serial. I get an error "ModuleNotFoundError: No module named 'serial'" # Serial port config import serial ser = serial.Serial("COM8", 9600) # Send character 'S' to...
Joni_Engr General Coding Help 15 8,038 Aug-26-2021, 01:28 PM
    Thread: Converting an RGBA image to Grayscale and Binary
Post: RE: Converting an RGBA image to Grayscale and Bina...

Hi, I get an error "ModuleNotFoundError: No module named 'cv2'" I have already installed "pip install opencv-python" but still get an error
Joni_Engr General Coding Help 3 4,637 Aug-23-2021, 08:34 AM
    Thread: Converting an RGBA image to Grayscale and Binary
Post: Converting an RGBA image to Grayscale and Binary

Hi, I have a RGBA image which I need to convert to Grayscale and then to binary with a threshold to get binary histogram but I have 2D Grayscale image in my code which I don't understand how to conver...
Joni_Engr General Coding Help 3 4,637 Aug-22-2021, 10:43 AM
    Thread: How to replace column of a Matrix
Post: RE: How to replace column of a Matrix

Now I get it. Thanks.
Joni_Engr General Coding Help 5 5,936 Aug-22-2021, 10:35 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020