Movatterモバイル変換


[0]ホーム

URL:


Sorry, we no longer support your browser
Please upgrade toMicrosoft Edge,Google Chrome, orFirefox. Learn more about ourbrowser support.
Skip to main content
Stack Overflow
  1. About
  2. For Teams
Loading…
How are we doing? Please help us improve Stack Overflow.Take our short survey
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives
510 questions
Filter by
Sorted by
Tagged with
2votes
0answers
65views

New Dialog Class Incorrect Button Style

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 ...
-1votes
1answer
61views

Using .get() from an entry in tkinter within a class

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 ...
1vote
0answers
96views

Exclude methods consisting of a single pass statement from coverage reports in python

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 ...
0votes
0answers
36views

Accessing a sibling inner class in initialiser

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
2votes
1answer
254views

Return a different class based on an optional flag in the arguments without factory

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 ...
-2votes
2answers
60views

discord.ext.commands.errors.CommandNotFound: Command "coucou" is not found

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(...
1vote
1answer
44views

Adding a second class breaks tkinter variable

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 ...
0votes
1answer
41views

I wrote the code for this analog clock, but I don't know why place of the numbers are not correct

import pygamefrom math import radians, sin, cosfrom datetime import datetimeclass Clock: def __init__(self): self.width, self.height = 800, 800 self.white = (255, 255, 255) ...
1vote
1answer
62views

How to inherit (from a parent class) dataclass field introspection functionality?

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 ...
0votes
1answer
54views

Trying to center and uniformly space a 4x4 grid of entry widgets within a frame, within a frame class. What am I missing?

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 ...
0votes
2answers
67views

Python decorators with class methods

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 ...
0votes
0answers
34views

Having a problem with calling the class twice

import tkinter as tkimport math,time,randomfrom PIL import ImageTk, Image,ImageEnhancestart_time = time.time()window = tk.Tk()window.geometry("300x300")canvas = tk.Canvas(window, ...
1vote
3answers
82views

How to display an image with classes in tkinter?

import tkinter as tkfrom PIL import ImageTk, Imagewindow = tk.Tk()window.geometry("300x300")canvas = tk.Canvas(window, width=300, height=300,bg="red")canvas.pack()class ...
0votes
0answers
345views

OpenAI API upgrade from 0.28 to 1.x

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 ...
0votes
1answer
38views

How can I substitute an imported python class in a .py file without modifying the file itself?

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...
Feephy's user avatar

153050per page
1
2345
34

Hot Network Questions

more hot questions
Newest python-class questions feed

[8]ページ先頭

©2009-2025 Movatter.jp