I was trying to make a subclass that acts like the original but its go function returned the string of the text of the button, instead of the index of the button.My own defined subclass makes the ...
I am trying to get the entered value from an entry widget to record in a text file, I've tried a lot but am not sure where to go from here.It come up with this Error:Exception in Tkinter callback ...
In my class, I have some methods that can be overridden by subclasses, but do not need to be.I like to test my project and generate a coverage report using coverage.py.Because the method of the ...
Consider the following code, if you will:class ParentService: BASE_DIR = '/some/path' class Results(str, Enum): RESULT1 = 'ResultOne.xlsx' RESULT2 = 'ResultTwo.pdf' ...
I am implementing a series of classes in Equinox to enable taking derivatives with respect to the class parameters. Most of the time, the user will be instantiating class A and using the fn function ...
I'm trying to create a bot Discord with Python.I created a class MyBot like this:import discordfrom discord.ext import commandsintents = discord.Intents.all()intents.members = Trueclass MyBot(...
I have a class for a GUI with two radio buttons one to set save_to_excel to True and the other to False. However I wanted to add a loading screen using threading, but when I add that second class the ...
I have a parent dataclass, and various other classes will then extend this parent dataclass. Let's call these dataclasses DCs. In the example code below, see ParentDC, and an example ChildDC:from ...
First up, I'm really pretty bad at OOP and tkinter/customtkinter and this is only my third project I've built with classes over straight functions, so please excuse my mess. I'm getting there, and ...
I want a decorator that I can use as both @decorator and decorator() with class methods, like this :def decorator_with_args(name): print(f'Hello {name} !') def decorator(func): def ...
I am trying to upgrade the OpenAI 0.28 version to 1.2.2. For doing that I defined the client and replaced the openai chatcompletion with client.Below is the constant file which will be used in the ...
What I'd like to achieve is:b.py(might be in a third party package I cannot modify):from xxx import Aclass B: def __init__(): self.a = A()The file I actually execute:execute.py...