Skip to main content
2 votes
0 answers
66 views

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 ...
Randumb_ASH's user avatar
-1 votes
1 answer
69 views

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 ...
user30428193's user avatar
1 vote
0 answers
108 views

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 ...
502E532E's user avatar
  • 581
0 votes
0 answers
43 views

Consider the following code, if you will: class ParentService: BASE_DIR = '/some/path' class Results(str, Enum): RESULT1 = 'ResultOne.xlsx' RESULT2 = 'ResultTwo.pdf' ...
zkvvoob's user avatar
  • 496
2 votes
1 answer
277 views

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 ...
JamesVR's user avatar
  • 173
-2 votes
2 answers
67 views

I'm trying to create a bot Discord with Python. I created a class MyBot like this: import discord from discord.ext import commands intents = discord.Intents.all() intents.members = True class MyBot(...
Toniixav's user avatar
1 vote
1 answer
44 views

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 ...
usherא's user avatar
  • 21
0 votes
1 answer
50 views

import pygame from math import radians, sin, cos from datetime import datetime class Clock: def __init__(self): self.width, self.height = 800, 800 self.white = (255, 255, 255) ...
Mohamad Homaei's user avatar
1 vote
1 answer
62 views

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 ...
bzm3r's user avatar
  • 4,664
0 votes
1 answer
58 views

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 ...
nannerpuss's user avatar
0 votes
2 answers
74 views

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 ...
Prasun Kumar Khan's user avatar
0 votes
0 answers
37 views

import tkinter as tk import math,time,random from PIL import ImageTk, Image,ImageEnhance start_time = time.time() window = tk.Tk() window.geometry("300x300") canvas = tk.Canvas(window, ...
MeHocha 333's user avatar
1 vote
3 answers
91 views

import tkinter as tk from PIL import ImageTk, Image window = tk.Tk() window.geometry("300x300") canvas = tk.Canvas(window, width=300, height=300,bg="red") canvas.pack() class ...
MeHocha 333's user avatar
0 votes
0 answers
360 views

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 ...
Pushpendra Singh's user avatar
0 votes
1 answer
43 views

What I'd like to achieve is: b.py(might be in a third party package I cannot modify): from xxx import A class B: def __init__(): self.a = A() The file I actually execute: execute.py ...
Feephy's user avatar
  • 143

15 30 50 per page
1
2 3 4 5
34