#user-interfaces

1 messages · Page 15 of 1

wicked helm
#

im not using any font

tribal path
#

You're using the default font. Would need to locate a suitable font and use that.

(Kivy does have some font fallback via pango, but won't have a more generic fallback until version 3)

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @hushed crest until <t:1709561451:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

signal crown
#

need help with a timer that dosent seem to work with tkinter

#

when the button is pressed it seems to freezes and skip the first configured text then just shows the last text

sleek hollow
# signal crown

You can't use time.sleep in a ui. tkinter's mainloop is basically a fancy while loop, so using time.sleep essentially pauses the application. If you want some sort of timer, you need to use the .after method

signal crown
#

ik it was becausde it was a constant loop

#

ffs

wicked helm
proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @grand quest until <t:1709582785:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

tribal path
misty canopy
#

though, no, ☺ isn't there. i do have it, but from some other font. hmm.

wicked helm
#

emojis? eh i dont really mind no emojis

misty canopy
#

but... that's the symbol you posted?

wicked helm
#

not emoji

#

#

oh wat

#

discord

inland wedge
#

to get the unicode funcy symbols, sometimes u need a nerd font

#

gucharmap is a good program for viewing this stuff

worldly badge
rose depot
#

hi, i'm using the lib wxpython
how would you catch all event type to display the name of each as they happens ?

wraith forge
rose depot
#

oh thanks I missed that one

slim cairn
#
  1. Does building (using buildozer) kivy app takes a lot of time? Mine is 2hrs already and its still going on.
  2. Building same project after a change will also take longer?
  3. Will it be same experience when building other kivy projects?
forest rose
#

hey, has anyone here ever tried to install python bpy module?

tribal path
slim cairn
#

i5 procssor, win 10 wsl 🥲

slim cairn
forest rose
slim cairn
#

there is also bpy package in pypi

tribal path
#

Any chance you are building from /mnt/c ?

forest rose
slim cairn
forest rose
#

i have a conda env

#

trying to pip install bpy

tribal path
#

If you move your build env/folder into the wsl filesystem it'll build much faster

slim cairn
#

well i will remember that for next build.
😦 well it finally threw error
BUILD FAILURE: No main.py(c) found in your app directory.

slim cairn
forest rose
#

there is a bpy one?
just bpy?
lemme search

slim cairn
#

yep there is

forest rose
#

nope just the official blender

#

and some other ones

slim cairn
#

should i dm you the invite?

forest rose
#

yes please
I know there is an official one

#

not sure which one u r referring to

forest rose
rose depot
#

Hi
may someone here be both experienced in wxpython and willing to do a small code review ?

digital rose
#

Suggest me what else I should add

signal crown
#

@wicked helm hey are you online? what was that for loop you gave me a few days ago

#

i have list and needed to change everything in th elist's state to disabled

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @glossy shuttle until <t:1709798781:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

wicked helm
#

its very simple

balmy sentinel
#

So, I created some GUIs using FIGMA and converted them to Python using "Tkinter Designer" but I can't find a way to connect the GUIs between them so when I'm pressing a button it switches to the other GUI. I need to mention that I'm new to UI and I'm struggling to find a solution. Thanks in advance !

Here are some photos and the code of 2 of them :

https://paste.pythondiscord.com/FHMQ

signal crown
white shuttle
#

.

gusty osprey
#

what do you guys think abt the future of flet? I'm new to creating interfaces on python and it seems other packages are more polished, but it seems learning it could be a good bet instead of the ones we know?

signal crown
sleek frigate
#

Hi i dont know where to upload this question however i need help with align text in python. It in another language however i want the number beside the country to move to the right and they should be aligned.

#

it shoule look like this.

digital rose
#

I'm trying to set up a progress bar for a Downloader on custom tkinter.

I have a download function that's called when the download button is clicked, that removes its frame from the grid and updates progress on every iteration of the download.

What I expect to happen is that the the frame with the button would be removed from the grid immediately, and then the progress bar would be updated as normal. Instead, it stalls and doesn't go to the next screen until progress is completed

#

Going to post code in a sec

#

class SelectDirectoryFrame(customtkinter.CTkFrame):
    def __init__(self, master):
        super().__init__(master)
        self.grid_columnconfigure(0, weight=1)
        self.grid_rowconfigure(0, weight=1)
        self.grid_rowconfigure(1, weight=25)
        self.grid_rowconfigure(2, weight=2)
        
        self.title_label = customtkinter.CTkLabel(self, text='Ikemen-GO Build Downloader')
        self.title_label.grid(row=0, column = 0, sticky='enw', padx=1)

        self.directory_frame = DirectoryFrame(self)
        self.directory_frame.grid(row=1, column = 0, sticky='nwe') 

        self.next_button = customtkinter.CTkButton(self, text='Download', command = master.init_download, width=50)
        self.next_button.grid(row=2,column=0,  sticky='se', pady=7, padx=7)


class UtilFrame(customtkinter.CTkFrame):
    def __init__(self, master):
        super().__init__(master)
        self.grid_columnconfigure(0, weight=1)
        self.grid_rowconfigure(0, weight=1)

        self.select_directory_frame = SelectDirectoryFrame(self)
        self.select_directory_frame.grid(row=0, column=0, sticky='news')
        self.progress_bar_frame = None  

    def init_download(self):
        self.select_directory_frame.grid_remove()
        self.progress_bar_frame = ProgressFrame(self)
        self.progress_bar_frame.grid(row=0, column=0, sticky='news')
        download_release(Progress(self.progress_bar_frame))
#

class ProgressFrame(customtkinter.CTkFrame):
    def __init__(self, master):
        super().__init__(master)
        self.grid_columnconfigure(0, weight=1)
        self.grid_rowconfigure(0, weight=1)
        self.progress_bar = customtkinter.CTkProgressBar(master=master)
        self.progress_bar.grid(row=0, column=0)
        self.progress_bar.set(0)
        
    def step_download(self, current):
        self.progress_bar.set(current)


def download_release(progress):
    latest_request_url ="https://api.github.com/repos/ikemen-engine/Ikemen-GO/releases/latest"
    response = requests.get(latest_request_url)
    json = response.json()
    name = json["name"]
    assets = json["assets"]
    for asset in assets:
        if CURRENT_OS not in asset["name"]:
            continue
        with requests.get(asset["url"],stream=True, allow_redirects=True, headers={'Accept':"application/octet-stream"}) as r:
            total = int(r.headers.get('content-length', 0))
            count = 0
            with open(asset["name"], 'wb') as file:
                for data in r.iter_content(chunk_size=65536):
                    size = file.write(data)
                    count += size
                    progress.update(count/total)
#

Anyone know what could be wrong?

misty canopy
digital rose
#

Makes sense but I've seen many code examples of this progress bar and not once was threading used, they all used callbacks like this

#

Ok, just as I typed that I found a single example with threads

digital rose
#

Any suggestions for how I could make this UI look better?

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @calm coral until <t:1709947006:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

digital rose
royal cape
# digital rose Makes sense but I've seen many code examples of this progress bar and not once w...

i imagine you fixed this by running tk.update() alongside the progress bar? if you want to see another example, i recently wrote a tkinter GUI where downloading was done via an asyncio event loop running in a second thread:
https://github.com/thegamecracks/parallel-downloader/blob/v1.0.7/pdl.py

it's still updated via callbacks and is overall kind of overkill, but since the main thread isn't doing any waiting for I/O, it should be able to respond to user input without network latency causing the interface to hitch

digital rose
#

Can anyone tell me how do I get my tkinter apps to look good colorful and modern. My apps now look very basic and default

royal cape
# digital rose Can anyone tell me how do I get my tkinter apps to look good colorful and modern...

the two options i know of are:

  • ttkbootstrap (builds on top of tkinter's themed widgets and has several light/dark themes, plus a few new widgets)
  • customtkinter (remade widgets with light/dark themes)
    if you haven't used the tkinter.ttk module, you might also want to start with that since themed widgets will give you native-feeling widgets by default, and it's already part of tkinter

also if you aren't already familiar with the basics like the grid geometry manager, tkdocs has been a massively useful resource to me (and equally IDE autocompletion/type-checking as well)
https://tkdocs.com/tutorial/grid.html

hexed girder
#

def UI_Exception(self, s):
        dlg = QMessageBox(self)
        dlg.setText(s)
        dlg.setIcon(QMessageBox.critical)
        dlg.show()
        
    def file_open(self):
        path, _ = QFileDialog.getOpenFileName(self, "Open file", "", "Text documents (*.txt);All files (*.*)")

        if path:
            try:
                with open(path, "r") as f:
                        text = f.read() 
            except Exception as e:
                    self.UI_Exception(str(e))
            else:
                self.path = path
                self.editeur.setPlainText(text)
                self.modifierTitre()
        
    def sauverFichier(self):
        if self.path is None:
            return self.sauverFichier_comme()
            
        self.sauverChemain(self.path)
        
    def sauverFichier_comme(self):
        path, _ = QFileDialog.getSaveFileName(self, "Save file", "", "Text documents (*.txt)")

        if not path:
            return
        self.sauverChemain(path)

    def sauverChemain(self, path):
        text = self.editeur.toPlainText()
        try:
            with open(path, "w") as f:
                    f.write(text)
        except Exception as e:
            self.UI_Exception(str(e))
            
        else:
            self.path = path
            self.modifierTitre() 
            ```
        Why put "_" in path, _ = ...
somber hemlock
#

@hexed girder maybe the underlying c++ api expects it in that way, that's why

hexed girder
#

thin I meant : Why put _ in path, = ...

#

in path, _ = ...

somber hemlock
#

Oh okay

#

That's because the function returns 2 elements

#

The second you don't use, hence its a convention to name it _

hexed girder
#

which one we don't use ?

somber hemlock
#

You can use path, *_ = ... for example if you just need the first returned thing from 2 or more things

somber hemlock
hexed girder
somber hemlock
#

What do you not understand?

hexed girder
#

" since its after path "

somber hemlock
#
def fn():
    return 2, 3

a, b = fn()

do you understand this code?

hexed girder
#

yes

somber hemlock
#

So a is 2 and b is 3

hexed girder
#

yes

somber hemlock
#

So here the getOpenFileName is returning a path and something else

#

You only need the path in your code

hexed girder
#

ohhh okayyy

#

ty

somber hemlock
hexed girder
#

okayy understand

#

ty gey

#

guy*

digital rose
digital rose
#

@digital rose Look in here

mighty frigate
#

th happened in here

normal girder
#

Hello everyone !

#

I want to create a login window, with a wallpaper, and in this window I want to put a frame (which has two boxes one to write one for username and another for password and a button) I want the frame to be transparent which reflects the image of the window like this example https://imgur.com/kNgoH0N

worthy sequoia
#

hello guys I have a question, I made an application using tkinter and I would like to know if there’s a way I can use the application I built on my android phone. The application is a .py that I converted into a .exe but I can’t run the .exe on android so I should convert it into .apk but I don’t know if it will work to run the application on android

hot path
#

good morning everyone

#

oops wrong space

tribal path
#

@worthy sequoia You can use the py via pydroid3 (other apps may work too).

Compiling your own app/apk would be more involved, and not sure where could direct you to

short sequoia
#

I'm looking for some light UI development solutions, UI is not my strong point. I have some fairly system intensive analysis scripts that i would like to run on my workstation, but from anywhere on my local network. Right now I'm actually sshing in and running it. I'd much prefer access it view a browser (but not via notebook).

Other than using the httpd and building out a ui with that, are their any frameworks that might be applicable here? Security is less a concern, its a locked down local network.

royal cape
stiff ore
#

I see

#

again, thanks for your help

sharp storm
#

I wanna like, in tkinter...
To have video player, already done actually, basic, update image, add frame count.
I want add under it like scroll bar, that shows where at video i am, but, i want also display there, on that bar, frame colors palette , for each frame.
I can probably make up some way to generate that image, [x: time; y: palette]
But it sure will be longer than i can display, and i want to make it background or smth for the video scroll bar...

So i wanna make that scroll bar same length in pixels as frames in video, and make scrollbar itself scrollable....

Atleast help me understand what i want, ty.

versed acorn
#

i really am sorry for what happened i got hacked and i am currently looking for a way of fixing the problem before it worsens if anyone has a suggestion to help fix it fast i would be grateful

sharp storm
#

Or your mail got hacked.. there is same thing, changing pass should work

versed acorn
#

ok great i solved the problem and thx for the help btw what actually fixed the problem was enabling 2fa

ebon mango
#

is there a way to lock my tkinter app's aspect ratio? (it should still be resizable)

sharp storm
#

I usually just drop all styles and make all scripts from zero.. but it can be slower that way..

mighty frigate
past ledge
#

Form editor! You can make forms, export them as .json files and import the json files to see its content! I also need to know a better name for it...

digital rose
#

Hello, I have gained quite a bit of experience with Tkinter in the past few months and I am ready to take my GUI learning to the next level. What would anyone recommend to get into next now that I have almost mastered Tkinter?

somber hemlock
sinful pendant
brazen sapphire
#

Hello, I'm trying to render a 2d animated textures with GLFW and OpenGL but on screen, some part of the animation look quite strange and I have no idea where it's coming from. (I'm new to OpenGL and the way I did it may not be the usual method. I'm all ears for better implementations)

Here's the output (the attached gif) : some pixels on the first frame are shifted

Here's my code :
opengl_test.py
https://paste.pythondiscord.com/ZQQQ

shader.vert

#version 330 core

layout (location=0) in vec2 vertexPos;
layout (location=1) in vec2 vertexTexCoord;

uniform vec2 tilePos;
uniform vec2 cameraPos;
uniform mat2 cameraSize;

uniform vec2 texPos;
uniform mat2 texSize;

out vec2 fragmentTexCoord;

void main() {
    gl_Position =  vec4(cameraSize * (tilePos - cameraPos + vertexPos), 0, 1);
    fragmentTexCoord = texSize * vertexTexCoord + texPos;
}

shader.frag

#version 330 core

in vec2 fragmentTexCoord;

out vec4 color;

uniform sampler2D imageTexture;

void main() {
    color = texture(imageTexture, fragmentTexCoord);
}

test3.png

#

Even if you dont know how to fix it but just why it behaves like that I'm interested (ping me)

digital rose
#

@somber hemlock @sinful pendant Thank you. That is slightly surprising. I suppose this is because Tkinter does a good enough job at handling most application needs as far as Python is concerned? It seems I have more research to do on the topic. Thanks for the responses.

sleek hollow
#

if you just need a basic window with some buttons then sure, tkinter is "good enough"

somber hemlock
sleek hollow
somber hemlock
sleek hollow
#

I'm lightning fast with python gui. If we have a problem that needs solving, I can whip up a gui and have it out quickly

somber hemlock
#

You use Qt Widgets iirc

sleek hollow
#

yeah

#

I'm not building huge enterprise software with python. I'm building in-house tools to solve specific problems

digital rose
#

Just in case anyone that helped earlier was wondering, the specific issue related to Tkinter not displaying proportional ASCII images is mostly related to not using monospace fonts. Using unicode spaces like em spaces was redundant. Simply specifying the strings as raw and using monospace fonts makes the art render exactly as it looks in other programs like notepad.

tribal path
#

And I think in kivy

civic garnet
#

Hello I joined the discord to ask if there is anyway to embed lightweight_charts / Chart object/window to a frame. It opens in a seperate window I guess a TopLevel but I am not sure. Did anyone worked with it before ? (I am not pro level in python so sorry for if th equestion is silly.)

frosty nacelle
#

I made a console application for a task manager project (as a beginner project).

What is a good beginner friendly library for making it into a GUI based application? Is there any crash course for the basics that isn't 3 hours+? I don't mind rewriting my code.

#

Nvm, I think I will make it with Tkinter. Found a 50 minute crash course

tight ice
winter moat
#

I'm writing a rather simple Python application in which I would like to have a multiline textfield, textbox or textarea to which I can add received responses over time. Been searching for days now on the internet, DearPyGui documentation and forum and on this Pyhton discord server. Unfortunately I have not found anything which will provide the possibility to build up a text or list like this. I did manage to update a piece of text but this way only the last received response is shown.

Is it possible in DearPyGui to build up and display a list of text like this? If so how would one do that? I can't imagine such a rather simple functionality is impossible to accomplish in a DearPyGui interface.

somber hemlock
winter moat
#

This is the code I use to send commands to GRBL and receive responses from GRBL.

def send_command(command):
global ser
if ser and ser.is_open:
ser.write((command + '\n').encode())
time.sleep(0.1) # Wait for GRBL to process command
dpg.set_value("##GCODE_INPUT", "")
else:
dpg.add_text("Serial port is not open")

def receive_response():
global ser
response = ser.readline().decode().strip()
return response

def listen_to_GRBL():
global ser
status = True
# Define a function to continuously read responses
while status:
response = receive_response()
if response:
print(response)
if "ok" in response or "error" in response:
status = False

What I would like is a text area, multiline testfield or something in which I can add the responses and build uit a list of responces received during a session. Preferably with a scrollbar.
Example of output I would like in the list or textbox
Response:
Response ok
Response ok
$0=10
$1=25
$2=0
$3=0
$4=0
$5=0
$6=0
$10=1
$11=0.010
$12=0.002
$13=0

sleek hollow
tight ice
#

Image of code I suppose - And a couple months ago you said you just hardcode it (instead of using any designer that generates ui files), surely this takes ages to develop because you have to reload the ui everytime you make a change

tight ice
sleek hollow
#

and yeah, reloading the ui takes like half a second. If you use designer, you'd also have to reload the UI to see your changes so I don't know what the difference there is?

sleek hollow
# tight ice Also do the uis scale

Depends on the UI. Some of them I used fixed sizes, but some expand if there's content in it the user might want to have more space for

#

If my UI uses a large data set and would make it slow to develop, I would usually use a smaller sample while I build the UI, and then afterwards I'd swap it to using the larger data set

somber hemlock
#

@sleek hollow did you finally use the QAbstractItemModel yet?

sleek hollow
somber hemlock
#

Its so poorly implemented in python

sleek hollow
#

how so?

somber hemlock
#

The internal pointer thing really disappears

sleek hollow
#

I guess I don't know what I'm missing out on since I don't use c++

somber hemlock
#

Completely ignoring python's memory management

#

Like in C++ you can have a nullptr, but in Python you can't, but thanks to Qt, you actually can

#

Have you finally jumped ship over to QML or still on Qt widgets?

sleek hollow
#

nah haven't touched qml yet

somber hemlock
#

Qml is haphazard tbh

#

Its still just a second thought

sleek hollow
#

I don't really have a reason to jump over. I have a fairly big library of custom widgets I'd rather not have to recreate

somber hemlock
#

What custom widgets have you created?

sleek hollow
#

not so much in the styling, but in the functionality

#

with functionality that fetch specific data that I can reuse in my UI

somber hemlock
#

What base class are you using for them

sleek hollow
#

Usually QWidget

somber hemlock
#

Means are they like infinite scroller type thingies?

#

That's pretty common i guess

sleek hollow
#

nah nothing like. These are all UI I use for Autodesk Maya

#

so it's specific functionality to my pipeline there

#

fetching scene assets, configuring scene data into objects and displaying them in lists, etc

somber hemlock
#

Gtk has arguably gotten a better list / tree model / view impl

sleek hollow
somber hemlock
#

You should look at it once just for like inspiration

somber hemlock
ionic charm
#

hard to decide if this should go into here or web.. here because its a desktop interface. but web because.. well its web 🤷 lol
anyway, ive been working on a little project. think of it as "kind of" electron for python, though also really not..
long story short its a template for designing desktop apps using python and astro (https://astro.build) to create nice interfaces using web technologies
astro has the benefit also of using the concept of islands and allowing one to use any framework they like, vua,react,lit,svelte whatever suits you, though my framework provides for plain astro components or vue by default.

tight ice
tight ice
#

Is building uis a main aspect of your job?

sleek hollow
sleek hollow
sleek hollow
tight ice
sleek hollow
#

So recently I wrote a script that took a 2d sprite sheet and created a custom texture so we could display and animate it as the face of a 3d character

#

Then created a supporting tool for animators to actually interact with that setup

#

There's no way I could have built that UI in designer since it's almost entirely dynamic. It detects any character in the scene with that setup in my animation file, and dynamically creates a tab for that character populated with buttons for that character's face

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @viral thorn until <t:1710816182:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

#

:incoming_envelope: :ok_hand: applied timeout to @digital rose until <t:1710816348:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

normal girder
mighty frigate
#

hu ?

#

what

mighty frigate
normal girder
mighty frigate
#

I mean, good for you ?

#

I have no idea why you're saying that to me

#

ah it's from 4 days ago

normal girder
verbal gorge
#

Hi Does anyone need blockchain & web developer?

wise lichen
#

how awful is my stream deck app on a scale from 1 - 10

#

(made using tkinter)

icy trench
#

progress is progress.

digital rose
#

also make in tkinter

#

and pr is NOT print, it's actually port 1 "Hello World" so it sends to data to port 1

#

it's assembly language

wise lichen
steep ledge
#

Can you help me? I’m trying to create a PyQt5 GUI for real time audio pitch processing, are there any things I should add to my code? Or anything needs fixing?

https://paste.pythondiscord.com/L5RQ

#

Sorry, the code is generated by ChatGPT

digital rose
#

What is the best python-based GUI to learn? I have some experience with tkinter and pyqt, they seem intuitive and relatively simple with their own strengths, so is there some others I should try out or should I depart from python and begin learning something else if my current interest is in GUI's?

sleek hollow
wispy flume
#

this page is very empty, what should i add to it?

wispy flume
somber hemlock
versed moon
#

Hey guys! I am new in this community. I have some problems with my code i cant seem to resolve.

#

If anyone can help me it would be great.

#

Please feel ffree to PM me or instruct me where I can share code.

#

Thankyou.

somber hemlock
orchid hemlock
#

hi, i need help with a basic window (on W11). (first time I code with python)

I want to highlight an area on the screen based on a region (x, y, width, height).
To do this, I'm creating a window with 50% opacity to easily visualize the area.
I want to set a red background color, but my "highlight" area is still white.

How can I get opacity + background color in my window?

This is my code:

import time
import win32api
import win32con
import win32gui

class Highlight():

    def __init__(self, x: int, y: int, w: int, h: int):
        self.registerWindowClass()
        self.createWindow((x, y, w, h))
        
    def registerWindowClass(self):
        self.window = win32gui.WNDCLASS()
        self.window.hInstance = win32api.GetModuleHandle(None)
        self.window.lpszClassName = 'Highlight'
        self.window.style = win32con.CS_HREDRAW | win32con.CS_VREDRAW
        self.window.hCursor = win32gui.LoadCursor(0, win32con.IDC_ARROW)
        self.window.hbrBackground = win32gui.CreateSolidBrush(
            win32api.RGB(255, 0, 0))
        win32gui.RegisterClass(self.window)
        
    def createWindow(self, rect: tuple[int, int, int, int]):
        self.hwnd = win32gui.CreateWindowEx(
            win32con.WS_EX_LAYERED | win32con.WS_EX_TOPMOST | win32con.WS_EX_TOOLWINDOW,
            self.window.lpszClassName, '', win32con.WS_POPUP,
            *rect,
            None, None, self.window.hInstance, None
        )
        win32gui.SetLayeredWindowAttributes(
            self.hwnd, win32api.RGB(255, 0, 0), 128, win32con.LWA_ALPHA)

    def show(self):
        win32gui.ShowWindow(self.hwnd, win32con.SW_SHOWNORMAL)
        time.sleep(5)
        self.close()

    def close(self):
        if self.hwnd:
            win32gui.DestroyWindow(self.hwnd)
            win32gui.UnregisterClass(self.window.lpszClassName, None)
            self.hwnd = None
orchid hemlock
#

okay, I finally made it work. Maybe I can do better/simplier ?

import time
import win32api
import win32con
import win32gui

class Highlight():

    def __init__(self, x: int, y: int, w: int, h: int):
        self.registerWindowClass()
        self.createWindow((x, y, w, h))
        
    def registerWindowClass(self):
        self.window = win32gui.WNDCLASS()
        self.window.hInstance = win32api.GetModuleHandle(None)
        self.window.lpszClassName = 'Highlight'
        self.window.style = win32con.CS_HREDRAW | win32con.CS_VREDRAW
        self.window.hCursor = win32gui.LoadCursor(0, win32con.IDC_ARROW)
        self.window.lpfnWndProc = self.wndProc
        win32gui.RegisterClass(self.window)
        
    def createWindow(self, rect: tuple[int, int, int, int]):
        self.hwnd = win32gui.CreateWindowEx(
            win32con.WS_EX_LAYERED | win32con.WS_EX_TOPMOST | win32con.WS_EX_TOOLWINDOW,
            self.window.lpszClassName, '', win32con.WS_POPUP,
            *rect,
            None, None, self.window.hInstance, None
        )
        win32gui.SetLayeredWindowAttributes(
            self.hwnd, 0, 64, win32con.LWA_ALPHA)

    def show(self):
        win32gui.ShowWindow(self.hwnd, win32con.SW_SHOWNORMAL)
        win32gui.UpdateWindow(self.hwnd)
        time.sleep(5)
        self.close()

    def close(self):
        if self.hwnd:
            win32gui.DestroyWindow(self.hwnd)
            win32gui.UnregisterClass(self.window.lpszClassName, None)
            self.hwnd = None

    def wndProc(self, hWnd, message, wParam, lParam):
        if message == win32con.WM_PAINT:
            hdc, ps = win32gui.BeginPaint(hWnd)
            brush = win32gui.CreateSolidBrush(0x0000FF)
            client_rect = win32gui.GetClientRect(hWnd)
            win32gui.FillRect(hdc, client_rect, brush)
            win32gui.EndPaint(hWnd, ps)
            return 0
        else:
            return win32gui.DefWindowProc(hWnd, message, wParam, lParam)
somber hemlock
proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @floral flame until <t:1711257910:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

vivid panther
#

I will pay 15$ the person who succeeds changing my small custom tkinter code program background to a gif background

#

dm me for source code

misty canopy
#

!rule 9

proven basinBOT
#

9. Do not offer or ask for paid work of any kind.

vivid panther
#

any ideas how to make a button background to be transparent? I tried bg_color='transparent' but it didnt work, it just looks like this

fallen forge
#

@tribal path regarding the help post #1221439743741657229) I specified these 2 variables to .spec file and the error still persists ```
android.jdk = 17

(int) Minimum API your APK / AAB will support.

android.minapi = 24

tribal path
#

Not aware of android.jdk being a thing; anyway it's sudo update-alternatives --config java that you should be running, and make sure to clean the old build away

fallen forge
fallen forge
#

Yes! It took a good 30 minutes to build and it was successful! Thanks a lot 😄

#

what if I do changes to code and need to rebuild? Do I need to delete existing folders that were made and re-do the 30 minutes build everytime?

dense salmon
#

Does anyone know a better guide for customtkinter than the documentation? It seems to be lacking quite a bit.

orchid hemlock
proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @meager owl until <t:1711316352:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

sage vale
#

i wonder if we will ever know why the spammers target this channel 😔

sacred wasp
#

When it comes to user interface, does this come down to software/app development?

sleek hollow
#

but yes, just about every software uses some sort of UI

sacred wasp
sleek hollow
sacred wasp
#

Just looking to see how I’d bring it to life

sleek hollow
sacred wasp
#

That’s it

#

My GitHub is on my profile for reference

#

I forgot a lot from then

sleek hollow
#

I'd refamiliarize yourself with the basics of python then before jumping into learning a UI library

sacred wasp
#

Sounds good

fallen forge
#

I'm trying to build a mobile app with kivy, but scaling buttons and other stuff is a bit hard. They look completely different when ran from the py file than on .APK file, well the screen is very different so it makes sense.
Just thinking how to scale them properly or do I just need to do trial and error? The build takes ~30 minutes which sucks a bit

digital rose
#

hello all

#

i am looking for the tutorial for eel package , an official one . to create a desktop application using python and html css . but i cannot find any official video for that .

#

can you help me with this?

wicked helm
#

!e
print("Hello World!")

proven basinBOT
#

@wicked helm :white_check_mark: Your 3.12 eval job has completed with return code 0.

Hello World!
proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @autumn gust until <t:1711565551:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @magic pine until <t:1711578660:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

viral minnow
#
    async def updater(self, interval):
        while not self.quit_app:
            self.update()
            await asyncio.sleep(interval)
        await asyncio.gather(*asyncio.all_tasks())

This wouldn't work wouldn't it?
I wanted to make my tkinter app wait for any running task to properly close before closing the app

royal cape
# viral minnow ```py async def updater(self, interval): while not self.quit_app: ...

in general im strongly in favour of using asyncio.run() for handling cleanup because of how much needs to be done, but i cant think of a way to apply that here given that one of the tasks is updating the GUI...

my recent take on this was having a fairly simple EventThread class handle the lifetime of the event loop in a separate thread which allows tkinter and asyncio to wait on separate things at once, or in other words not block each other, but hooking it up to tkinter took a bit more effort, and of course it may not be an easy change to do for your existing code

#

in short, coroutines get submitted to the event loop and callbacks are used to send information/events from those coroutines back to the tkinter GUI to be acted upon

digital rose
#

how can i add a clickable hyperlink inside of my text box (ttk)?

hybrid isle
#

https://paste.pythondiscord.com/CYGQ

so... I need the loading screen to display 'instantly' upon launch and I need the mainWindow to be reactive... but I keep getting errors because I'm trying to use differnet threads.

#

is there a work around?

hybrid isle
#

Tkinter Designer

hybrid isle
zenith wyvern
#

Guys did every of you had problems with learning qt for python

#

?

#

I just cant learn it

#

I am stuck

#

I am the only one or someone else had troubles with it

sleek hollow
#

How long have you been learning python for?

zenith wyvern
#

Two years

sleek hollow
#

are you comfortable with OOP?

zenith wyvern
#

I think I am

sleek hollow
#

what do you find yourself struggling with for qt then?

#

can you build a basic UI?

zenith wyvern
#

Now I am making sure I am making great understand of all builded in stuff in python

#

But yeah I can make ui in qt designer

sleek hollow
#

I really recommend not touch designer if you want to properly learn

#

you'll be much better off

#

learn how to build a basic UI from scratch

zenith wyvern
#

So you think that coding everything by yourself is better to understand everything

sleek hollow
#

100%

#

stay far away from designer

zenith wyvern
#

I will

#

Thank you

#

Once I will learn django and sth like fast api I want to learn qt

sleek hollow
#

you should be able to learn the basics of a UI in a few days for qt (pyside)

#

make ui, add a layout, add a button, connect button to function

#

that's majority of what you'll be doing early on

zenith wyvern
#

I hope it will be easy

#

It wont be but

#

I have to have faith

sleek hollow
#

once you understand that basic structure, it's not too hard

zenith wyvern
#

I hope it will be like you are you saying

sleek hollow
# zenith wyvern I hope it will be like you are you saying
from PySide2 import QtWidgets


class Window(QtWidgets.QDialog):

    def __init__(self):
        super().__init__()
        layout = QtWidgets.QVBoxLayout(self)

        btn = QtWidgets.QPushButton("Push Me.")
        btn.clicked.connect(self.on_btn_clicked)
        layout.addWidget(btn)


    def on_btn_clicked(self):
        print("Hello World")


app = QtWidgets.QApplication([])
win = Window()
win.show()
app.exec_()



#

Here's a basic window with a button

#

study it, learn from it

#

then try adding things to it, try changing things

zenith wyvern
#

Learn by coding or at first trying to learn it by heart

sleek hollow
#

learn by doing

#

get to a point where you can create this very simple UI without any issue

#

code this twice a day until you've internalized it

zenith wyvern
#

So I just have to write write and once again write

sleek hollow
#

yes

#

this structure is needed in just about every qt program

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @digital rose until <t:1711798025:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

digital rose
proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @digital rose until <t:1711923012:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

sleek hollow
#

@frank quest Did a quick mockup in pyside

frank quest
#

i will try later

royal field
somber hemlock
#

although the original c++ qt docs are wayy better

hybrid flint
#

Hi! there is someone that know well kivy and kivymd ? 🙂

steady halo
#

r
I want to make a small app is it better to start with the ui first or coding first, also what ui designer is the best right now? so far I've only used QtDesigner

sleek hollow
steady halo
sleek hollow
# steady halo 💀 why

Because you won't actually learn anything about qt. Trust me, you'll be far better off if you learn to code UI from scratch

steady halo
#

damn ok

#

but we're learning it in school so i guess i have no choice

#

what other ui designer should i use

sleek hollow
#

that's unfortunate

steady halo
#

yea

#

ill learn one on the side i guess

sleek hollow
steady halo
#

oo

sleek hollow
#

because it's not practical

steady halo
#

wait but how do i get the app to look good

sleek hollow
#

by understanding design principles

steady halo
#

python can design apps without ui designers?

sleek hollow
# sleek hollow

I coded this from scratch. It's not pretty by any means, but it was just a quick example

#

you still use PyQt or PySide, just don't use Qt Designer

steady halo
#

Ok, so you still code it with Qt but u dont design it on the QtDesigner app itself

sleek hollow
#

correct

steady halo
#

okok thanks

sleek hollow
#

once you understand basic layouts, you can visualize it and just make it

#

or you can mock it up in a drawing program first like photoshop, or even good ol' pen and paper

steady halo
#

Yeah that's what I did with a homework we had, because I found it much easier than the way we were taught to. Apparently when doing it on the Designer app you need to create a layout then export it and convert it to python code to use it

#

so anytime its modified you need to redo the whole process

steady halo
sleek hollow
#

exactly

#

you can also create reusable custom widgets if you code them from scratch

#

for example, it can be a few steps if you want to create a button with an icon displayed on it

#

Create button
Create QIcon
Set icon to button

#

It's even more of a pain if you want to resize that icon

steady halo
#

ok yea

sleek hollow
#

or instead, you could create your own custom class that accepts an image path as an argument and handles it all for you

#
class ImageButton(QtWidgets.QPushButton):

    def __init__(self, img_path):
        super(ImageButton, self).__init__()
        self.img = QtGui.QPixmap(img_path)
        icon = QtGui.QPixmap(img_path)
        self.setIcon(QtGui.QIcon(icon))
        self.setIconSize(icon.size())
#

it's not super exciting, but now I can just use ImageButton whenever I want a button with an image

#

I have a whole file full of custom classes like this which is a huge time saver

steady halo
#

Ok yea it seems more practical sincce you can reuse it

steady halo
#

but even if I'm only doing most of the design in python itself, should I stick to QtDesigner or something else

sleek hollow
#

stay away from designer, lol

steady halo
#

Ok so you dont even have the app

sleek hollow
#

Nope

steady halo
#

its only the PyQt

#

ok i get it now

sleek hollow
#

I spent like a month with designer when I first started learning qt and if anything, it set me back

steady halo
#

ok thanks for the advice

sleek hollow
#

I don't know of anyone who uses it professionally. I think it's good for people who have no intention of actually learning Qt and just want a quick UI to plug things into

hybrid flint
#

humm nobody know kivy or kivymd ?

tribal path
#

Best just to pose your issue

hybrid flint
#

@tribal path Ok, well i'm using a MDDAtatable widget in kivy with checkbox for each row and then i have a MDIconButton. I want to fetch checked row with the button. But for moment i cant even print something with the button and i dont see what i'm doing wrong :/

#

here a bit of my kivy main.py :```python
class StationListScreen(Screen):
def init(self, **kwargs):
super(StationListScreen, self).init(**kwargs)
self.tableau = self.ids.table_liste_stations
self.tableau = ""

def on_pre_enter(self, **kwargs):
    bdd = DatabaseHelper()
    stations = bdd.select_stations()
    tab_box = self.ids.table_liste_stations
    tab_box.clear_widgets()
    data = StationInfo(stations).get_station_liste()
    self.tableau = MDDataTable(
        use_pagination=False,
        check=True,
        size_hint=(.1, .5) ,
        pos_hint={"center_x": .5, "center_y": .5},
        column_data=[
            ("Station", dp(40)),
            ("id", dp(30)),
        ],
        row_data=data,
    )
    tab_box.add_widget(self.tableau)

pass

class MainApp(MDApp):

def build(self):
    self.icon = "Icon/fuel.png"
    screenmanager = MDScreenManager()
    screenmanager.add_widget(MenuScreen(name="menu"))
    screenmanager.add_widget(AjoutScreen(name="addnewstations"))
    screenmanager.add_widget(StationListScreen(name="listestations"))
    return screenmanager

def return_home(self):
    self.root.current = "menu"

MainApp().run()

#

and my kv file : ```kv
<StationListScreen>
Screen:
name : "listestations"
MDFloatLayout:
size_hint: .3 , .005
orientation:"horizontal"
MDIconButton:
icon: 'delete'
pos_hint:{"center_x":.8,"center_y":self.height-2}
MDBoxLayout:
orientation:'horizontal'
MDIconButton:
id: btn_delete
icon: 'trash'
pos_hint:{"top":3}
on_press:root.manager.get_screen("listestations").get_station_to_delete()
MDBoxLayout:
size_hint: .2 , .005
MDBoxLayout
id :table_liste_stations
padding:[1,1,1,1]
size_hint:.4,.4
pos_hint:{"top":1}
MDBoxLayout:
size_hint: .3 , .005

    MDBoxLayout:
        MDTopAppBar:
            title: "Home"
            pos_hint:{"top":1}
            left_action_items: [["menu", lambda x: nav_drawer.set_state('open')]]
            right_action_items: [["home", lambda x: app.return_home()]]
    MDNavigationDrawer:
        id: nav_drawer
        MDNavigationDrawerMenu:
            MDNavigationDrawerItem:
                icon: 'egg'
                text: "Ajout nouvelle station"
                on_press:
                    nav_drawer.set_state('close')
                    root.manager.current='addnewstations'
            MDNavigationDrawerItem:
                icon: 'egg'
                text: "Liste des stations"
                on_press:
                    nav_drawer.set_state('close')
                    root.manager.current='listestations'
tribal path
#

You are nesting a Screen within a Screen there, not sure if that's causing any issues, is the issue with station_to_delete; what happens there?

hybrid flint
#

May the quote in discord made this cause in my kv file i dont see 2 screen nesting 😦

tribal path
#

StationListScreen is a Screen, into which you have added another as a child widget @hybrid flint

narrow hedge
#

hey guys, Im a beginner py dev and wanted to create a music player in python, it's got a rather slick and modern look. I did design it in figma and would like to create a functioning replica in python

#

from the looks of it, i think it would be rather complicated to create it using an existing library like tkinter so should i go with using css and html, ie, as a flask project

#

this is the ui if you're wondering

sleek hollow
#

nothing (visually) looks too complex here. It uses a custom font, and has some image buttons

narrow hedge
#

well, Ill give it a go

#

though can I give the image assets for individual components like the slider?

hybrid flint
#

ok so i delete the "Screen:" , but my call to the button isnt working always 😦

sleek hollow
hybrid flint
sleek hollow
#
from PySide2 import QtWidgets, QtCore, QtGui
from PySide2.QtCore import Qt


class Window(QtWidgets.QDialog):

    def __init__(self):
        super().__init__()
        self.setWindowFlags(self.windowFlags() ^ Qt.WindowContextHelpButtonHint)
        layout = QtWidgets.QVBoxLayout(self)

        pal = self.palette()
        pal.setColor(QtGui.QPalette.Window, Qt.black)
        self.setPalette(pal)

        self.slider = QtWidgets.QSlider()
        self.slider.setFixedHeight(100)
        self.slider.setOrientation(Qt.Horizontal)
        layout.addWidget(self.slider)
        slider_stylesheet = """
        QSlider::groove:horizontal {
            background-color: #666666;
            height: 2px;
        }

        QSlider::handle:horizontal {
            background-color: #884400;
            border: 2px solid #ccaa99;
            width: 18px;
            margin: -10px 0;
            border-radius: 9px;
        }

        QSlider::add-page:horizontal {
            background-color: white;
        }
        """
        self.slider.setStyleSheet(slider_stylesheet)
        self.resize(300, 60)




app = QtWidgets.QApplication([])
win = Window()
win.show()
app.exec_()

#

If you want to play around with it

limber token
#

I'm unwise at making this decision.

In terms of designing the placements of widgets, which one fits for the program?
Cooridinates or row/col (pack and grid)?

sleek hollow
sage vale
#

dear people that get muted in this channel: before you do so, please tell me why all of you pick this channel

weary junco
#

File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
File "E:\pycharm projects\python and langchain.venv\Lib\site-packages\kivy\uix\widget.py", line 589, in on_touch_down
if child.dispatch('on_touch_down', touch):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
File "E:\pycharm projects\python and langchain.venv\Lib\site-packages\kivy\uix\behaviors\button.py", line 151, in on_touch_down
self.dispatch('on_press')
File "kivy\_event.pyx", line 727, in kivy._event.EventDispatcher.dispatch
File "kivy\_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
File "kivy\_event.pyx", line 1231, in kivy._event.EventObservers._dispatch
File "E:\pycharm projects\python and langchain\kivy new.py", line 40, in start_listening
with sd.InputStream(callback=callback):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\pycharm projects\python and langchain.venv\Lib\site-packages\sounddevice.py", line 1421, in init
_StreamBase.init(self, kind='input', wrap_callback='array',
File "E:\pycharm projects\python and langchain.venv\Lib\site-packages\sounddevice.py", line 898, in init
_check(_lib.Pa_OpenStream(self._ptr, iparameters, oparameters,
File "E:\pycharm projects\python and langchain.venv\Lib\site-packages\sounddevice.py", line 2745, in _check
raise PortAudioError(errormsg, err, hosterror_info)
sounddevice.PortAudioError: Error opening InputStream: Unanticipated host error [PaErrorCode -9999]: 'Undefined external error.' [MME error 1]

cant solve this problem

hybrid flint
#

Hi, i solve part of my problem on kivymd mddattable ^^ now i'm trying to have a way to fetch selected row in my table. in mddatatable there is :python def on_check_press(self, instance_table, current_row): '''Called when the check box in the table row is checked.''' print(instance_table, current_row) i use it to bind a click on checkbox : python class StationListScreen(Screen): def on_pre_enter(self, **kwargs): self.tableau = MDDataTable( use_pagination=False, check=True, size_hint=(.1, .8) , pos_hint={"center_x": .5, "center_y": .5}, column_data=[ ("Station", dp(40)), ("id", dp(30)), ], row_data=data, ) tab_box.add_widget(self.tableau) self.tableau.bind(on_check_press=self.on_check_press) def on_check_press(self,instance_table,current_row): print(instance_table, current_row) problem : it take each click on the checkbox but i dont know it the row is selected or unselected. so i try to deal with the function on_check_press like that :```python
def on_check_press(self,instance_table,current_row):
'''Called when the check box in the table row is checked.'''
click = 0
if click == 0:
current_row.append(True)
self.checked.append(current_row)
click += 1
else:
current_row.append(False)
self.checked.append(current_row)
click = 0
return self.checked

hybrid flint
#

i found how to do it , thanks anyway for listening ^^

narrow hedge
flat sorrel
#

Hello guys, is anyone worked with CTk, CTkTable?

i used CTkTable for show data from database, but idk, how to add scroll with vertical orientation 😦

import CTkTable

table = CTkTable.CTkTable(master=frame, row=1, column=3, text_color="blue",
                          font=("Roboto", 16, "bold"), wraplength=300, header_color="white")
table.grid(row=2, column=0, columnspan=1, padx=[20,10], pady=[0, 50], sticky='nsew')

yscrollbar = customtkinter.CTkScrollbar(master=frame, orientation="vertical")
yscrollbar.grid(row=2, column=1, padx=[0, 25], pady=[0,50], sticky='nse')

As a result after filling table by data i have smt like that:
I'm tried to find resolution of that problem in stackoverflow, but find only smt like add that part in CTkScrollBar()

command=table.yview

and after that add configuration like

table.configure(yscrollcommand=yscrollbar.set)

But it don't work

Error log:

 AttributeError: 'CTkTable' object has no attribute 'yview'

Maybe anyone have some idea, how to resolve that problem?

#

ScrollBar doesn't displayed because of error
Upd: CTkTable also don't have attribute "yscrollcommand"

flat sorrel
#

Oh, i just placed CTkTable in CTkScrollableFrame

summer hound
proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @remote crown until <t:1712178053:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @spring briar until <t:1712179874:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

sage vale
#

i suspect humans will solve quantum gravity before we solve the mystery of this channel 😔

sleek hollow
#

This mystery keeps me up at night

ivory marsh
#

Can someone please help with a canvas problem im having?

#

I'm trying to remove everything in a canvas to then re-put stuff in, but I get this error:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\billy\AppData\Local\Programs\Python\Python312\Lib\tkinter_init_.py", line 1967, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File "C:\Users\billy\OneDrive\Desktop\testing.py", line 452, in <lambda>
button_next = Button(root, text="Next Encounter", padx=30, pady=15, command=lambda: [label.destroy(), button_next.destroy(), reset_game(), encounter_start.grid(row=2, column=0)])
^^^^^^^^^^^^
File "C:\Users\billy\OneDrive\Desktop\testing.py", line 296, in reset_game
canvas, image, background = create_initial_elements()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\billy\OneDrive\Desktop\testing.py", line 324, in create_initial_elements
canvas.create_image(0, 0, image=background, anchor=tk.NW)
File "C:\Users\billy\AppData\Local\Programs\Python\Python312\Lib\tkinter_init_.py", line 2864, in create_image
return self.create('image', args, kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\billy\AppData\Local\Programs\Python\Python312\Lib\tkinter_init
.py", line 2850, in _create
return self.tk.getint(self.tk.call(
^^^^^^^^^^^^^
_tkinter.TclError: invalid command name ".!canvas"

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @restive cairn until <t:1712222611:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

digital rose
sleek hollow
steady halo
#

is it possible to change the line edit frame shape with pyqt5

proven basinBOT
#

failmail :ok_hand: applied timeout to @high cobalt until <t:1712247937:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

steady halo
sleek hollow
proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @random rivet until <t:1712271858:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

cobalt wind
#

is there such thing as a code visualizer/map? i just want something where i can create a block called "clicked" and then make a line from that to "on clicked func" so that i can more easily understand my code by creating this code map (not something automatically created by inserting pre-existing code) please @ with responses so i see

weary junco
#

File "E:\pycharm projects\python and langchain.venv\Lib\site-packages\sounddevice.py", line 1421, in init
_StreamBase.init(self, kind='input', wrap_callback='array',
File "E:\pycharm projects\python and langchain.venv\Lib\site-packages\sounddevice.py", line 898, in init
_check(_lib.Pa_OpenStream(self._ptr, iparameters, oparameters,
File "E:\pycharm projects\python and langchain.venv\Lib\site-packages\sounddevice.py", line 2745, in _check
raise PortAudioError(errormsg, err, hosterror_info)
sounddevice.PortAudioError: Error opening InputStream: Unanticipated host error [PaErrorCode -9999]: 'Undefined external error.' [MME error 1]

#

can anyone help me solve this problem in py charm

#

?

steady halo
wraith niche
#

Is it possible in CustomTkinter to make a button with the left side or the button the corners straight, and the right side rounded?

sleek hollow
sleek hollow
steady halo
silver marten
#

Using the tkinter module for python, does anyone know how to make the entry box (right) be the same size as the tree view (left). Online answers just simply dont work idk why

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @teal root until <t:1712358673:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

urban marten
#

hello, I'm working an app with Pyqt6 designer and I had made this gui (attached the image), but I'm not sure how manage events when someone navigate for the tabs, If someone can help me, I preciated

arctic elk
#

The background isn't white ?

#

Is that what you mean?

#

Lemme check

#

Bruh it's white on my screen

#

Unless I'm color blind

#

Dm'ed you

mighty rock
#

You're using ttk.Label. You need to use a style to change something like a background color and font

#

Well it doesn't work that way so you probably missed the fact it's tk.Label, not ttk.Label

#

Or just use a style and do it the modern way

#

Well it's possible but what is this for

#

I mean like what does this macro do

#

Why do you want it to record mouse positions

#

!d mouse

#

Hold on

#

Well there's the mouse package which can record and replay mouse actions

#

I'd recommend running the recording and replaying in its own thread, separate to the one running the GUI

#

It records mouse actions

#

Not keyboard actions

#

And yes

fallen forge
#

I'm starting to work on mobile app with kivy/kivyMD, I have general picture of what I'd like it to look like / to have, but where can I learn how to design that with code? It's not something I have ever done, I have never worked with any GUI apps before and it's very confusing. Any recommended resources for that / how should I approach this with in the first place?

sleek hollow
quiet oxide
#

I'm making a clicker game for the terminal and I need a website where I can find the pixels on my screen (I want to make a certain mouse coordinate area be "clickeable"). Does anyone know a site like this?

quiet oxide
#

nvm, wikipedia clutch

obtuse zodiac
#

hello , i have a problem when i try to detect a keypress using open cv

#

this works: ```while True:
screen, rect = capture_screen(window_title)

    key = cv2.waitKey(1)
    if key == ord('t'):  
        print("The 't' key is pressed")
    elif key==ord('r'):
        cv2.destroyAllWindows()
    elif key == ord('q'):
        break
    diagonal_line_screen = draw_diagonal_line(screen)
    cv2.imshow("Modified Screen", diagonal_line_screen)        

    
cv2.destroyAllWindows()``` but this doesnt: ```while true:

key = cv2.waitKey(1)
if key == ord('t'):
print("The 't' key is pressed")
screen, rect = capture_screen(window_title)
diagonal_line_screen = draw_diagonal_line(screen)
cv2.imshow("Modified Screen", diagonal_line_screen)
elif key==ord('r'):
cv2.destroyAllWindows()
elif key == ord('q'):
break

cv2.destroyAllWindows()```
#

when i try to make it so the image would apear when i press "t" it just doesnt work

#
    while True:
        print(drawn)
        key = cv2.waitKey(1)
        if key == ord('t') and not drawn:
            print("key t pressed")
            screen, rect = capture_screen(window_title)
            if screen is not None:
                screen_with_diagonal = draw_diagonal_line(screen)
                cv2.imshow("Modified Screen", screen_with_diagonal)
                drawn = True
        elif key == ord('r') and drawn:

            cv2.destroyAllWindows()
            drawn = False
            
        elif key == ord('q'):
            break

    cv2.destroyAllWindows()```this one is also broken for some reason
#

it just doesnt detect the key presses

urban niche
#

doesnt fingerprint in samsung s24 need sensor?

obtuse zodiac
#

nvm fixed

royal cape
#

oh derp, i misread your question

gilded basalt
royal cape
#

huh, im curious, how did you disable the keyboard?

gilded basalt
#

I can show you the code if that helps. I'm not usually good at explaining

royal cape
gilded basalt
#

how do I do the thing where I can put text into python so I can show you better

royal cape
#

!code

proven basinBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

gilded basalt
#
current_row = math.floor(float(text_box.index("insert")))  # checks the position of the "insert" cursor (whatever the | line is called when you're typing) and only takes the integer part, which designates the row
def input_checker(event):
  if math.floor(float(text_box.index("insert"))) == current_row:
  # do normal text stuff
  else:
    return "break"

text_box.bind("<Key>", input_checker)
#

If you would like more understanding, I can send the entire function it is in

royal cape
#

well kind of, given the rules in the link im not too sure why the custom binding gets called before the built-in insert binding

gilded basalt
#

All I know is that it works and I'm happy because I was working on this one problem for over 2 hours

royal cape
#

oh wait, the built-in one is probably a class binding so it can be the same between text widgets

gilded basalt
#

indeed

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @spare perch until <t:1712696317:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

grim mauve
#

absolutely

hexed night
hasty flume
#

Is there any framework for python where I can make a JS front-end for a desktop app?

#

And not a "fake a server" approach.

digital rose
#

What is the best module for making UI's?

digital rose
sleek hollow
digital rose
#

Kinda like a backup discord tool

sleek hollow
digital rose
#

Never heard of it

sleek hollow
#

then I would say you are definitely not intermediate

digital rose
#

ok

sleek hollow
#

tkinter would be an ok place to start for GUI then, it's quite beginner friendly

#

.rp tkinter gui

buoyant cometBOT
#

Here are the top 5 results:

Python GUI Programming With Tkinter
Build a Tic-Tac-Toe Game With Python and Tkinter
Python import: Advanced Techniques and Tips
Build a Hangman Game With Python and PySimpleGUI
Bypassing the GIL for Parallel Processing in Python
sleek hollow
#

Check out that first link

somber hemlock
proven basinBOT
#

Build GUI for your Python program with JavaScript, HTML, and CSS

Released on <t:1709824330:D>.

hexed girder
#
self.rl = qtw.QPushButton("Rocket League", self.fenetrePrincipale)
        self.rl.show()
        self.rl.setFixedSize(220, 75)
        self.rl.move(850, 304)
        self.rl.setStyleSheet("""background-color:white;
        border-radius: 7px;""")
``` how to  make an animation when this button is hover ? i would like his size growth while 1 seconde
somber hemlock
summer hound
#

hello

#

anybody have an idea on how to add a image as a background on the window itself?

#
  • do I have to do something about its size ?
merry fossil
#

hey is there any way to integrate gemini and google lens?

old wedge
#

Hi all! Any video/playlist tutorial recommendations for starting with modern tkinter? (preferably including practice exercises / problems)

Please ping me whe replying

royal cape
proven pewter
#

what is tkinter Text() default wrap?

mild gull
lone zealot
#

hello I am in the process of making a web app with streamlit and I have a problem with the kepler.gl library I cannot configure the zoom however I followed the official doc is there anyone who can help me?

livid kraken
#

Hi! I'm creating a desktop python app with using customtkinter a tkinter's wrapper. I've created a Card component which contains an image, a title, a subtitle and a button which I want that appears only when the mouse's cursor hovers the Card frame.
This is my code: https://paste.pythondiscord.com/3JIA

The problem now is that when I hover the frame the button is correctly shown but if I hover the button in itself it flashes. How can I solve it?

slim cairn
#

How can i load the home.kv file for HomeScreen with given code:

# home.py
class HomeScreen(Screen):
    name = "home"

# main.py
class MainApp(MDApp):
    def build(self):
        self.theme_cls.primary_palette = "Teal"
        sm = ScreenManager()
        sm.add_widget(HomeScreen())
        return sm

UPDATE:
i managed to load the home.kv file by adding builder.load_file("home.kv") below the line of declaration of sm.

I am using #:include home_topbar.kv in home.kv to include the child components.
But it don't seems to work properly. my file_path for include are correct as they did not threw any exceptions.

fallow stag
#

Hey guys, I've an issue with PyQt5.

I'm doing an interface to generate config files.
I have a QTextEdit where the user can change the value, but it seems that when the user change it and after that click on the generate button, the value is not update

#

I print the value of the QTextEdit when the user write into it, and it's fine, the value is correct.
It's just when the user click on the button that the value is not updated

misty path
#

hello guys. is it possible to only display the arrow icon of an OptionMenu/ComboBox with customtkinter/tkinter and still work as a dropdown?

polar ledge
#

imma change my interface with a lobotomy

zenith iron
#

Hello guys, when i put the following code into my program it stops working

    hdc = win32gui.GetDC(0)
    
    # Set text color and background color
    text_color = win32api.RGB(255, 0, 0) # Text Color
    bg_color = win32api.RGB(0, 0, 0) # Background Color
    
    # Create font
    lf = win32gui.LOGFONT() #Establish Font
    lf.lfHeight = -20 #Font Size
    lf.lfFaceName = "Arial" #Font Type
    font = win32gui.CreateFontIndirect(lf) #Finalize Font
    
    # Select font
    old_font = win32gui.SelectObject(hdc, font)
    
    # Set text color and background color
    win32gui.SetTextColor(hdc, text_color) #Setting the text color
    win32gui.SetBkColor(hdc, bg_color) # Setting the background color
    
    # Draw text
    win32gui.ExtTextOut(hdc, x, y, win32con.ETO_CLIPPED, None, text) #Display the Text
    
    # Clean up
    win32gui.SelectObject(hdc, old_font)
    win32gui.DeleteObject(font)
    win32gui.ReleaseDC(0, hdc)

# Define text content and position
text_content = "Hello, World!"
screen_width = win32api.GetSystemMetrics(win32con.SM_CXSCREEN)
text_width = len(text_content) * 10  # assuming each character width is approximately 10 pixels
text_x = screen_width - text_width - 10  # 10 pixels margin from the right
text_y = 10  # 10 pixels from the top

# Main loop to continuously display text
while True:
    display_text(text_content, text_x, text_y)```
When i put this into my code it works and Hello, World! pops up in top right but the actual cmd doesnt load and just stays blannk and doesnt load the actual program if someone could help would mean a lot thanks ❤️
shut sleet
#

does this help ?

import threading
import win32gui
import win32con
import win32api
import time

def display_text(text, x, y):
    hdc = win32gui.GetDC(0)
    text_color = win32api.RGB(255, 0, 0)
    bg_color = win32api.RGB(0, 0, 0)
    lf = win32gui.LOGFONT()
    lf.lfHeight = -20
    lf.lfFaceName = "Arial"
    font = win32gui.CreateFontIndirect(lf)
    old_font = win32gui.SelectObject(hdc, font)
    win32gui.SetTextColor(hdc, text_color)
    win32gui.SetBkColor(hdc, bg_color)
    win32gui.ExtTextOut(hdc, x, y, win32con.ETO_CLIPPED, None, text)
    win32gui.SelectObject(hdc, old_font)
    win32gui.DeleteObject(font)
    win32gui.ReleaseDC(0, hdc)

def display_text_thread():
    text_content = "Hello, World!"
    screen_width = win32api.GetSystemMetrics(win32con.SM_CXSCREEN)
    text_width = len(text_content) * 10
    text_x = screen_width - text_width - 10
    text_y = 10
    while True:
        display_text(text_content, text_x, text_y)
        time.sleep(0.1)  # Add a small delay to reduce CPU usage

# Start the display_text_thread in a separate thread
display_thread = threading.Thread(target=display_text_thread)
display_thread.start()

# Main program continues running here
# Add your main program logic below```
Are there still problems?
somber hemlock
proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @sturdy patio until <t:1713610195:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

viral minnow
#

For tkinter, does frame class have anything similar to update method so I can override in subclass?
If not how can I make something similar?

daring kiln
#

I'm in a very bad situation my problem is about 2 detection functions
One is ai object detection and second is voice detection or recognition
The problem here is we got the object detection running but the voice recognition isn't working
I tried using threads but didn't really work im in a very tight deadline if any help possible
And if this topic isn't for this channel please let me know

ebon mango
#

how can i change the values of a CTkComboBox (im usign the customtkinter module) ? i tried just doing combobox["values"]=['option1','option2'] but it just wouldn't work.

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @drowsy ore until <t:1713641460:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @digital rose until <t:1713646762:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

smoky field
#

hi

blazing pine
#

Just realized PyQtGraph 0.13.5, if you use PyQtGraph, and especially if you use PyQtGraph's QApplication instantiation method (pg.mkQApp()) and use light/dark mode, please upgrade quickly and let me know in the #pyqtgraph channel if it's working as expected still.

dull lark
#

Not sure what the etiquette for posting links to our GitHub and I didn't want to spam multiple channels. I made a PerlTK script and have been using it for 12+ years almost daily. I learned Python this year and have been spending the last month or so translating the functions over to a Python TK script.

https://github.com/HuskyCougar/abc.tk.py

One thing I could do in Perl but have not been able to figure out in Python is scoping variables outside the current script. Perl's "our" scope allowed me to build my Tk window in my main script and then import domain-specific menus and functions that would add to the base functions.

GitHub

Tool to replace command some basic command line functions. This version in Python. - HuskyCougar/abc.tk.py

#

One assumption is that i would need to convert my MainWindow over to a class and then import functions that would modify my original MainWindow.

Like I said though, I am still a Python n00b and only build Python scripts if someone specifically asks for a notebook or I expect someone else ((most likely younger than a certain age 🙂 )) to have to make modifications to them in the future.

grand zenith
#

Is there any way to make it so that the Qt window can resize itself, but the user can't resize the window or full screen it? Just leave all the resizing capability solely to the Window

smoky field
#

hi

ebon mango
#

how do i get an underline for the text in my widget (button specifically) for my tkinter app?

smoky field
#

@ebon mango

ebon mango
smoky field
#

use button = Button()

#

@ebon mango

mighty rock
proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @digital rose until <t:1713882107:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

ebon mango
# smoky field dont use ttk

i want to use ttk - i like the style better and as @mighty rock pointed out - ill just configure with the widget style. thanks yall

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @twilit sequoia until <t:1713895922:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @digital rose until <t:1713957054:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

terse vessel
#

i'm having trouble with tkinter binds as i use a mvc model

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @digital rose until <t:1713987670:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

somber hemlock
serene kiln
#

anyone got other libraries that look better than tkinter

mighty rock
#

Yes. tkinter.ttk

vocal citrus
serene kiln
vocal citrus
#

yes

#

it's a custom tkinter libraryt

vocal citrus
#

py -m pip install customtkinter

serene kiln
royal cape
vocal citrus
#

why this channel is one of the most unactive of this 400k server

zenith wyvern
#

I dont truthly understand

#

Maybe making user interface in python is easy

#

And people just dont need help with it

#

Like I was learning PyQt6 for like two weeks and now I feel like fish in water

#

And a lot of people say that PyQt is hard but its not true at all

#

You just have to write code

#

And just enjoy it

#

Thats all

rose gorge
zenith wyvern
#

I feel the same way as you

orchid jackal
#

Hi

zenith wyvern
#

Hello

vocal citrus
#

HELLO

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @undone goblet until <t:1714254117:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

tepid hedge
#

I'd like to ask what GUI framework can handle my python scripts, the first one uses mediapipe, opencv and keras. The second one uses panda3d engine to display 3d animations based on user input. Im a newbie so I dont know a lot of things, I would like these scripts to be integrated to the GUI framework, and package the framework into windows, android and ios. TIA

rose gorge
rose gorge
molten rapids
#

but that image literally pops up when you look up anime girl pfp

#

i used it when i was 11

#

like 5 years ago

rose gorge
#

and she is Menhera, a real illustrator in Japan which have the girl in my icon as her avatar

#

You should look her up! Her drawings are cute. She even made a mobile game!

vocal citrus
#

guys

#

but can i do cool videogames with tkinter?

zenith wyvern
#

I dont think you can make videogames with tkinker

#

Games you can do in panda3d or in pygame or pygame zero

#

If you want to stick with python

hybrid flint
#

Hi ! does somebody already use the kivymd MDDatepicker ?

tribal path
#

Kivy may work here, with the panda3d-kivy addon@tepid hedge

rose gorge
#

I just wrote 1000 lines of tkinter with the place manager, and found out that I can do that in 300 lines with grid manager

#

I'm dying

zenith wyvern
#

oh

#

poor you

tepid hedge
# tribal path Kivy may work here, with the panda3d-kivy addon<@602117020389081107>

panda3d-kivy addon would would integrate kivy to panda3d right? What I want is the other way around, build UI in kivy or other framework then add the panda3d on home page or such. I don't know much about the addon, but it would use kivy inside panda3d window right? If these are not possible, would it better to make it a web app instead? but I have no idea with web app dev. Idk how to integrate my scripts on web.

zenith wyvern
#

You can also think about making an button which opens a game window

tribal path
#

I've not used the add-on myself, mostly as not needed to use panda3d; but do know the maintainer.

But yea the add-on as I understand it, just ensures that they are using the same window as a way to use both libraries.

hybrid flint
# hybrid flint anyone ?

cause i want to make a month selector with this module but i dont found in the documentation how to do it:(

tribal path
#

What's the issue? The kivyMD pickers would be for a whole date; hence the name. For just a month selector you'd need to modify the MD widgets and/or write your own with kivy widgets

hybrid flint
#

ah :/ there is no propertys to change to just make a month selector damn

#

its because i want to display month data so i want to make just a month selector. But may i'll need to just make a dropdown menu with the month

#

and how i modify an MDwidget ?

tribal path
#

Well MD widgets are just collections of kivy widgets - possibly you might get away with removing widgets from a Picker to leave what you want, but most likely there'll be much more going on... I'll just check the source on that

late jay
#

I centered a div @terse gull and @umbral root

terse gull
late jay
#

In 2 prints! And those prints won't erase whatever was behind! Maybe this isn't the best example

#

I'll get better ones tomorrow when I hook this up to my game engine

#

But it's a window!

tidal orbit
#

hi

late jay
#

Hello

zenith wyvern
#

He knows how to center a div

#

You are a master

#

Senior dev

rose gorge
zenith wyvern
late jay
#

Here, the list is rendered before the box!

#

Oh god this is not just any list, I just noticed, I programmed a vertical layout

split elbow
#

damn

#

that looks crazy

#

is it on github?

late jay
#

I'm scawwed of sharing the github, but well, yeah, it is.

It's on the same repo as my rpg game-- I'm making this to have some sort of rendering engine for my text-based rpg

split elbow
#

dayum

#

very cool

late jay
#

Once I have some content on it, I'll add it to itch with a name your own price of 0

#

As an executable rather than the source

split elbow
#

proper

#

good luck!

zenith wyvern
#

WoW man this looks like a lot of work

#

or am I wrong?

late jay
#

It kinda is... but not really in the grand scheme of things

#

just the source code for the "renderer" is 470 lines

#

But after the renderer is written, setting stuff up for render is pretty easy.

#
def test():
    master_widget = MasterWidget()

    list_widget = VerticalLayoutWidget(spacing=0)
    list_widget.width = 30
    list_widget.height = 30

    for i in range(20):
        text = TextBox(f"List item {i} {"*"*(i)}", RenderColor(GameColor(math.floor(i*255/20), math.floor(i*255/20), 0)))
        text.attach_to_parent(list_widget)

    list_widget.attach_to_parent(master_widget)
    textbox_widget = DecoratedTextBox(
        "Hello\n there,\n mr kenobi guardian of the\n galaxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
        BoxTexture(
            "/-\\| |\\-/",
            [
                RenderColor(GameColor(255, 0, 0)),
                RenderColor(None, GameColor(0, 100, 0)),
            ],
        ),
    )

    textbox_widget.set_height(13)
    textbox_widget.set_width(13)

    textbox_widget.attach_to_parent(master_widget)
    textbox_widget.set_horizontal_alignment(HorizontalAlignment.Center)
    textbox_widget.set_vertical_alignment(VerticalAlignment.Center)

    list_widget.set_horizontal_alignment(HorizontalAlignment.Center)

    master_widget.render()
#

I'm unsure whether I should bind input or animations with the widgets...

zenith wyvern
#

ok

#

like impressing

#

it impresses me

late jay
#

oh wow there are no rules about the kinds of files sent other than discord's community guidelines? interesting

If I (or anyone) ever shares a file here, remember that it could be (very) harmful to your computer (and by extension, you).

#

I might share an exec here if I feel comfortable

old fjord
hexed night
#
from calculations import Cal
from settings import *
import tkinter as tk

#Gui:
class App(tk.Tk):
    def __init__(self) -> None:
        super().__init__()

        #Setup Window:
        self.geometry(WINDOW_SIZE)
        self.title(WINDOW_TITLE)
        self.resizable(0, 0)
        self.iconbitmap(ICO_FILE)

        #Setup Rows and Collumns
        self.columnconfigure(0, weight=1)

        #Call Functions
        self.__widgets__()

    def __widgets__(self):
        Title: tk.Label = tk.Label(self, text=WINDOW_TITLE, font=(0, 15))
        Title.grid(column=0, row=0, sticky=tk.W, padx=PADDING, pady=PADDING)




if __name__ == "__main__":
    app = App()

    app.mainloop()``` lookin good so far
exotic anchor
#

is there a way to get the height off an tk element

#

when you use the fill option ?

indigo yarrow
modest dove
#

Is it possible to display images inside a CMD console?

sleek hollow
modest dove
#

Alright thank you

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @quick venture until <t:1714585160:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

undone shuttle
#

depends on the console

modest dove
undone shuttle
#

brb

undone shuttle
modest dove
undone shuttle
undone shuttle
exotic anchor
#

anyone wanna test this out and check if the line numbering is working and that when you spam enter a lot that it is not stuttering

wraith jewel
#

hi

#

i have some problems with pyqt can anyone help

#

its a very weird issue that i dont see why is occurring

#
def setupUi(self, MainWindow):

        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(800, 642)
        self.centralwidget = QtWidgets.QWidget(parent=MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        
        self.chatwindow = QtWidgets.QPlainTextEdit(parent=self.centralwidget)
        self.chatwindow.setGeometry(QtCore.QRect(0, 0, 651, 541))
        self.chatwindow.setObjectName("chatwindow")
        # lock chat window
        self.chatwindow.setReadOnly(True)

#

this is the code i have in pyqt5

#

its only a snippet

#

under a class Ui_MainWindow

#

and i have a separate function inside the same class where im trying to access self.chatwindow

#

but an error shows up telling no attribute

#

ik the scope but still vscode shows me recommendations while coding

#

is there any fix to this or any alternative to access them out of scope coz even global doesnt seem to work

sleek hollow
#

!paste

proven basinBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

wraith jewel
#

its very huge

#

i can only show the two functions because thats where im facing the issues

#

def sendmessage(self):
        
        self.chatwindow.setReadOnly(False)
        # append new text to chat window
        
        self.chatwindow.appendPlainText(finaltext)
        self.chatwindow.setReadOnly(True)
        self.input.clear()
#

this is a snippet of the other function i am talking about

sleek hollow
wraith jewel
#

well its the part of a class Ui_MainWindow in pyqt5 so it doesnt need to be called separately

digital rose
#

W

wraith jewel
#

basically all functions in the class run on their own without separate calling but the problem is i need to access some elements from setupui in other function

#

under the same class

sleek hollow
#

why would you assume it calls things automatically?

#

do you see your UI actually show up?

wraith jewel
#

no

#

because it throws an error before it can

sleek hollow
#

because you're likely trying to call sendmessage before setupUI

wraith jewel
#

no its after setupui

#

alright i kind of fixed it now i was missing something in the arguments

#

thank you but i still had another doubt

#

how to call these funcs while threading inside a class

sleek hollow
#

are you using QThread for the threading?

digital rose
#

hi everyone,

i'm going to be working on building some custom software this summer, and i'd like to know more about the front end. i need the capacity to make really high quality custom graphics, say something that came out of like unity or unreal, and i need the user to be able to import files of specific types into the software for display. if anyone could offer a very basic overview of how to make this happen, i'd be much appreciative. i know how i'm going to make the backend work and which files but i don't know how to applicationize everything

sleek hollow
digital rose
#

But I need to operationalize custom algorithms within it to manipulate the input files

digital rose
#

how do those programs work, do you get to write code inside of them to operationalize stuff?

#

i'm sure there is already a lot of stuff under the hood like the code for physics et cetera

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @craggy sedge until <t:1714671642:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

quartz dust
#

Hey guys, I'm trying to figure out how to download a video by submitting a url with flask, I tried used a url for action in the html form but it doesn't download any file or do anything and it instead takes the website to another page that doesn't work at all. Any help would be appreciated.

sleek hollow
tribal path
tight aurora
#

tysm lmao

#

i hate those small errors mann

signal crown
#

if anyone can help please ping

royal cape
rose gorge
#

TKinter prblem here:
Why the displayed font size will jump from 14 straigt to 20, when I try giving it 14-20

true nimbus
#

Hi ,
I m trying to run a python program which has an GUI build using QT
but im getting the following errors , can someone help me.

#
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/bin/puzzle15ai", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/puzzle15ai/main_window.py", line 108, in main
    main_window = MainWindow()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/puzzle15ai/main_window.py", line 42, in __init__
    self.ui.setupUi(self)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/puzzle15ai/ui_mainwindow.py", line 28, in setupUi
    self.centralwidget = QWidget(MainWindow)
TypeError: 'PySide6.QtWidgets.QWidget.__init__' called with wrong argument types:
  PySide6.QtWidgets.QWidget.__init__(MainWindow)
Supported signatures:
  PySide6.QtWidgets.QWidget.__init__(Optional[PySide6.QtWidgets.QWidget] = None, PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags))
weary carbon
#

is anyone familiar with tkinter

rose gorge
weary carbon
#

import tkinter as tk
from pyautogui import size
from tkextrafont import Font
import tksvg

Get screen size

wnx, wny = size()

Create Tkinter window

wn = tk.Tk()
wn.title("Untitled game")
wn.geometry(f"{wnx}x{wny}")
wn.configure(background="black")

Use the Font class

font = Font(family="Akrobat-ExtraBold", size=45)

Replace the image path with your SVG file path

photo = tksvg.SvgImage(file="frog.svg")

Create frame1

frame1 = tk.Frame(wn, bg="brown", width=100000000000920, height=wny - 900)
frame1.pack(anchor=tk.NW, expand=True) # Position the frame using grid

Configure frame1

frame1.columnconfigure((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10), weight=1)
frame1.rowconfigure((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), weight=1)

Create label and label1 within frame1

label = tk.Label(frame1, bg="black", image=photo)
label.grid(row=0, column=0) # Position the label within the frame using grid

label1 = tk.Label(frame1, text="Froggy", bg="black", fg="white", font=font)
label1.grid(row=0, column=1) # Position label1 using grid

Create frame

frame = tk.Button(wn, bg="brown", width=1, height=1)
frame.pack(side=tk.TOP) # Position the frame at the top of the window

wn.mainloop()

frame is at the bottom i dont know why

rose gorge
#

you mean the last frame is at the bottom?

weary carbon
#

the btn called frame is at the bottom

wet marsh
#

Heya, can someone tell me which UI framework to use which can be easy to use and design which I can then integrate with python. I'm looking to create something like a movie ticket booking system for a multiplex (displaying like seat layout, movie posters etc).

#

Is django ideal for this?

sleek hollow
wet marsh
sleek hollow
sleek hollow
#

This will quite a large undertaking if this is your first time working with UI

wet marsh
sleek hollow
#

You would ideally create some sort of widget to represent 1 seat

sleek hollow
#

then create a layout to hold a row of seats

#

then iterate the rows and create the required num of seats per row

wet marsh
sleek hollow
#

There's QVBoxLayout for Vertical and QHBoxLayout for Horizontal

wet marsh
#

BTW is there any resource for beginners for UI development?

sleek hollow
# wet marsh BTW is there any resource for beginners for UI development?
Python GUIs

Start building Python GUIs with PySide2. A step-by-step guide to creating your first window application, perfect for beginners looking to explore PySide2 development. Following this simple outline you can start building the rest of your app. In this tutorial we'll learn how to use PySide to create desktop applications with Python.

wet marsh
#

Not framework specific, but something that helps to get the gist of it

sleek hollow
#

This site is a great resource

sleek hollow
wet marsh
#

Thanks a lot, I will check that out

sleek hollow
#

good design applies to any GUI, but the way of achieving it will vary from each library

wet marsh
#

Can I design a seating layout using tkinter?

#

Is it possible or is it too basic

sleek hollow
#

you could as well, but I think it would be more of a struggle

#

tkinter is quicker to learn the basics of, but implementing any sort of complexity gets real frustrating, real quick

#

pyqt/pyside has a bit of a steeper learning curve for sure

#

but it's far more robust

#

I could build a decent basic seating chart in pyqt in roughly 30-40 min

#

but tkinter it would probably take me much longer

wet marsh
#

Is processing ideal for creating a UI?

sleek hollow
#

not quite sure what you mean by that?

wet marsh
#
sleek hollow
#

No clue what this is

#

@wet marsh I can show you a basic setup for the seating chart if you like

#

I took this data and created a layout with it

row_data = [5, 5, 7, 7, 8, 8, 8, 8, 9, 9, 9]
wet marsh
#

What about something like this? Is it too complex?

sleek hollow
#

not at all

sleek hollow
#

with some minor tweaks

#

selectable seats

#

building UI is all about implementing one thing at a time

#

build small pieces, and then put them together

wet marsh
#

Thanks a lot

wet marsh
#

Can I use PySide6? There's the same tutorial with PySide6, is using Qt 6 okay?

sleek hollow
#

PySide2 is Qt5 so it's not that far behind

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @thorn wyvern until <t:1715009722:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

zenith wyvern
#

I was learning with it

wet marsh
#

class MainWindow(QMainWindow):
    def __init__(self):
        super().__init__()

        self.button_is_checked = True  # <1>

        self.setWindowTitle("My App")

        button = QPushButton("Press Me!")
        button.setCheckable(True)
        button.clicked.connect(self.the_button_was_toggled)
        button.setChecked(self.button_is_checked)  # <2>

        # Set the central widget of the Window.
        self.setCentralWidget(button)

    def the_button_was_toggled(self, checked):
        self.button_is_checked = checked  # <3>

        print(self.button_is_checked)```

Can someone explain why do I need to use ``setChecked`` after the ``clicked`` signal? I'm a little confused
zenith wyvern
#

Its used in that case but you dont have to write code in the same exact way

#

You just dont have to use it

#

but I will explain

#

what this code does

#

When you click the button it opens this function and sets button_is_checked on user input and prints out that this button is checked and set_checked sets button on checked or not checked

#

do you understand or not

#

if you dont understand I can try to explain it better in other ways

royal cape
#

i mean i struggled to get into it in my last couple of attempts, but i only spent a few hours or so

#

and i felt the tutorials in Qt for Python i didnt really cover the fundamentals i wanted to know like layouts, but perhaps it would have gone better if i had followed Python GUIs instead

lucid lintel
#

trying to add a password view change into qtdesisgner/ pyqt, but the screen crashes every time i run it... here's the relevant code. commenting out this code loads fine, but it's just the view password button that makes it crash?

#

pwd is the QLineEdit,

#

pwdViewBtn, QPushButton for viewing/ hiding password

sleek hollow
sleek hollow
tribal path
#

You want to connect to a method, thus self.pwdView I assume would not crash... Perhaps with *args if the connect passes an object there too

sleek hollow
#

ahh good catch, yeah, it should be connect(self.pwdView)

#

they have a , instead

wet marsh
sleek hollow
zenith wyvern
#

I dont know if I help you

#

Or maybe someone other should explain it for you

sudden elk
#

just a theoretical question. i'm gonna make accessible paint app which will use palette names and keyboard to color (pixelart-focused) which will be integrated with builtin tile and map editor (tiled can say but with less options, also keyboard focused) .
is it better to make it multiple-window or with a back/forward arrow at top (single-window) ?
and how to achieve this in tkinter? (it's the only one i've been using but not for multiple-screen apps, once was looking at pygame but it's totally not me…)

somber hemlock
#

ig multiwindow maybe 2005 but shit uxwise anyways

sudden elk
#

ok, thx

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @broken hatch until <t:1715124807:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

rose gorge
#

what's with this channel?

dire barn
sleek hollow
somber hemlock
#

bot gets the "visual" around here ig

lament rampart
#

I have a question regarding the architecture of my code. I am using pyqt6 to create gui’s and I have a use case where I need to reform my UI multiple times so I need to remove widgets and attach new widgets until the end of the use case. Should I set all the widgets that I use (button, labels, qlineedits and etc) at my init function or should I set the widget when the function is triggered to go to the state? What would you do, what is better?

sleek hollow
stray axle
#

Hi^^ I am currently stuck in one of my projects: I am writing a digital Character Sheet for a Pen and Paper Game using PyQT6 and Pyside 6.
I am trying to add a QFrame that in itself again contains layouts to another layout . I want to try and not use fixed heights but unless I give the Frame either a FixedHeight or MinimumHeight it doesn't show. Is there a trick with nested layouts and size that I am not aware of?
I am trying to make the entire app responsive since I want to package it for android (on tablet)

sleek hollow
#

Minimum and MinimumExpanding work best

blazing plinth
#

alternative in what sense? in the sense that its builtin - no, i think its the only builtin ui lib
in the sense of like, ui libraries in general - yeah, there are a bunch, dearimgui, pyqt / pyside, raylib bindings maybe?, just search on pypi / github

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @uncut swan until <t:1715463331:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @digital rose until <t:1715496427:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @storm fiber until <t:1715508501:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

sinful dome
#

Hello, super new to PyQt and I'm trying to get something working with Whisper and I think I'm approaching it wrong. Can't find much help online so assuming it may not be possible.

I'm trying to get the percentage value from a Whisper transcription and pass it through to a progress bar widget. Thought this would be fairly straightforward as I can see the percentage in the console, and print it through its update, but I can't figure out how to pass that value through to my progress bar

sleek hollow
sinful dome
# sleek hollow so you do have a way to access that value and save it in a variable?

So here's what I have:

class _CustomProgressBar(tqdm.tqdm):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self._current = self.n  # Set the initial value
        
    def update(self, n):
        super().update(n)
        self._current += n
        
        # Handle progress here
        print("Progress: " + str(self._current) + "/" + str(self.total))

from here: https://github.com/openai/whisper/discussions/850#discussioncomment-5443424

which seems to give a bit more access to the actual progress of transcription. But I have tried setting the value in the print to a global variable and get an undefined error elsewhere in the script

GitHub

Here is my code. import whisper Load Whisper model Large MODEL = whisper.load_model("model/medium.pt", in_memory=True) Set options translate_options = dict(task="translate", **d...

sleek hollow
#

what is tqdm?

sinful dome
#

I believe its a library to add progress bars to the terminal

#

but not certain

sleek hollow
#

I know how to set up a QProgressBar, I just don't know what module you're using here but if you can get the value, the QProgressBar isn't too bad to set up

royal cape
proven basinBOT
#

whisper/transcribe.py lines 228 to 230

with tqdm.tqdm(
    total=content_frames, unit="frames", disable=verbose is not False
) as pbar:```
#

:incoming_envelope: :ok_hand: applied timeout to @digital rose until <t:1715529162:f> (10 minutes) (reason: emoji spam - sent 24 emojis).

The <@&831776746206265384> have been alerted for review.

sinful dome
#

but literally on day 2 of messing with this so very likely missing something

#

percentage = int((self._current / self.total) * 100)

calculating percentage like this, had tried assigning it as global percentage but was getting undefined errors.

i have another function handling the audio transcription and text file generation, but because this line:

result = whisper.transcribe(model, audio, language="en", compression_ratio_threshold=1)

seems to handle the entire transcription loop I can't access the percentage value while its running, I think

royal cape
#

i imagine its further complicated by the fact that transcribe() is a blocking function so it cant run in the same thread as your GUI (unless you don't mind it being frozen)

sinful dome
#

ahhh

royal cape
#

qt has their own QThread class iirc, not familiar with how to use it though

sinful dome
#

I might just have to abandon, its only a small thing but would really like to get it in at some stage

#

trying to base my ui off Shutter Encoder if you know it, there's a progress bar in there and I thought it was slick pithink

royal cape
sinful dome
#

That looks super useful, I guess half the problem I'm having is that the transcription itself needs to be on another thread

#

emit signals from there

#

I think my file structure might be a bit off as well

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @uneven sierra until <t:1715548689:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

stray axle
sleek hollow
digital rose
#

trying to use PyQt6 and im having trouble reading the package, not much detail in the functions. was wondering if anyone knew how i can get an audio file like .wav to work in it?

# No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.
# Failed to initialize QMediaPlayer "Not available"
class SoundPlayer:
    def __init__(self):
        self.splayer = QSoundEffect() # in case i need to use sound effect instead...
        self.mplayer = QMediaPlayer()
        # Set the audio device for QAudioOutput
        self.audio_output = QAudioOutput()
        self.audio_output.setVolume(100)
        
    def play_media_effect(self, media_file):
        self.mplayer.setSource(QUrl.fromLocalFile(media_file))
        self.mplayer.setAudioOutput(self.audio_output)
        self.mplayer.play()
vital prairie
#

What gui library should i use cuz i am confused a lil

sleek hollow
vital prairie
#

I made some apps with customtkinter and i've been developing in python prob for a year now, im trying to make modern looking apps and try something other that ctk

sleek hollow
vital prairie
#

What abt pyqt6?

sleek hollow
#

basically the exact same thing

#

pyqt6 and pyside6 are both python bindings for Qt

vital prairie
#

Oh ok

#

Bruh

#

It uses classes

#

So it wont be as easy as i thought

sleek hollow
vital prairie
#

Classes are giving me java flashbacks

digital rose
#

Could we make a windows application and make a UI within it? How would we do that?

unique marten
lunar zephyr
#

pyqt is flexible to use. you can build ui with qt designer and use it in you python project.

#

Just build the app with pyinstaller and copy the ui files in the dist folder

somber hemlock
rocky dragon
#

I've noticed my destroyed signals aren't getting to their slots if the slot is on a bound method after I updated PySide6 (I assume it worked before as I ran into an error I don't remember), is this expected? partial(cls.method, self) works as a workaround though not sure how I feel about it in the long run

half onyx
#

Anybody use tkintermapview here?

hybrid isle
#

Is there a Python desktop GUI framework that natively supports markdown or rich text?

digital rose
#

If I make an image, is there a way to make a gui that shape with pyqt?

digital rose
# somber hemlock ig you need to install a PyQt6 addon package

it works sometimes, othertimes it doesn't. the package details for pyqt are much less descriptive and referring to the docs is confusing when comparing this to dpy representation. i just really dunno what i'm doing w/ it. I got a basic app to work for a timer, etc. but getting the sound to play just errors w/ mp3 and then sometimes plays w/ wav files

sleek hollow
proven basinBOT
#

:x: failed to apply.

somber hemlock
molten belfry
vital prairie
#

soo, i have an image as background in ctk and it cuts my frame corners (kinda), is there any way to fix this?

digital rose
sleek hollow
stable osprey
#

I'm not sure if this is the right channel to ask this, but I'm trying to make an app on my PC which is python based just for personal modding

#

Is there an ideal way to have a windows app icon that can boot scripts?

#

Any advice is welcome

lofty pond
somber hemlock
#

an app icon for your app you made already? like a shortcut?

ivory kelp
#

Anyone know how to do state management with NiceGUI correctly that is private to each user?

To be private I put everything inside a function, otherwise it gets replicated across tabs.
But now I have no idea how to set itemDataCard's visibile to true, only when a row is selected, because the function onManifestRowSelected has no reference to itemDataCard

dire coyote
#

hi, using PyQt6 and Qml, I can't find the Resource complier (rcc) tool. is it bundled with Qt Designer/ Creator or do i have to install PySide6 for that? any advice on this subject would help

digital rose
severe spire
#

Is Titlebar customization available in tkinter, or do I have to go for GTK or any other library

#

I would like to merge some basic buttons into my titlebar, like the Search Button and a few menu items, and I was wondering if that could be done with tkinter.

#

Thank you.

somber hemlock
severe spire
#

I wish there was a function like the set_titlebar() available in gtk

wintry bay
#

painthon

royal cape
# severe spire that is a hacky way, isn't it? and it doesn't behave as well as of a titlebar ri...

https://docs.gtk.org/gtk4/method.Window.set_titlebar.html

If you set a custom titlebar, GTK will do its best to convince the window manager not to put its own titlebar on the window.
it kind of looks like GTK does the same thing, it just gives you a more convenient API?

apparently on X11, root.wm_attributes("-type", "splash") disables the decorative framing (stackoverflow post, tk reference), but im not sure if you still need to implement window dragging yourself

severe spire
#

which is amazing in terms of acting like a titlebar

#

even the gtk docs suggest to use it if we want to customize your titlebars

royal cape
#

yeah, im not sure tk has a widget that mimics a native titlebar

severe spire
#

and I think gtk headerbars can even be dragged and snapped around

#

although I haven't experimented with that

royal cape
somber hemlock
#

the best way is to ignore the titlebar. its a very os specific thing

#

put your stuff below it at the top

severe spire
#

It gives a much polished look to apps, according to me

#

and for my custom app (version control software), I need that look

#

hence I was asking about that

#

but nvm, I'll just use pyGTK

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @near crane until <t:1716221802:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

severe spire
#

;-;

sharp storm
#

Are there some already assembled tools to make hud/menu for pygame?
Buttons, checkboxes, input fields, scrollbars.
Etc.

misty canopy
#

!pypi pygame-gui , I guess

proven basinBOT
cunning kettle
#

for a imgui wrapper should I use pyimgui or dearpygui?

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @timber token until <t:1716301588:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

smoky nest
#

its great to be here !!

#

im new and originally im a designer I do lots of UI UX

grand sequoia
cunning kettle
#

Well i really just need imgui for a engine so wrapper or not doesnt matter too much

#

But id assume pyimgui is still better?

grand sequoia
#

yes, it is immediate mode GUI

cunning kettle
stable osprey
#

The script is supposed to open up other apps and files and feed certain inputs but I just wanted to know if there's an ideal way to just double click and have it run it all in one go

somber hemlock
somber hemlock
#

to get GTK working on a non-GTK environment (especially mac or win) is some work

#

!pypi gvsbuild

proven basinBOT
somber hemlock
#

for windows this is the most correct and modern way. luckily, the devs now offer pre-built releases

cunning kettle
#
import imgui

# initilize imgui context (see documentation)
imgui.create_context()
imgui.get_io().display_size = 100, 100
imgui.get_io().fonts.get_tex_data_as_rgba32()

# start new frame context
imgui.new_frame()

# open new window context
imgui.begin("Your first window!", True)

# draw text label inside of current window
imgui.text("Hello world!")

# close current window context
imgui.end()

# pass all drawing comands to the rendering pipeline
# and close frame context
imgui.render()
imgui.end_frame()

this is the basic rendering loop on the website

#

I installed the pygame integrtation and it didnt work

#

I also installed the full and it didnt work

#

its not like it returns a error either

#

it's just nothing

#

and I tried to remove boith end and end_frame to the same result

#

im looking at it and it has not been updated in the past year

grand sequoia
#

this indeed does nothing, as expected

#

you are not using pygame renderer at all, so imgui works, but result of it is not drawn anywhere

cerulean cloak
#

hello, questions regarding Tkinter and customTkinter are allowed?

sleek hollow
cerulean cloak
proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @digital rose until <t:1716466238:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

sleek hollow
#

!ytdl

proven basinBOT
#
Our youtube-dl, or equivalents, policy

Per Python Discord's Rule 5, we are unable to assist with questions related to youtube-dl, pytube, or other YouTube video downloaders, as their usage violates YouTube's Terms of Service.

For reference, this usage is covered by the following clauses in YouTube's TOS, as of 2021-03-17:

The following restrictions apply to your use of the Service. You are not allowed to:

1. access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content except: (a) as specifically permitted by the Service;  (b) with prior written permission from YouTube and, if applicable, the respective rights holders; or (c) as permitted by applicable law;

3. access the Service using any automated means (such as robots, botnets or scrapers) except: (a) in the case of public search engines, in accordance with YouTube’s robots.txt file; (b) with YouTube’s prior written permission; or (c) as permitted by applicable law;

9. use the Service to view or listen to Content other than for personal, non-commercial use (for example, you may not publicly screen videos or stream music from the Service)
cerulean cloak
#

Sorry

#

I delete

modest wren
#

anyone here knows flet?

severe spire
severe spire
cunning kettle
#

because no version worked for me

cunning kettle
#

still a bit confusing so ima try to get it working inside of my game

cerulean cloak
#

Hello, so I would like a little help + explanation regarding the row/columnconfigure I have a frame but I would like the widgets inside to take up all the space

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @open kiln until <t:1716569428:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

ivory kelp
#

I have the following code, how do I point removeRow to the function in my python script? Since I'm adding it directly to the html I'm not sure how to link it

spiral apex
ivory kelp
#

NiceGUI, I figured it out though

#

then registered removeRow as an event

dusky coral
royal cape
dusky coral
#

I'm not very familiar with NiceGUI, but it seems like a more powerful version of Streamlit.

#

Both NiceGUI and Rio are valid options for smaller web apps. However, Rio might offer easier and more maintainable code as your project grows. It provides reactive state management and allows you to build complex, arbitrarily nested UI layouts with concise syntax.

odd flare
#

Anyone have a recommendations for a UI library for an application for sorting simple data? Nothing overly complicated, few buttons, file/text upload and output.

sleek hollow
dire coyote
#

anyone knows a guide or can explain how to package PyQt6 for android? pyqtdeploy doesn't seem to support it

covert vessel
sleek hollow
covert vessel
sleek hollow