#user-interfaces

1 messages Β· Page 14 of 1

mighty frigate
#

I'm not an expert at bundling python app, so maybe I'm missing something here. Maybe I got something really wrong when doing my tests

light vault
#

Yikes @mighty frigate

mighty frigate
#

what's your point ?

swift storm
#

wtf, ultimaker cura is completely written in python (with PyQt), thats very cool

#

3d printing software

#

even the 3d render is done in python, didnt know it was capable of that

sleek hollow
#

No, it has to occur during a callback of some sort. All GUI functionality will occur in function calls once the window is shown

swift storm
sleek hollow
languid cipher
#

nevermind, sorry I fixed it

inland wedge
hot solstice
#

someone here uses python Flet or Flutter?

swift storm
#

Is QtQuick available for PyQt? Or do I have to stay at QtDesigner

#

Yes, ultimaker Cura is a good example of this

swift storm
#

I have a 'compiled' (pyinstaller) customtkinter interface for controlling a robot. I can tell you that it does not get cached

#

He's also non-specific about what is being cached but whaterver

#

Also, if you really were to distribute your python application commercially/prevent people stealing your code (which is easy with PyInstaller). I recommend Nuitka. Nuitka compiles python code to C and applies compile-time optimizations (its great). Because it compiles to C first and then produces a binary executable from this C code, its basically irreversible to your Python code

#

only works with CPython interpreter though, not PyPy etc

light vault
light vault
#

Except it's converting to bytecode and interpreting first before converting the bytecode to C, but that seems weird

swift storm
#

the specifics i dont know

#

its just made for cpython's C API is my guess, though dont quote me on that

swift storm
#

it performs well once the app actually runs, but the loading indeed takes quite long

light vault
#

If it's about compilation to native machine code, there's Cython for that

#

That just adds an extra layer of abstraction

#
  • if you don't want a potential reverse engineering, just give your users web apps
#

Currently, I'm only concerned about the perf for Python-based gui apps

#

I'm still building with PyGObject so I'm yet to have a solid verdict

light vault
#

Will see how that goes

light vault
#

Nuitka seems to be transpiling before compiling.

swift storm
swift storm
light vault
swift storm
#

well yes they are to some extend

#

does cython also allow python to be a binary executable

light vault
swift storm
#

without actually shipping the interpreter along with it

light vault
#

basically

light vault
#

It doesn't use CPython

swift storm
#

?

#

pyinstaller ships the interpreter with it

#

thats what pyinstaller does

light vault
#

Yep. But that's not generating a binary though

swift storm
#

and wraps this in a standalone executable

light vault
#

It's just an executable

swift storm
#

just like nuitka (idk about cython)

#

except nuitka compiles to C and doesnt include a interpreter

light vault
swift storm
#

first

swift storm
#

its still the interpreter thats executing and interpreting the python code

light vault
#

Exactly. So it's not a binary executable

#

It didn't generate any machine code

#

But it's an executable

#

I'm just being pedantic for sure

swift storm
#

bro what

#

it is a binary executable?

#

a .exe = a binary executable

#

thats literally what a exe is

#

how they bundle the python interpreter in there along with your packages and python files, i dont know

#

but yes nuitka:
transpiles python into c
and then compiles this as if it was jsut a c program

light vault
swift storm
#

show

light vault
#

I've explained before

swift storm
#

a .exe is literally encoded binary

#

idk what youre saying thats literally what a .exe is

#

if you have any .exe ever, its a binary executable

#

enough 'binary executable' because this is just a pointless discussion

light vault
swift storm
#

if you dont want your python executable to be reverse engineered, not be large in size (due to pyinstaller shipping the interpreter) and be fast, then use Nuitka

swift storm
light vault
#

It's just embedded CPython and byte code

swift storm
#

a .exe is fucking machine code what are you talking about LOL < im wrong here

light vault
#

Not the same for pyinstaller

#

How is the machine code generated?

swift storm
#

how the fuck do i gotta know that

#

do i look like the creator of pyinstaller

light vault
#

Yet you claim I'm wrong?

#

It's simple. Python is an interpreted language

#

The Pyinstaller executable still uses the interpreter

#

It is NOT compiled, like Cython

#

So while it's an executable, it's not binary in the trad sense

swift storm
#

yes i think youre right

#

Cython doesnt do the C to executable for u tho

#

right

light vault
#

Na

#

It compiles python directly to machine code

#

So I think the compiled/interpreted dichotomy is just funny

#

Java is both compiled and interpreted

swift storm
#

is this an option

#

because the standard is that you can compile your .py into C code

light vault
#

Yes, I think that's what it does actually

#

generates C code first

swift storm
#

oh well whatever

#

imo, Nuitka is one of the good ways to create python exe's and actually make it ready for distribution

light vault
#

If the compilation is the problem, then Cython does same job then

swift storm
#

Cython doesnt, you need a seperate thing for that. Tho it doesnt really matter

light vault
#

yeah right

#

With nuitka, you don't use static typing?

swift storm
#

no i dont think so

#

i dont know cython too well but

#

cython does really put an emphasis on typing everything right

#

wouldnt be an issue for me, i type hint everything xd but still

#

does seem like nuitka also benefits from type hinting

light vault
#

The nuitka project is really different from Cython in that it creates standalone binary executables.

#

Cython doesn't do that. It just creates shared object files you can import

swift storm
light vault
#

Basically, Cython "transpiles" (not sure why they say compile) Python to C

#

And then the C compiler is used to generate the .so file

#

The file can be imported in Python/CPython code like a regular python module

#

Still maintaining the Python API

#

So with Cython, you still kinda rely on CPython

#

Nuitka is different

#

Of course, Nuitka relies on CPython too but it's embedded in the executable and which is not really interpreted

mighty frigate
#

you can use QtQuick without QtDesigner

#

regardless of the stack you're using I mean

hot solstice
#

the old discussion that nuitka is better than cython, eeww

mighty frigate
hot solstice
#

now you're critic about being kind? man, just do whatever you want

mighty frigate
swift storm
#

Nuitka is for the sake of a (distributable) executable, cython is for the sake of transpiling and optimizing to C code and back

proven basinBOT
#

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

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

light vault
#

I also think comparing them is a category error

#

Cython doesn't completely replace CPython.

#

For a full app, you still need CPython, even with optimised Cython code

swift storm
#

Doesnt cpython support cython in their own to byte code compiler

#

Or that done after?

#

I dont know cython’s role in cpython

light vault
#

Cython's role ends at transpiling to C IMO

swift storm
#

πŸ‘

light vault
#

The C compiler is responsible for generating the shared object or dynamically linked library which the CPython code calls

#

To use the .so or .pyd file, you use the ctypes module I guess

#

For those who already know C/C++, I don't think you need Cython

somber hemlock
#

The import machinery supports it

light vault
#

You're right

#

I forgot

#

I don't use Windows :)

somber hemlock
#

Combined with a .pyi alongside it is how most libs are working

grand sequoia
swift storm
#

cython seems to do a better job at that

#

than nuitka

grand sequoia
#

in my experience, nuitka produces faster code than mypyc and cython (if you give cython pure python code)
of course, if you write in cython lang, it will produce faster code

light vault
grand sequoia
#

magic of nuitka

#

they can do a lot of cool tricks, check out their docs

teal drum
#

how do you download a specific package to a different version of python

light vault
celest osprey
#

I have this code to open up a popup dialog when the button is pressed. It does that, but when I close the dialog, the program freezes for several seconds, and then the main widget closes. There is no error message. What is causing this and how do I fix it?

from PyQt6 import QtCore, QtWidgets, QtGui
from PyQt6.QtWidgets import QDialog, QMessageBox
import sys

class MyWidget(QtWidgets.QWidget):
    
    def __init__(self):
        super().__init__()

        self.setWindowTitle("window")
        self.Button = QtWidgets.QPushButton("button")
        self.layout = QtWidgets.QVBoxLayout(self)
        self.layout.addWidget(self.Button)
        self.Button.clicked.connect(self.ButtonClicked)

    def ButtonClicked(self):
        dlg = QMessageBox.critical(self,'Error','message')
        dlg.exec()
            
if __name__ == "__main__":
    app = QtWidgets.QApplication([])
    widget = MyWidget()
    widget.show()
    sys.exit(app.exec())
swift storm
#

is it not good practice to subclass QApplication btw? just asking

#

recently transitioned from tkinter to pyside/qt

azure talon
#

Anyone good at tkinter? TL:DR I have the screen update when an event happens and doesn't really need to any other time. But sometimes a label or frame will just disappear and not come back for sever updates or if i resize the screen. Any idea how to fix this? doing a self.root.update() with or without an after only causes flickering.

sleek hollow
celest osprey
#

That fixed it, thank you!

wary birch
#

Does anyone know how i can rebind a scrollbar in tkinter?

#

i followed a tutorial which shows me how to make a scrollbar using canvas so i made one but now i want to update the contents of the frame in the canvas to contain variable amount of things but the scrollbar does not update to that

#
#create scrollscreen
scrollScreen = Frame(homeScreen,width=420,height=360,bg="black", bd=5)
scrollScreen.pack_propagate(False)
scrollScreen.grid(row=1, column=3, sticky='news',rowspan=10,padx=20)
#create feed canvas
feedcanvas = Canvas(scrollScreen,background='black')
feedcanvas.pack_propagate(False)
feedcanvas.pack(side=LEFT,fill=BOTH,expand=1)
#create feed
feed = Frame(feedcanvas,background='black')
#add feed to feed canvas window
feedcanvas.create_window((0,0),window=feed,anchor='nw')

def updateScrollBarFeed(event):
    feedcanvas.configure(scrollregion = feedcanvas.bbox("all"))


feedscrollbar = ttk.Scrollbar(scrollScreen,orient=VERTICAL,command=feedcanvas.yview)
feedscrollbar.pack(side=RIGHT,fill=Y)
feedcanvas.configure(yscrollcommand=feedscrollbar.set)
feedcanvas.bind('<Configure>',updateScrollBarFeed)
azure talon
#

If your screen is rebuilding or auto updating regularly, you'll need to call / create an update function. You can make it specific to the scroll screen if you want. Then when adding something new, it'll show.

terse pine
#

So I'm fighting with tkinter and its docs. All I'm trying to do is grab the first display line in the box that I create, but it's not really working out. This is the section I was trying to understand in the docs about indices and such: https://tkdocs.com/tutorial/text.html#modifying
So at first I was trying to use that n.end: index, which should be the end of the nth line, but further down I saw something more interesting

Line numbers in indices are interpreted as logical lines, i.e., each line ends only at the "\n." With long lines and wrapping enabled, one logical line may represent multiple display lines. If you'd like to move up or down a single line on the display, you can specify this as, e.g., "1.0 + 2 display lines".

So then I try something like
mytextbox.get('1.0', '1.0 + 1 display lines")
and that... gets me the first character and nothing else? Any idea what I'm doing wrong here?

royal cape
# terse pine So I'm fighting with tkinter and its docs. All I'm trying to do is grab the firs...

it seems to only work correctly once the UI is actually rendering, otherwise it gives that dubious output ```py
from tkinter import Text, Tk
from tkinter.ttk import Button, Frame

app = Tk()
app.grid_rowconfigure(0, weight=1)
app.grid_columnconfigure(0, weight=1)

frame = Frame(app, padding=10)
frame.grid_rowconfigure(0, weight=1)
frame.grid_columnconfigure(0, weight=1)
frame.grid(sticky="nesw")

message = ", ".join(map(str, range(100)))
text = Text(frame, width=40, height=10)
text.insert("1.0", message)
text.grid(row=0, sticky="nesw")

def callback():
print(text.count("1.0", "end", "displaylines"))
print(text.get("1.0", "1.0 + 2 display lines"))

button = Button(frame, text="Count", command=callback)
button.grid(row=1)

app.mainloop()```

azure talon
#

Anyone good at tkinter? TL:DR I have the screen update when an event happens and doesn't really need to any other time. But sometimes a label or frame will just disappear and not come back for sever updates or if i resize the screen. Any idea how to fix this? doing a self.root.update() with or without an after only causes flickering. full code upon request if you like

placid nebula
#

Hi, i need example of easy solution how to pass data from one tkinter window to another. Anyone is able to show some code?

sleek hollow
placid nebula
sleek hollow
#

What widget are you using for your extra windows?

placid nebula
#

Tk

sleek hollow
#

Then you won't be able to. You shouldn't/can't have more than one Tk at a time

#

Tk is your event process and main window

#

if you want additional windows in a single UI program, you should be using tk.Toplevel

#

are you using classes in your UI?

placid nebula
#

No, just functions.

#

Each window is in function, which are imported

sleek hollow
#

That's going to be an issue then

#

Use tk.Toplevel

placid nebula
#

Ill try it later at home, ill come back if there's still issue. Thanks for now

sleek hollow
#

I'll share a basic toplevel example, 1 sec

#
import tkinter as tk

class MainWindow(tk.Tk):

    def __init__(self):
        super().__init__()
        self.entry = tk.Entry(self)
        self.entry.pack()

        tk.Button(self, text='Press Me', command=self.update_popup).pack()

        self.popup = tk.Toplevel(self)
        self.popup_text = tk.Label(self.popup)
        self.popup_text.pack()

    def update_popup(self):
        self.popup_text['text'] = self.entry.get()


root = MainWindow()
root.mainloop()
#

this creates two windows. If you type something into the main window and press the button, it updates a label in the other window

azure talon
#

My tkinter window has an issue with displaying everything.
every time I run the window update not all frames are visable anymore. If i resize the window in any way, it all gets fixed till the next update.
Anyone know how to fix this? I'm sure it's cause I have too many frames.. not sure how to reduce that and still work the same way.

#

Or if anyone can look at what I'm working on and suggest a better option for the ui

clever palm
#

is class-based tkinter the only way to go? im not used to OOP and much prefer manipulating functions and such,

is there a genuine major advantage to using class-based tkinter?

sleek hollow
#

for example I created a custom class that creates this widget. Now I can reuse this in any project going forward. Useful for image or text offsetting

clever palm
#

what about for entire pages though

#

i understand subclassing to make individual widgets but

sleek hollow
#

it's still very handy to be able to use attributes to manage the state of your UI more easily

#

but also, if you're at the point where you want to use classes for GUI, I think you're ready to move on from tkinter to something better

sleek hollow
terse pine
#

I'm not going to want to tie it to a button... so I wonder if I can figure out what's going on. I'm basically making a very basic typing test, and one text box will be just to show the text the user needs to type. Playing with functions to see how I'll match everything in the first line, so I can delete it and add new words to the bottom as they finish the words in the first line.

azure talon
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.

azure talon
#

TL:DR I'm creating an outdoor bowling scoring system.
Can't get the screen to show everything all the time, some frames go missing at full screen after and update.
Code here:
https://paste.pythondiscord.com/GIWA

azure talon
sleek hollow
#

I've never built a tkinter gui with this many widgets on screen at once

#

I use pyqt for larger UI

azure talon
#

I'm bad at qt, I am trying pyside 6, but haven't used it before. I know it's using the QT, just haven't done QT in a long time.

sleek hollow
#

Either way, I would really recommend separating the bowling logic from the UI logic

#

and I would also recommend creating subclasses for reusable UI elements like your frames

azure talon
sleek hollow
#

every frame behaves the same way, yes? It's a box that can display 3 bowl values, and a total?

#

or 2 values?

#

I don't know lawn bowling at all

azure talon
#

with symbols and F foul.
It's 5-pin bowling but outside so the frame rules stay the same

sleek hollow
#

but either way, every frame is identical information (maybe with an exception of final frame?). You can create a separate class (inherit from tk.Frame) that displays this information. Then you can create instances of this custom frame class and update the values as required

#

you can have another subclass for BowlersFrames or something like that

#

that's a bowler, and all the frames that this bowler will bowl

#

then another class called BowlingMain or something that holds all of the bowlers, and can contain the additional information you have at the bottom

#

then you can have a separate class responsible for the actual gameplay. It keeps track of who's turn it is, what they bowled, etc. Ideally it would work just the same if it was a text based CLI game

#

and then you can connect all the outputs of the gameplay into the GUI

#

it's definitely not an easy task though, at least not for something this large

azure talon
#

My first goal in writing this was to create as few break points or points of failure as possible. My first attempt was 3 times as large. πŸ˜„
after this i need it to send the info back and forth between two lanes as player swap lanes based on the number of frames bowled. but will have to grab the score from the other lane and send it here.
So it's going to get bigger.

sleek hollow
#

that's a big reason why subclassing will help. You can simply write methods for these subclasses that make it easy to get/set their values

azure talon
#

like the scoring stuff will be on a "server" deal and the lane sends over the pin information then send back the results to update the display with.

#

I hear you and love the feed back. I appreciate it.

sleek hollow
#

Is this for mock data or this going to be really used for bowling?

azure talon
#

going to be used. My friend owns an alley and wants to promote bowling more by doing events during teh down time (summer time)

sleek hollow
#

I would highly highly recommend switching to pyside then. It has way better integration with async serverside/db functions

#

it will also look nicer too πŸ™‚

azure talon
#

But i hate learning! Mwahahaha. So I might be on the right track with that, good to know.

sleek hollow
azure talon
#

Yea not good at self learning, i'm not my best teacher

#

πŸ˜„

terse pine
#

this is very strange indeed, even the count() method doesn't work right if set to automatically run. If I just put text.count('1.0', 'end','displaylines') after creation and inserting words into the the text box "text" I get (364,), even though there are only 10 display lines. If I once again put it in its own function and have a button call the function, I get 10 like I should πŸ€”

sleek hollow
#

is it counting the lines or the characters?

terse pine
#

now if I keep it a separate function, but have it automatically call that function without using a button, I get another number altogether, 340 lmao

#

it's the exact same code, just whether I'm directly calling it or putting it into a function

#

but it should be display lines

#

both get() and text() and working as I would expect when I use a button to trigger them, so I'm assuming I'm, in general, using them correctly, just something more specific to calling them maybe too soon after initializing the text box? I don't really get it.

#

I tried putting sleep() but a part of me wants to think that wouldn't matter, I guess the program just stops for 5 seconds, so while it seems like I gave it 5 seconds before processing the next thing, perhaps because the program is frozen for that time, it still technically is happening an instant later in terms of processing

sleek hollow
#

@terse pine Can you explain what exactly you're trying to achieve? Remove the first line from a text box and add another line to the bottom?

terse pine
# sleek hollow <@243117556729249792> Can you explain what exactly you're trying to achieve? Rem...

That's the end goal, right now I'm just trying to understand how these functions work. Basically the end function is it should compare what you're typing in textbox2, with the text already in textbox1, and as you finish the first line, all the text "move up one" to reveal another line, I could also try to make it auto scroll as well, but I'm also strugglign with the see() command, and not really sure how to get it to work with "display lines"

#

this very second I'm trying to figure out why I can't get these functions to give me the correct values when they're not called by a button

#

and now weirdness I'm getting even with a button press. I decided to try and get it to print one display line at a time, it prints the correct number of total display lines (they go past the set dimensions of the box) but the for loop only returns the first display line and a bunch of blank lines πŸ€”

    def gettext(self):
        print(self.T2.count('1.0', 'end','displaylines')[0])
        for i in range(1,self.T2.count('1.0', 'end','displaylines')[0]):
            print(self.T2.get(f'{i}.0', f'{i}.0 + 1 display lines'))```
#

oh nevermind, I get what I did wrong with this latest function, '2.0' doesn't actually mean anything since that is "newline" separated lines, which I only have 1 line, I need to work out the logic some other way so it goes by display lines only

sleek hollow
#

@terse pine Here's some small sample code that cycles the lines

#
from string import ascii_lowercase as letters
import random
import tkinter as tk

current_spot = 5

def cycle_line():
    global current_spot
    text_box.insert(tk.END, lines[current_spot] + '\n')
    current_spot += 1
    text_box.delete('1.0', '2.0')


lines = [letters[0:i] for i in range(1, 27)]

root = tk.Tk()

text_box = tk.Text()
text_box.pack()

tk.Button(text='Test', command=cycle_line).pack()

for line in lines[:current_spot]:
    text_box.insert(tk.END, line + '\n')

root.mainloop()
#

it deletes line 1, and adds a new line to the end

#

click the Test button at the bottom to try it out

sleek hollow
#

that was just to create my example data, it's not really important for the overall logic

#

but 27 because range stops 1 before so I get 1-26, but I'm slicing [0:i] which also stops one before, so we're getting [0:26], which is all the letters of the alphabet

#

I probably could have written it nicer, but it was just to generate sample data so it wasn't important

azure talon
# sleek hollow Just need the right teacher, haha

Could I do something like this:

I'm sure I'm doing something wrong but testing for now.

class Widget(QWidget):
    def __init__(self):
        super().__init__()
        
        grid_layout = QHBoxLayout()
        
        for i in range(10):
            
            frame_layout = QGridLayout()
            
            foul_frame = QPushButton("1")
            ball1 = QPushButton("X")
            ball2 = QPushButton("/")
            ball3 = QPushButton("R")
            frame_score_show = QPushButton("450")
            frame_score_show.setSizePolicy(QSizePolicy.Expanding,QSizePolicy.Expanding)
            
            frame_layout.setRowStretch(2, 2)
            frame_layout.addWidget(foul_frame,0,0)
            frame_layout.addWidget(ball1,0,1)
            frame_layout.addWidget(ball2,0,2)
            frame_layout.addWidget(ball3,0,3)
            frame_layout.addWidget(frame_score_show,1,0,2,4)
            
            grid_layout.addLayout(frame_layout)
        
        self.setLayout(grid_layout)
sleek hollow
#

What is the widget meant to look like?

#

I get this, but repeated 10 times

azure talon
#

Yes, I think I got it but have to shrink it a bit.

class Widget(QWidget):
    def __init__(self):
        super().__init__()
        
        self.num_bowlers = 3
        
        game_layout = QVBoxLayout()
        
        for i in range(self.num_bowlers):
            
            bowler_layout = QHBoxLayout() 
            
            bowler_name = QPushButton("Name")
            
            bowler_layout.addWidget(bowler_name)
             
            for k in range(10):
             
                 frame_layout = QGridLayout()
                 
                 foul_frame = QPushButton("1")
                 ball1 = QPushButton("X")
                 ball2 = QPushButton("/")
                 ball3 = QPushButton("R")
                 frame_score_show = QPushButton("450")
                 frame_score_show.setSizePolicy(QSizePolicy.Expanding,QSizePolicy.Expanding)
                 
                 frame_layout.setRowStretch(2, 2)
                 frame_layout.addWidget(foul_frame,0,0)
                 frame_layout.addWidget(ball1,0,1)
                 frame_layout.addWidget(ball2,0,2)
                 frame_layout.addWidget(ball3,0,3)
                 frame_layout.addWidget(frame_score_show,1,0,2,4)
                 
                 bowler_layout.addLayout(frame_layout)
                
                
            bowler_total = QPushButton("450")
            
            bowler_layout.addWidget(bowler_total)
            game_layout.addLayout(bowler_layout)
        
        self.setLayout(game_layout)
sleek hollow
#

You're still trying to cram all the functionality into a single widget

#

One sec

azure talon
#

This is where my amature is still showing. πŸ˜‰

sleek hollow
azure talon
#

one sec

sleek hollow
#

is this correct?

azure talon
#

There's a 4th space at the top left for Indicators like crossing the foul line and such

#

MAX is FFF would be in there

#

Some alleys use dots instead but same function

sleek hollow
#

ok, so 4 across the top then

azure talon
#

yes

sleek hollow
# azure talon There's a 4th space at the top left for Indicators like crossing the foul line a...
from PyQt5.QtWidgets import *
from PyQt5.QtCore import Qt

class BowlingFrame(QWidget):
    def __init__(self):
        super().__init__()
        main_layout = QVBoxLayout()
        main_layout.setSpacing(0)
        main_layout.setAlignment(Qt.AlignTop)
        self.setLayout(main_layout)
        top_row = QHBoxLayout()
        top_row.setContentsMargins(0,0,0,0)
        top_row.setSpacing(0)

        self.foul_box = NumberBox()
        self.foul_box.set_size(48, 32)
        top_row.addWidget(self.foul_box)

        self.num_squares = []
        for i in range(3):
            num_box = NumberBox()
            num_box.set_size(32, 32)
            self.num_squares.append(num_box)
            top_row.addWidget(num_box)

        main_layout.addLayout(top_row)

        self.total_box = NumberBox()
        self.total_box.set_size(144, 100)
        main_layout.addWidget(self.total_box)


class NumberBox(QFrame):

    def __init__(self):
        super().__init__()
        self.setLayout(QVBoxLayout())
        self.setFrameStyle(QFrame.Box)
        self.setLineWidth(2)
        self.setFixedSize(32, 32)
        self.text_label = QLabel('')

    def set_number(self, text):
        self.text_label.setText(text)

    def set_size(self, width, height):
        self.setFixedSize(width, height)
        

app = QApplication([])
win = BowlingFrame()
win.show()
app.exec()
#

ok here's an example of a single frame

azure talon
#

just an fyi I do function before looks. but if you think it should be written different i'm all eyes.
I'm not sure how to call the right widget just yet. In tk I know how to index through it, just sure about this yet though.

sleek hollow
#

but now you can instantiate the BowlingFrame 10 times to create a bowler's frames

#

it's very basic for now

#

but each of these boxes can be populated with values

#

this isn't super optimized either though since I just wanted to get an example up and running

azure talon
#

first i get things to work before worring about other stuff really.

sleek hollow
#

this is without any sort of styling, but it works

azure talon
#

looks good. just thinking.

#

You don't have to write it but thinking.
So I can add a name box before, cycle it 10 times then a total box after.
PySide is differnt way of thinking for sure.

sleek hollow
#

yup, exactly

#

if you store those 10 "BowlingFrames" in a list, and you write a method that lets you fetch the value, then that makes it very easy to get the total

#

loop through all your BowlingFrames, call the get_value method, store results

solid frigate
#

yall i need some help with kivy

#

i was following a tutorial but suddenly my code crashed for no reason

#

i tried reinstalling kivy and it still doesnt work

#
# import libraries
import kivy
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout

# set version
kivy.require('1.9.0')
# create a label class
class NeuralRandom(App):
    def build(self): 
        return BoxLayout()
# load it
neuralRandom = NeuralRandom()
neuralRandom.run()
#
<BoxLayout>:
    orientation: 'vertical'
    Label:
        text: "NeuralRandom"
        font_size: 64
        color: 0.26,0.53,0.96
    Label:
        text:"-"
        font_size: 64
        coloe: 0,0,0
    Button:
        text: "Generate"
        font_size : 32
        size: 100,50
tribal path
#

I wouldn't call your rule BoxLayout but not sure that would cause a crash, what output do you get in the terminal?

azure talon
solid frigate
# tribal path I wouldn't call your rule BoxLayout but not sure that would cause a crash, what ...
runcell(0, 'C:/Users/USER/Downloads/fll app/main.py')
[WARNING] [Lang        ] The file c:\users\user\downloads\fll app\neuralrandom.kv is loaded multiples times, you might have unwanted behaviors.
[INFO   ] [Base        ] Start application main loop
[INFO   ] [Base        ] Leaving application in progress...
Traceback (most recent call last):

  File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
    exec(code, globals, locals)

  File c:\users\user\downloads\fll app\main.py:16
    neuralRandom.run()

  File ~\anaconda3\Lib\site-packages\kivy\app.py:956 in run

  File ~\anaconda3\Lib\site-packages\kivy\base.py:576 in runTouchApp

  File ~\anaconda3\Lib\site-packages\kivy\base.py:617 in stopTouchApp

  File ~\anaconda3\Lib\site-packages\kivy\base.py:198 in close

  File ~\anaconda3\Lib\site-packages\kivy\base.py:216 in stop

  File ~\anaconda3\Lib\site-packages\kivy\input\providers\wm_pen.py:119 in stop
    SetWindowLong_WndProc_wrapper(self.hwnd, self.old_windProc)

AttributeError: 'WM_PenProvider' object has no attribute 'hwnd'
#

it starts normal but the popup never appears and the app crashes

solid frigate
#

ping me btw

tribal path
#

Is this on a Windows tablet? @solid frigate

Calling it that is effectively adding those to every BoxLayout, you'll want to name/create your own.

That kv loaded multiple times would be something to look at too, is your main.py as shown? Or are you loading it too

solid frigate
#

its on a windows laptop

#

the first code is in main.py and the secound is in neuralrandom.kv

#

there is no other code parts

azure talon
tribal path
# solid frigate there is no other code parts
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout


class Box(BoxLayout):
    pass


Builder.load_string("""
<Box>:
    orientation: 'vertical'
    Label:
        text: 'NeuralRandom'
        font_size: 64
        color: 0.26, 0.53, 0.96
    Label:
        text: "-"
        font_size: 64
        color: 0,0,0
    Button:
        text: "Generate"
        font_size: 32
        size: 100, 50
""")


class NeuralRandom(App):
    def build(self):
        return Box()


neuralRandom = NeuralRandom()
neuralRandom.run()
#

Does running that have the same issue?

sleek hollow
#

widgets (like buttons, sliders, labels) can be added directly to other widgets/parents (and this is similar to how tkinter does place), or you can create a layout that sits inside a window or another layout. Some widgets also act as containers like a Frame would in tkinter. QWidget, QFrame, QGroupbox, and there's a few others. These can have layouts set to them

azure talon
sleek hollow
#

This site is probably the best free resource you'll find

azure talon
#

wonderful

#

one look already seeing the answers. Thanks again

solid frigate
#

its not fit for the newer version of python i haveπŸ˜…

tribal path
#

Which version? Or is it some Spyder quirk

#

@solid frigate kivy's latest release was with 3.12 support so shouldn't be that

solid frigate
#

i got it 1.9

#

and i got latest version of phthon

#

ill debug it tmrw

tribal path
#

If you were using a 1.x yea would move to a newer version -
the kivy require is a minimum check (and really of much use anymore)

solid frigate
boreal olive
#

can someone learn me the basics of tkinter?

#

dm me pls

sleek hollow
buoyant cometBOT
#

Here are the top 5 results:

Python GUI Programming With Tkinter
Build a Tic-Tac-Toe Game With Python and Tkinter
Bypassing the GIL for Parallel Processing in Python
Python sleep(): How to Add Time Delays to Your Code
Arduino With Python: How to Get Started
sleek hollow
#

this first link here is a good intro to tkinter

boreal olive
#

thx

wraith crest
#

my Tcloud tkinter coding

#

500 lines

empty aspen
# azure talon Anyone good at tkinter? TL:DR I have the screen update when an event happens and...

Are you still working on this? I have to say, @sleek hollow is basically saying exactly what I was thinking in regard to separation of concern and writing custom tkinter widgets that are subclasses of the already available widgets, but I'll expand a little on their point. @sleek hollow Can feel free to correct me if I am wrong here on anything as I am self taught and sometimes have little things I have missed but here is my two cents.

So in tkinter, just as there is an Entry(), or a Button() widget, there could be a BowlingScoreCard() widget that has whatever abilities you give it, for example:

score_card = BowlingScoreCard(['Bruse', 'kyle' ,'Alex', 'Steve'], <anything else you need to pass>)
score_card.update(player1, next_frame, some_bowling_thing)
score_card.next_turn(....)
#Or something relevant lol I don't know much about bowling but you get the idea I'm sure.

That way your custom widget is designed to do exactly what you need for your specific purpose and you have fine control over every aspect including adding numbers/symbols to the screen at the correct players frame, updating colors (you inherit the parent widgets method so if you use Frame() for example you can do everything a Frame() object can do plus any other abilities you add. Then you simply create an instance of the BowlingScoreCard() (or whatever it actually is lol) for each game.

This also allows you to write all the logic with no coupling to the UI as the GUI just displays data how you tell it, and the logic module handles creating that data. This will make everything a million times easier for you to work with. Let me know if you want some examples.

azure talon
empty aspen
azure talon
#

oh, it does a little. I'm still not good at working with classes.

empty aspen
#

Yeah this is the perfect way to learn. Tkinter is meant to be used with classes in my opion. It seems complicated but it is not and it is very worth it and also sometimes just needs to be explained the right way for the specific person learning them.

azure talon
#

For sure. I like TK. I tried learning QT today and it hurts my brain. lol

empty aspen
#

Lol yeah I prefer tk for sure.. Here I found you a quick example

sleek hollow
#

which is why I still say if you're going to take the time to refactor, you might as well use that opportunity to switch to PyQt

azure talon
#

my prob with PyQt is moving data around isn't the same and hard for me to grasp.
We can take this aside if you want to see what I've done with PySide6?

sleek hollow
#

Sure. I'd say to take it slow in the beginning if you aren't already

azure talon
#

I'm trying to put out the demo this weekend of something to look at and what not.

#

Just some knowledge I just don't have.
Say I build out the same screen by making a class for each frame and iterate it 10 times. How do I update the right frame info when updating the screen. I'm sure it's an easy thing, just don't know. Like do I have to point to a class[i] then the dict ect. Doesn't feel right. ect. To new at it.

empty aspen
#

Ok I need to ask a question.. is frame also a bowling term? lol

azure talon
#

oh sorry. lol yes.

empty aspen
#

haha ok I was having a hard time figuring out what was being represented there lol

azure talon
#

each round of turns payed by each bowler is called a frame, or bowled frame

empty aspen
#

man.. it had to be the same name as a widget lol

azure talon
#

lol i think I names more of widgets well enough thus far. lol

#

although a name like frame_labels.... not exactly genius

empty aspen
#

lol naming is the worst in GUIs. How are we allowed to show code here? Can we show screen recording of GUIs or is that not allowed? Sorry i have not used discord much

azure talon
#

back tick*3 at before and after your code if it's not too long.

sleek hollow
#

so if I created a bowling frame widget, I could write a method for adding the latest bowl

#

if I had a variable that kept track of the overall current frame, then I could just feed that information into my bowling frame list

#

this is pseudocode, but it would look something like this

self.bowling_frames[self.current_frame].bowl(5)
#

it could even go a step further with keeping track of the player too

azure talon
sleek hollow
#
self.bowling_frames[self.current_bowler][self.current_frame].bowl(5)
azure talon
#

my code already does that

#

I'm sure i'm not understanding working with classes in the setup part.

sleek hollow
#

it depends how granular you get with your classes. I think the important bits are

A single frame of bowling (contains numbers, fouls, totals)
10 frames of bowling for a single bowler (10 instances of your bowling frames)
An entire game board (10 frames created per bowler)

#

You can handle all the actual gameplay value updating from the overall game board class (or you could create one more class that acts as a "manager")

#

not quite the same setup, but here's an example of one of my UI that I use for exporting animation data

#

This is defined with one class

#

called a Clip

azure talon
#

this same is 4 bowlers but can be up to 12 average 6 bowlers

sleek hollow
#

This is my ClipManager class. It's responsible for keeping track of how many clips I have, and it can fetch all the data from them

empty aspen
#

how much functionality do each one of these litte sub frame have? Like the are dynamically updated right?

azure talon
#

they are

#

@sleek hollow you are awesome. πŸ˜„ I bow to you and @empty aspen knowledge.

sleek hollow
azure talon
#

I'm not hard coding to any number. I import the number and names.

sleek hollow
sleek hollow
azure talon
#

yea, that's a later thing as for now it'll only be 6 bowlers till I get all functions working.

#

I have a scroll function on the main screen that sets everything up.

sleek hollow
#

you should write all your bowling logic "in a vacuum". Then it's up to the UI to know what to do with that information

#

like calculating a frame of bowling. You should have a function that can take in values, and calculate the score

#

it doesn't matter if you use a UI or not, it should take in values, and return a score

azure talon
#

I don't know if you seen the full code or not.

sleek hollow
#

then it's up to the UI to feed it the values, then take the output of that function and display it

azure talon
#

I do have an update function

sleek hollow
#

but from what you shared last time, it was very directly connected to your UI

#

you need to write the bowling logic separate from the UI

azure talon
#

right. I understand what you are saying

#

run it in it's own class.

sleek hollow
#

just take a moment to think about all bowling logic that you'll need

#

think about inputs and outputs

#

I find it really helps to write "stub" functions as little placeholders

azure talon
#

should I move them to a separate py and import it or same but separate by class?

sleek hollow
#

up to you

#

theoretically the bowling logic should be so airtight that you could create a separate bowling program using that same class

#

like if you wanted a CLI version of it

#

keep it as decoupled as possible

azure talon
#

ok

worthy lotus
#

i want to make an adventure game but idk how

#

like ik how to make one that can be used via terminal

empty aspen
lament yacht
#

Does anyone here use PySimpleGui? If so does anyone have a good tutorial on how to use it with OOP?

empty aspen
# azure talon ok

This is what I learned tkinter with years ago.. it took me a while to undertsand this but once I did it helped a lot.. this example is a bit old and its from John Greyson's book Python and Tkinter Programming (but updated for python 3). Its just a learning script but it shows the power of what @sleek hollow and I are talking about as far as subclassing. The separation of concerns could be better but it's not the point of the example.

https://paste.pythondiscord.com/D3XA

sleek hollow
#

A lot of the power of these classes also comes from writing methods to interact with the data within that class

empty aspen
#

yes

sleek hollow
#

so a bowling frame class makes sense to have methods like "bowl()" and "get_total()"

azure talon
#

I think this is all great but I still missing the OG understanding.
Like the main screen should be the top frame and the bottom 2 frames.
Then I build a game class to put into the middle as that can change.
How do I put that into that middle frame.
Do I create a master frame in the class then, I guess add that frame into the main screen frame? or not do that?
I get classing out functions.

empty aspen
#

honestly if it were me, I would write the entire program with no GUI. Once I had a program that could produce the data I needed, I would start to create a custom widget for those little sub squares that are dynamically updated. I would write them to be ready to handle displaying the data they are passed. Then I would create a dashboard style layout with frames. I would pack the instances of my custom widget into the dashboard sections. See how I create my frames (using a custom Dashboard class I wrote), that allows me to just pack the custom Tree viewer I wrote? I wrote them completely separately, but they just plug in to each other.

azure talon
#

It works with no gui. lol

empty aspen
#

so then can you get all the non GUI code in to a separate file?

azure talon
#

I mean it's 25 lines but yea. It normally is as all that data comes in externally.

#

I only put it in this file cause the GUI was messing up.

empty aspen
#

oh the non GUI code is only 25 lines?

azure talon
#

Not sure if you saw the code or not.
lines 320 to 523 come in as a data point conisting of 4 dict's.
Not large though.
Then line 525 to 562 is the update I have to update the gui. The gui is 300 lines.

#

so normally 320 - 523 are not there.

#

Keep in mind I have them in their own class and not each def as a class.

empty aspen
#

Ok. I did see the code and i have it open here but I looked at it from a "why are the frames jumping" perspective as I realized I don't know anything about bowling lol

azure talon
#

lol Well if there's a bowling center any where near you, you should try it, it's fun.
There's 2 types, 5-pin and 10-pin. If I was coding 10-pin, I would be done forever ago.

empty aspen
#

lol I haven't done it since I was a kid. I started seeing things like turkey and I was like.. hmm yeah I know nothing lol

azure talon
#

do you watch or play any sports?

empty aspen
#

I do jiu-jitsu and watch football

azure talon
#

lol well I'll make it super simple as I can.
Each ball is a down and each frame is a qtr. (american football)
Each bowler gets up to 3 balls to knock them all down.
if all in 1 - strike
if all with 2 - spare
ball 3 is ball 3.
If you get a strike the next 2 balls count to that frame score. so gotta look back.
if spare next ball counts to that frame.
After each blower gets a turn a new frame starts.
Then add skip functions and incase someone is late or in the bathroom. Reset in case the pins don't setup correctly.

#

hitting throw ball buton simulates the ball crossing the ball senor and hitting or missing the pins.

empty aspen
#

ohh ok i see

#

ok so these functiions are your non gui functions

azure talon
#

Yea

#

so normally they come in like this:

empty aspen
#

I was seeing frame and not realizng that lol

azure talon
#

data[bowler#,frame#,Ball][ball value 0,0,0][symbol 0,0,0,0] the forth is tracking if a ball is thrown as you can't skip after the first ball.

#

This goes into the update at the bottom and updates the ui up top.

empty aspen
#

ok and tell me again the main use for this?

#

like tracking actual games, right?

azure talon
#

Yes.
Trying to get more people to play bowing. So setting up lawn bowling at events and bowling at events indoors where people can just come play and find enjoyment in the game to come out the bowling centers near by.

empty aspen
#

ohh cool

azure talon
#

So I already build the physical bowling setup to detect pin drop and return the balls. just need to get the screen to work.
there's a laptop setup to enter names and what not, send it to the lane where there's monitors of different size, doing this on the cheap.

empty aspen
#

its cool tho haha

azure talon
#

I think the frames are resizing, if I can get them to stay in place one in place. That would be the real goal.

#

frame frames. lol

empty aspen
#

yes.. which is why you need a custom widget

azure talon
#

aka don't resize once there.

empty aspen
#

so notice how the buttons on the calculator dont do that?

azure talon
#

well I wanted to do a set size but on differn't screens it looks really messed up.

empty aspen
#

they are each containerized on their own frame

#

and likely group onto another frame all together

azure talon
#

right and I thought I kind of set it up like that as it builds the name frame then the game frame then total and set weights to each in the grid setup.

empty aspen
#

yeah I see what you are saying

azure talon
#

so I'm just not kowledgable enough for sure.

empty aspen
#

I tend to use pack() and let them expand

#

sometimes certain apps are design to not be resized also

azure talon
#

So I tried packing everything. It was a mess. grid in the pack got the results so much easier for the most part. πŸ˜„

empty aspen
#

yeah haha you have to manage that or it will yell at you lol

azure talon
#

well it looks great. till it fails. :S

empty aspen
#

ok so those little sub squares are "bowling_frames" and they are tracking the results of each "ball" of each turn of each player.. yeah?

azure talon
#

Yes.
top left to track going over the foul line with a max output FFF.
then ball 1, 2, 3

empty aspen
#

oh so that is why there are 4 on top, and the one on bottom?

azure talon
#

yup

#

the bottom is the earned total plus preivous frames completed.

empty aspen
#

so one thing with the alignment to not change is that the text can't cause the parent widget (where you packed your label) to change size

azure talon
#

ok

#

Not sure if you saw my message, but we can take this to a vid call if you like. Might be faster. :S

empty aspen
#

I did not. I actually have to run to pick up my daughter now, but I will look at this more when i am back

azure talon
#

hit me up with an @ when you'd like to chat more.
same goes with @sleek hollow

empty aspen
#

for sure ttys

azure talon
#

be safe

sharp nest
#

Does someone know a good module for prompting in python? I'm currently using InquirerPy and I love it, the only thing is that it taskes really long to detect keyboard presses while in a prompt. See some testcode below:

# import libraries
from InquirerPy import inquirer

# create basic prompt
prompt_answer = inquirer.text(
    message="test", default="", mandatory=True,
)

# define function to handle escape key
@prompt_answer.register_kb("escape")
def _handle_escape(event):
    print("escape pressed")
    event.app.exit(result="escape pressed")


prompt_answer.execute()

InquirerPy is based on PyInquirer, but this module is a bit dated and doesn't even work on python 3.11, which in turn is based on prompt_tools. Can somebody help fixing this slow keybroard press detection or do I have to use another module instead of InquirerPy. If so, which one do you recommend?
P.S. I don't really want to a GUI, just a little bit more shiny than plaintext in the python console.
Thanks in advance

dire barn
sharp nest
dire barn
sharp nest
#

@dire barn text input but also menus where you can select what you want to do

sharp nest
#

This is an example of a menu using PyInquirer

sharp nest
#
# import libraries
from InquirerPy import inquirer
from InquirerPy.base.control import Choice
import time
import keyboard
from threading import Thread


def detect_key_press():
    global start_time
    while not keyboard.is_pressed('escape'):
        pass
    start_time = time.time()


# create basic prompt
prompt_answer = inquirer.select(
    message="select an action",
    choices=[
        Choice("add", "Add"),
        Choice("remove", "Remove"),
        Choice("edit", "Edit"),
        Choice("print", "Print"),
        Choice("settings", "Settings"),
        Choice("help", "Help"),
        Choice("quit", "Quit"),
    ],
)


# define function to handle escape key
@prompt_answer.register_kb("escape")
def _handle_escape(event):
    # print how long it took to detect the escape key
    global start_time
    print(f"escape key detected after {time.time() - start_time} seconds")
    print("escape pressed")
    event.app.exit(result="escape pressed")


start_time = 0
thread = Thread(target=detect_key_press)
thread.start()

prompt_answer.execute()

Using the code above I time how long it takes to detect the escape key and on average it was like 1.5 seconds. Is there maybe a way I can use PyInquirer and threading in combination with each other? The thing is that I still want to use event.app.exit(result="escape pressed") and that it won't work without the decorator.

sharp nest
#

I did some more testing and the problem only occurs when using escape. There are maybe some other keys but I didn't find any

dire barn
#

This is because of how special keys work in a terminal. If the library for example wants to react to arrow keys, those are given to the program as a sequence of several keys, starting with "escape". To know whether you meant to press escape, or something else follows to mean a special key, the library has to wait for a bit. But 1Β½ seconds seems excessive. Maybe this timeout is configurable?

#

Looks like InquirerPy uses prompt-toolkit, which has a ttimeoutlen option

lament yacht
#

so I need help using tkinter with custom tkinter, I am trying to center these grid like view, but to no avail, its impossible for me.

class Section(tk.Frame):
    def __init__(self, master=None, title="", **kwargs):
        super().__init__(master, bd=2, relief=tk.GROOVE, **kwargs)
        self.title = title
        self.info_var = tk.StringVar(value=f"{title}: No data")

        title_label = tk.Label(self, text=title, font=('Helvetica', 14, 'bold'), justify='center', pady=10)
        title_label.grid(row=0, column=0, columnspan=2)  # Place the title label in the first row, spanning both columns

        info_label = tk.Label(self, textvariable=self.info_var, justify='left', padx=10, pady=10)
        info_label.grid(row=1, column=0, columnspan=2)  # Place the info label in the second row, spanning both columns

        # Configure rows and columns to expand and fill available space
        self.grid_rowconfigure(0, weight=1)
        self.grid_rowconfigure(1, weight=1)
        self.grid_columnconfigure(0, weight=1)
        self.grid_columnconfigure(1, weight=1)

    def update_info(self, new_info):
        self.info_var.set(new_info)

    def handle_event(self):
        # Add your event handling logic here
        pass

class Dashboard(tk.Frame):
    def __init__(self, master=None, sections=[], **kwargs):
        super().__init__(master, **kwargs)
        self.sections = sections
        self.exit_event = threading.Event()

        # Arrange sections in a 2x2 grid
        for i, section in enumerate(self.sections):
            row = i // 2
            col = i % 2
            section.grid(row=row + 2, column=col, padx=10, pady=10, sticky="nsew")  # Make the sections expand and fill their cells

        exit_button = tk.Button(self, text='Exit', command=self.exit)
        exit_button.grid(row=4, column=0, columnspan=2, pady=10, sticky="nsew")  # Make the button expand and fill its cell

        # Configure rows and columns to expand and fill available space
        for i in range(5):
            self.grid_rowconfigure(i, weight=1)
            self.grid_columnconfigure(i, weight=1)

    def exit(self):
        self.exit_event.set()
        self.master.destroy()

class MyAppGrid(CTk):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        on_duty_section = OnDutySection(self)
        apparatus_section = ApparatusSection(self)
        incidents_section = IncidentsSection(self)
        responders_section = RespondersSection(self)
        self.sections = [on_duty_section, apparatus_section, incidents_section, responders_section]
        self.geometry('600x400')

        dashboard = Dashboard(self, sections=[on_duty_section, apparatus_section, incidents_section, responders_section])
        threading.Thread(target=self.event_loop, daemon=True).start()

    def event_loop(self):
        while True:
            for section in self.sections:
                asyncio.run_coroutine_threadsafe(self.fetch_data(section), self.event_loop)
                section.handle_event()  # Simulate handling section-specific events
                time.sleep(1)  # Simulate fetching data every second

    async def fetch_data(self, section):
        # Simulate fetching data asynchronously (replace with actual logic)
        await asyncio.sleep(1)
        new_info = f"{section.title}: Updated data at {time.strftime('%H:%M:%S')}"
        section.update_info(new_info)

So I omitted some codes since I don't think they're relevant

azure talon
#

@sleek hollow & @empty aspen I figured it out. in the label creation, width = value. it sets the number of expected charictors. This prevented the resizing to occure.

#

some flashing occurs but it's very minimal/

azure talon
#

@sleek hollow & @empty aspen Still would love some help with the code cleanup ideas. πŸ˜„

sharp nest
sharp nest
sleek lion
#

Anyone here knows why PySimpleGUI does not let you check a window size and position before closing it?

        while True:
            event, values = self.window.read()
            if event == PySimpleGUI.WIN_CLOSED:
                print(self.window.size)
                self.save_window_config()  # Store the window size to the config file
                break
            elif event == 'Add Note':
                self.add_note()
        # Close the window after saving the configuration
        self.window.close()

This print never works, the error is:

lament yacht
dire barn
sharp nest
#

Yes I think that too. Not using escape as exit key then

sleek lion
split marsh
#

Can someone help me with this thing? pip install pyside6 but the pyside6-uic is not working.

misty canopy
sleek lion
azure talon
#

@sleek hollow & @empty aspen
So I tried making them classes and now I've got a new list of visual issues. πŸ˜„ Mostly a sizing issue:

Anyone else can see what I'm missing:
https://paste.pythondiscord.com/QEJA

Got this:

Should be this:

sleek lion
# sleek lion that's my guess, so I've checked in the documentation and there is a flag to ena...

I ended up doing the same program twitce, with pysimpleguy and with pyside6, all it took has been around 5 hours. But I am going to stick with the pyside6 version, it's a lot more stable and with less weird errors. In case anyone wonders how both frameworks adapt to a dynamic layout, both files are in: https://paste.pythondiscord.com/TPTA
I am sure it can be improved a lot, after all I am just experimenting and having fun with it.

bright spade
#

Hi ! did anyone have some competences with PyQt5 ?

azure talon
sleek lion
#

I used to... 5 years ago

#

what do u need?

bright spade
#

I just have a layout with one column and I have no idea how I can put two columns next to each other πŸ˜…

#

It's like this for the moment I want to double the number of column but I can't do it lol

#

Would you like to take a look at my code?

sleek lion
#

something like this?

bright spade
#

more like that

sleek lion
#

I am going to assume you are using a QtWidgets.QVBoxLayout for that one? you would have to use a Grid Layout

bright spade
#

in width

#

I use a layout actually x)

sleek lion
#

not sure I understand what's the issue then

#

if you are using a grid, adding a new column is trivial

bright spade
#

yes I know it's easy but I just can't find the trick 🀣

sleek lion
#

the tricky part comes if you allow the window to be resizable and adapt the content to the new size of the window xd

#

Well, layout.addWidget(widget/button/element/whatever, row, col, 1, 1)

#

that's how you control in which column you set the element up

bright spade
#

So I don't need this ?

self.right_column_layout.addLayout(self.fuel_row) self.right_column_layout.addLayout(self.tyre_row) self.right_column_layout.addLayout(self.first_row) self.right_column_layout.addLayout(self.second_row) self.right_column_layout.addLayout(self.third_row)

sleek lion
#

When you add elements you can specify "where"

#

instead of just adding and defaulting to "next one", which seems to be what you are doing

#

controlling the position of the row and column will give you more control

#

albeit a bit more complex

bright spade
#

wait and see how it all turns out and make fun of me knowingly πŸ˜…

sleek lion
bright spade
#

thx

sleek lion
#

because as I was guessing, you are using a QVBoxLayout, it's there in your 5th line haha

sleek hollow
azure talon
#

yea but if they are not in classes it's fine. πŸ˜›

sleek hollow
#

also avoid multi-variables like this

#

you should use a dict or list to represent this

azure talon
#

sure but I see that more as a code cleanup later then anything, as it's handy when finding errors upfront. For me anyway

sleek hollow
#

if anything, more variables is harder to debug

azure talon
#

Not for this brain. If ball1 doesn't update I can locate the issue quickly. :S

sleek hollow
#

I can show you an example of how I would structure it in pyqt

azure talon
#

But I do understand what you mean

sleek hollow
# azure talon But I do understand what you mean
from PyQt5 import QtWidgets


class BowlFrame(QtWidgets.QFrame):

    SIZE = 128, 128

    def __init__(self):
        super().__init__()
        self.setFrameStyle(QtWidgets.QFrame.Box)
        self.setFixedSize(*BowlFrame.SIZE)


class BowlerFrames(QtWidgets.QFrame):

    NUM_FRAMES = 10

    def __init__(self, bowler_name='Unknown'):
        super().__init__()
        self.setFrameStyle(QtWidgets.QFrame.Box)
        main_layout = QtWidgets.QHBoxLayout()
        self.setLayout(main_layout)
        self.bowler_name = bowler_name
        self.bowler_lbl = QtWidgets.QLabel(bowler_name)
        main_layout.addWidget(self.bowler_lbl)
        self.frames = []

        for i in range(BowlerFrames.NUM_FRAMES):
            frame = BowlFrame()
            self.frames.append(frame)
            main_layout.addWidget(frame)

class LaneWindow(QtWidgets.QDialog):

    def __init__(self):
        super().__init__()
        self.main_layout = QtWidgets.QVBoxLayout(self)
        self.bowler_frames = []
        for bowler in ['Timmy', 'Alex', 'Sally']:
            bowler_frame = BowlerFrames(bowler)
            self.bowler_frames.append(bowler_frame)
            self.main_layout.addWidget(bowler_frame)


app = QtWidgets.QApplication([])
win = LaneWindow()
win.show()
app.exec()

#

it's missing the internal widgets, but the structure is here

#

once this structure is in place, it's now simpler to go in and simply edit the internal widgets. If I modify the BowlingFrame class, I know the placement of this widget is going to stay the same

#

I often will lay out my UI like this as a first pass "sketch", and then go fill things in

#

QFrame with Box style is a great way to visualize your widgets (since otherwise everything is "invisible" and it can be hard to see exactly what you're doing)

#

some more modifications. Now each frame is capable of displaying 3 bowls, and room for a total

azure talon
#

(need 4 across the top.

sleek hollow
#

the actually functionality isn't implemented, but that's ok, we're just making sure it's capable of displaying the values

#

ahh right

azure talon
#

but I get you

sleek hollow
#

but yes, I'm using a loop, I can just change the loop from 3 to 4

#

instead of adding a new variable

#

easy change

azure talon
#

Seems easier then my brain computing it.

sleek hollow
#

more modifications, little by little

azure talon
#

Want to see what i got going on so far?
can do a screen share meeting thing if you like.

sleek hollow
#

sorry I can't

#

I'm not nearly as well versed in tkinter tbh

azure talon
#

I mean with QT

#

Cause I am trying

sleek hollow
#

if it's anything like your tkinter code, part of the issue is you're still cramming too much into a single class

#

you need to compartmentalize/encapsulate

#

my GUI doesn't care where the data is coming from

#

it just needs to know "set this label to this value"

azure talon
#

So I have a lane entry class for reasons then a main screen class then starting the bowling game it's self in

sleek hollow
#

is lane entry what happens before the game starts?

azure talon
#

yes cause there's differnt bowling game types that can populate the main display region. For not, just getting the base working before adding other types

#

So It should always show this if no game is one, but changed to blue.

#

Then a call from the server with game type, bowler names and stats like averages and what not will be sent over to provide the data needed to start a game

sleek hollow
#

In my example, I'm using the LaneWindow class to display the information during a game of bowling. I would have another class eventually that would hold that class and has all the additional information surrounding it

#

you can use a "QStackedLayout" to hold multiple "screens" if you want to choose what to bring forward and display to the user

#

you could have a welcome screen/login screen/enter names screen or whatever other "screens" you want to come up with

azure talon
#

well all that last part gets sent, don't need a keyboard (physical or on screen) at the lanes. Just receive the data and populate

sleek hollow
#

how do the names get entered? During like a registration with the front desk?

azure talon
#

You bet

sleek hollow
#

ahh ok, nice

azure talon
#

when the lane system starts I need to know the lane before connecting to the reg desk:

sleek hollow
#

yeah, that would be a perfect use of a QStackedLayout then

azure talon
#

Once start is hit, generate the blank lane screen to wait till a game is sent

#

again can call and teach, less typing. lol

sleek hollow
#

If you use QMainWindow, it also has a "centralWidget"

azure talon
#

ok

sleek hollow
#

so instead of QStackedLayout, you can use QStackedWidget as your main widget

#

and then swap in the widget you want to display

azure talon
#

would it be better to load the main screen, popup the lane entry as it only needs to be done once, then the result back to a vaiable in the main to start the call to the reg desk that it's ready?

sleek hollow
#

yeah that would be fine, you could destroy that widget once you've retrieved its value

#

that would be a perfect use for a signal

azure talon
#

do I do something like:
Main_Screen.lane_id = lane_id
from the lane select. Not sure how how to send it over. The class construction for QT is a little different and I think it confuses me.

#

There's a single piece of info I'm missing in my brain to connect all the dots. Like a mini gap

sleek hollow
#

I can show you a basic example of that but then I have to get going

azure talon
#

appreciated

#

Please don't do too much.

this is the gap I'm missing. Obviously the arrow is where I'm failing

    def start_main(self):
        lane_number = self.lane_number_entry.text()
        # Main_Screen 'variable :lane_id' = lane_number <---
        self.destroy()
        
        # Put window code here
        

class Main_Screen(QWidget, Ui_Main_Lane_Screen):
    def __init__(self, lane_id):
        super().__init__()
        self.setupUi(self)
        self.lane_id = lane_id
        self.lane_check = False
        
        if self.lane_check == False:
            print(self.lane_check)
            Lane_Select().show()
            self.lane_check = True
            print(self.lane_id)
azure talon
#

you do too much, I owe you a drink

sleek hollow
#

it will start with just this entry. I wasn't going to build a whole num pad, haha. Type in a lane number here

#

Then it will display your bowler names with the current lane number at the top

sleek hollow
#

There's definitely still some missing connections like setting up the correct bowler names, and all the helpful methods for setting values in the frames, but hopefully this gives you a better idea of how to pass data around

azure talon
#

Thank you again.

sleek hollow
azure talon
azure talon
#

Just to understand.
You set the variable to send:
lane_selected = QtCore.Signal(int) (changed for pyside6)

You emited the signal:
self.lane_selected.emit(lane)

This caught the signal:
self.lane_screen = LaneScreen()
self.lane_select = LaneSelect()

    self.setCentralWidget(self.lane_select)

    self.lane_select.lane_selected.connect(self.on_lane_selected)

So it looked into the lane_select that is equal to the class,
looked at the vairable signal lane_selected
and connected it to def of on_lane to action the data received.

If I'm understanding you.

sleek hollow
#

yup, signals is how data gets passed around in your GUI. It's like using command=... on a tkinter button

#

in pyqt, most widgets have pre-built signals, like clicked for a button

azure talon
#

command is so much easier for me.
But that helps a lot. I know it functioned kind of the same but how it actions is different for sure.

sleek hollow
#

but here, I created a custom signal for the lane select widget, which gets emitted when a lane is selected

#

self.some_button.clicked.connect(self.some_method) would be the setup for a button in pyqt

azure talon
#

I like this cause when I send data over, I can parse it into different variables to be grabbed but the update func.

sleek hollow
#

command is nice in tkinter since you can assign a command to it in the same line that you create the button

azure talon
#

yea I got buttons pretty good.

sleek hollow
#

in pyqt, things tend to be very verbose.You need a lot more lines, even to do seemingly simple things

#

but that also means you have far more control over every little thing

azure talon
#

yea same line simple functions is like wearing socks in boots, feels good.

sleek hollow
#

in tkinter, you can only have a single command tied to a button though

azure talon
#

ha ha well they both have their advanages like you mentions before.

sleek hollow
#

in pyqt, I could connect the button to many different methods

#

signals are a good way for the main window to know when certain things have happened in the ui

azure talon
#

for sure.

sleek hollow
#

here, the main window is waiting to receive the "lane_changed" signal to know when it is meant to display the next screen

azure talon
#

in tk you can do an active variable to act that way as well. But I knind of don't like them as you always need a tick happening in that frame. Get's flashy if too much is happening on the screen

sleek hollow
#

active variable?

#

like StringVar?

azure talon
#

yea I know the name, one sec.

#

yes

sleek hollow
#

there's something similar in pyqt but it's mostly meant for larger data

#

Model/View

azure talon
#

yea, I don't really use it myself. I never saw a problem with just updating the text in a label when I need it. More control then sending a signal all around.

sleek hollow
#

a good example of where you might want to set up a signal would be the total score for a frame

#

your actual Bowling class would be responsible for updating each bowl, but you could emit a signal every time a bowl occurs to update the total score for that frame

#

you could emit a signal every time a frame ends, so it knows to move onto the next bowler

#

it's really nice to just emit signals when certain things occur, and then it's up to you to connect up your UI to determine what widgets care about the data that was just emitted

azure talon
sleek hollow
#

Take the code I gave you and just play around with it for a bit. Try and change some values, see what happens. Use it as a sandbox for testing stuff until you really feel like you have the hang of things

#

then you can focus on trying to combine it or integrate it with your other code

azure talon
#

Oh I am. Peicing it to gether to functions as I want.
Gotta add a few more things to it, that'll help understand as well.

sleek lion
#

I appreciate feedback. (Eventually I will use a database instead of txt files 🀣 don't worry, this was just for funsies)

lament yacht
#

okay, I've gotten the grid like system which is perfect, however I need help now to expand these boxes so each box covers a side of the window:

ex.

class RespondersSection(CTkFrame):
    def __init__(self,master):
        super().__init__(master)
        self.master = master
        self.grid_columnconfigure(0, weight=1)
        self.title = "Responders"
        #self.pack(pady=20,padx=20)
        self.grid(row=1, column=1, padx=20, pady=(10,10))
        self.width = 100
        self.height = 100
        #self.anchor(customtkinter.S)

class IncidentsSection(CTkFrame):
    def __init__(self,master):
        super().__init__(master)
        self.master = master
        self.grid_columnconfigure(0, weight=1)
        self.title = "Incidents/Calls"
        #self.pack(pady=20,padx=20)
        self.grid(row=0, column=1, padx=20, pady=(10,10))
        self.width = 100
        self.height = 100
        #self.anchor(customtkinter.S)

What can I do to ezpand this?

lament yacht
# lament yacht okay, I've gotten the grid like system which is perfect, however I need help now...

app:

class App(CTk):
    def __init__(self,*args,**kwargs):
        super().__init__(*args,**kwargs)
        self.title("FD Dashboard")
        self.geometry("600x400")
        OnDutySection(self)
        ApparatusSection(self)
        RespondersSection(self)
        IncidentsSection(self)
        self.anchor(customtkinter.CENTER)





if __name__ == "__main__":
    customtkinter.set_appearance_mode("dark")
    customtkinter.set_default_color_theme("dark-blue")
    app = App()
    app.mainloop()
azure talon
#

cause that are custom size, you are limiting them to what you can do with them. try adding to the grid

sticky = 'nsew'

But top right being NE and bottom left being SW... ect

unique flare
#

guys i am trying to install tkdesigner but i keep running into issues with pillow

#

i have tried using pip install tkdesigner Pillow==10.2.0 which gets the job done but gives this module error with urllib3. i have tried uninstalling and installing urllib3 but that didnt fix it either

azure talon
#

yea, I never got around that either.

tribal path
#

Either see if a version <2 of urllib3 works with 3.12 or use python 3.11 until tk designer updates to support v2.x

unique flare
#

gave the same issue

#

that pillow 8.4.0 doesn't support 3.11

#

and installing a lowe version of urllib3 didnt fix the issue either

unique flare
#

i just downgraded to python 3.10 and that seemed to fix the issue for now

tribal path
#

Had presumed the sticking point was more urllib3 (with a presumption that <2 wouldn't be supported on 3.12).

If the designer is also reliant/pinned on an older pillow (<9.2.0 perhaps) then yea will need to stick to a supported python and await updates

flint marlin
#

trying to do the command of "Status Bar" to toggle the status bar on the bottom like in notepad but when the frame.grid_remove() is called in else condition it didnt work
it worked when doing it manually without the toggle

#

initial call

#

after the command is pressed

#
class Menus:
    def __init__(self, window, textarea) -> None:
         self.status_bar_toggle = True
         
         self.status_bar()

    def status_bar(self):
        frame = Frame(master=self.window, height=24)
        Label(master=frame, width=24).grid(row=1, column=0)
        Label(master=frame, text="Ln 1, Col 1", relief=GROOVE, justify=LEFT, anchor=W).grid(row=1, column=1, ipadx=40)
        Label(master=frame, text="100%", justify=LEFT, anchor=W).grid(row=1, column=2, ipadx=5)
        Label(master=frame, text="Windows (CRLF)", relief=GROOVE, justify=LEFT, anchor=W).grid(row=1, column=3, ipadx=10)
        Label(master=frame, text="UTF-8", justify=LEFT, anchor=W).grid(row=1, column=4, ipadx=30)
        
        if self.status_bar_toggle:
            self.textarea.insert("1.0", f"status bar toggle set to {self.status_bar_toggle}\n")
            frame.grid(row=1, column=0, sticky=E)
            self.status_bar_toggle = False

        else:
            self.textarea.insert("1.0", f"status bar toggle set to {self.status_bar_toggle}\n")
            frame.grid_remove()
            self.status_bar_toggle = True
#

the class was called in my other file

sleek hollow
flint marlin
#

will do, thank you

hexed pendant
#

what package do I use for UI

sleek hollow
# hexed pendant what package do I use for UI

You have a few different options. tkinter comes with python already installed so it's a good place for a beginner to jump right in. If you want something more advanced, you can use PyQt

hexed pendant
#

does tkinter come with some restrictions to what I can do?

sleek hollow
#

do you have a specific UI in mind you're trying to make?

hexed pendant
#

not really but I think I would like to start by making like a basic inventory

#

like a minecraft inventory for example

sleek hollow
#

If you want something with drag/drop support, I'm actually not sure how well tkinter would handle something like that. PyQt has great drag/drop support though. How experienced are you with python already?

hexed pendant
#

eh I honestly dont know where I would put myself ig i'd go with beginner

#

I know control flow and feel like I have a decent grasp on the basics

sleek hollow
#

have you done any OOP/class coding?

hexed pendant
#

dont think so

sleek hollow
#

I'd start with tkinter then and just focus on a basic UI. Even with experience in pyqt, drag and drop can be a bit tricky to wrap your head around

hexed pendant
#

alright ty I appreciate the help

brisk mauve
#

I do a lot of SQL for work, and I overclock Excel for dumb things coworkers request quick one-and-done projects, but I think I would like to start developing Python scripts that can 1) collect data on a webapp so I don't have to use MS infrastructure to collect data for our various business processes, and 2) quickly work up data with some basic visualizations (think bar graphs) dumped from a SQL query into a csv. Currently use Azure Data Studio for our SQL stuff because it's free, and we use an Azure SQL db for our data storage (cheap, and our datasets are relatively small).

I've dipped a toe into both PyCharm and VSCode, but honestly they just feel clunky to me. I got my start coding back in Visual Basic back when I was in elementary school...so I'm drawn to a more minimal workspace. Anyone have experience with something like neovim? I like how stripped down it is, but I don't want to put up a big customization barrier between me and getting a few quick projects done.

Thoughts on neovim vs Pycharm/VScode for someone who does primarily fullstack data stuff?

inland wedge
#

helix is like neovim with a few better design desicions imo and more built in, ive had it for 1.5 yrs and my config is still like 10 lines of toml. A lot more stable for me than neovim distros

#

if you need plugins regarding sql, then plugin support is not yet merged

brisk mauve
#

plugins aren't really a big deal for me. If I really need the autocomplete functionality I do my query writing in ADS anyway. Sounds like you'd confirm that a more stripped down editor as an IDE is perfectly viable though. Does helix allow Git integration? I'm currently using Github for company-accessible code like SQL queries used outside my office, etc.

inland wedge
#

yes that was my concern going in but since it supports major protocols like language servers and treesitter it doesnt feel stripped down, it is pretty similar in features to vscode, just with a tui and it is compiled rust not electron. The git integration in helix right now is pretty minimal like showing changes made to a file since last commit in the gutter.

#

in my mind, it fits quite well in a tui ecosystem so git could be handled by something like lazygit

pearl dune
#

How does this ui design look for an installer and auto updater I made for fun? Made with PYQT5

digital rose
somber hemlock
somber hemlock
sudden elk
#

someone knows if and how is it possible with default libraries to draw on screen without any windows? Best if cross-platform (yeah, heard of windows tools but what about linux, mac, bsd and others?)

sleek hollow
misty canopy
sudden elk
#

Tk have problem with possibility to clickthrough...

sudden elk
#

And i have no fear of embedding c/c++ inside python (as long as it won't require additional installations of anything)

inland wedge
#

libadwaita kinda gives you that look out the box

sudden elk
#

Like i'd like to achieve sort of overlay of a custom WM

#

To loop over pixel 2d array, get or set colors and manually detect clicks (or clickthrough or ignore)

pearl dune
somber hemlock
pearl dune
#

im just gonna role with it as is, might change it in the future

somber hemlock
azure talon
#

Anyone around? Trying to get a class to update from another class without creating a circle loop.

hot hemlock
#

do you have an example?

azure talon
pearl dune
vapid bear
#

Hello, does anyone know any good solution for a realtime tui?

proven basinBOT
#

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

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

azure talon
# hot hemlock lol

I camel cased the variable call.... blah. I write too many e-mails at work. Some shift habits are hard to break. Ah hahaha

#

I was blind to it for hours.

topaz knoll
#

how to add a ba ckground image to my tkinter ui?

azure talon
#

Do you want to fill a whole screen behind some wigets?

unborn heron
alpine solstice
#

Hi people. I am working on little project.... I want to make .bat script to python and add gui... I already made .bat script (in attachment) and want to make GUI using tkinter... I have some knowledge of python, how tough can It be?

sleek hollow
slim cairn
#

I have a scrollable canvas with frame window placed on it. Instead of using scrollbar i am using mousewheel directly and manually updating the yview_scroll of canvas. The problem is that when canvas gets scrolled the frame (inside canvas) do not properly gets scrolled and bottom contents are still hidden.
I can't understand that what is missing to fix this issue.

Here is what i mean:
Left is before scroll and right is after scroll.
(canvas is colored red and frame inside canvas is colored yellow)

#

This is the updation code: https://paste.pythondiscord.com/OOYA

    def _configure_frame(self, _: Any):
        """self.frame.bind("<Configure>", self._configure_frame)"""
        w, h = self.frame.winfo_reqwidth(), self.frame.winfo_reqheight()
        self._canvas.config(scrollregion=(0, 0, w, h))
        self._canvas.config(width=w)
        self._canvas.config(width=h)

    def _configure_canvas(self, _: Any):
        """self._canvas.bind("<Configure>", self._configure_canvas)"""
        self._canvas.itemconfigure(self.frame_id, width=self._canvas.winfo_width())
        self._canvas.itemconfigure(self.frame_id, height=self._canvas.winfo_height())

    def _on_scroll(self, e):
        """self._canvas.bind("<MouseWheel>", self._on_scroll)"""
        self._canvas.yview_scroll(-(e.delta // 120), "units")

carmine pulsar
#

i want to make a simple spinning wheel, like wheel of names, with probability control and custom colours, it’s possible to make it in python or it is not the best language to create this kind of stuff

#

and also what is the best module i can use?

mighty frigate
#

there's no such component existing so you need to create your own, and you need to draw it yourself

carmine pulsar
#

oh crab

mighty frigate
#

I wouldn't recommend Qt beginners to try to do this as a first project with Qt

sleek hollow
mighty frigate
#

you don't have to actually spin it, only it's representation

sleek hollow
#

property animation?

mighty frigate
#

actually that's a good question

#

that's not the road I would have take instinctively

sleek hollow
#

I don't think there's any sort of rotation property...

#

convert widget to pixmap with grab, rotate the pixmap?

mighty frigate
#

you can make a fixed widget and draw it diffrently depending on some state

#

that's what I would have done

#

so litteraly drawing everything yourself

#

and drawing the rotation yourself

#

so it would not actually be rotation, it would just be the drawing of it

#

but like

#

rotation stuff, acceleration, decceleration, etc

sleek hollow
#

so everything from a paintevent?

mighty frigate
#

if my boss ask me to create something like this I would actively try to avoid it lol

sleek hollow
#

oh yeah 100%

#

I'd maybe hack something together with QDial, haha

mighty frigate
#

animation might be a good idea too it needs to be investiguate

#

the main problem I see is like, when spinning you want to know where you ended up

sleek hollow
#

I've only ever used minor property animations like colour or position

mighty frigate
#

by drawing all yourself, you know that without extra work

sleek hollow
#

I think as long as you know each segment size, and you know how much it rotated, you should be able to work out where it landed

mighty frigate
#

ok

#

found the best way

#

thanks to you

sleek hollow
#

oh yeah?

mighty frigate
#

you can generate a pie, or use an already existing pie from assets

#

and rotation an image in paintevent is painless

#

still have to handle acceleration and deceleration

sleek hollow
#

yeah, I thought using a pixmap and rotating it was the best way

mighty frigate
#

generating the pixmap itself if you want something dynamic might be annoying but maybe QtChart already have something that can do that

#

still, wouldn't want to do it lol, i'm too lazy

sleek hollow
#

yeah I think you're right that the chart is the best way to go about keeping it dynamic

carmine pulsar
#

so python is not the best

mighty frigate
#

Qt is a C++ framework with a binding in Python

sleek hollow
#

also how did I just learn that QLabel inherits QFrame....?

#

so much time wasted putting a label into a separate frame to style it

mighty frigate
#

doesn't matter the language for your task, only the UI framework you'll use matters

#

ahah

carmine pulsar
#

oh i see

#

i’ll find a good framework

sleek hollow
mighty frigate
#

the quicker would probably be to look into html/js/css

#

because there's probably something ready out of the box written by someone else

sleek hollow
#

pygame might have something

mighty frigate
#

but it probably means all your UI would need to be in the web stack

#

anyway

sleek hollow
#

To make things a bit more fluid feeling?

carmine pulsar
#

…

#

idk where to start if i need to code it in css

mighty frigate
#

I just started QML, as in I've been working with it for the last 3 months

#

and usually I work on industrial apps that's doesn't need a lot of polish

sleek hollow
#

Ahh fair enough

#

I haven't done a lot with it either, but recently started using animated background colour properties to indicate certain widgets

#

if they're missing information, or I want to draw attention

mighty frigate
#

I'm still not sure if I enjoy QML or not

sleek hollow
#

Haha what are the pitfalls?

mighty frigate
#

I feel like it solves some problems while creating others

#

I'm not sure, I'll get back to you aabout that in a few months

#

it's difficult to know if the difficulty I have is because I'm a noob with it or because it's a real flaw

#

I need more experience with it

dull slate
#

Hi

carmine pulsar
#

is it possible to create a spinning wheel (like the wheel of names) with customtkinter?

azure talon
#

The only thing I can think of is to create a animation or gif of a spinning wheel that takes a set time, do a random num between 100-200 and run the animation that % of time and figure out where it should land at.

tribal path
#

Can be done in any framework that lets you draw a canvas (I've made one in kivy) - but as noted you'd need to math it out

proven basinBOT
#

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

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

zenith wyvern
#

Anyone know how to fast learn QT?

#

Any ideas

#

I need it for a bunch of projects

#

With data science

sleek hollow
zenith wyvern
#

Yeah I know but do you think learning by documentation is great?

sleek hollow
#

do some tutorials to understand overall how it works, and then you can dig deeper into the documentation to learn new widgets

#

Once you get the process of creating a widget, adding it to a layout, and then manipulating that widget with method calls/signals/slots, you can apply that same idea to any widget

zenith wyvern
#

ok thank you so much

#

that will help me a lot

mortal quarry
proven basinBOT
#

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

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

#

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

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

zenith wyvern
#

but I am waiting for sales

ripe panther
#

any good resources for learning tkinter

sleek hollow
buoyant cometBOT
#

Here are the top 5 results:

Python GUI Programming With Tkinter
Build a Tic-Tac-Toe Game With Python and Tkinter
Bypassing the GIL for Parallel Processing in Python
Python sleep(): How to Add Time Delays to Your Code
Arduino With Python: How to Get Started
sleek hollow
#

first link here is great

ripe panther
#

thanks @sleek hollow

royal cape
eternal geyser
#

What to enter so that numpy performs the function of the numpy module.enter here(keyboard.press('shift'))

round pumice
#

I am currently learning flet. Is there. any sort of event that is similar to "Mouse leave event"? for me, this is useful when a mouse is hovering over an animatable widget but instantly clicks off (where the wiget goes back to its initial state)

novel badger
#

any user friendly gui type things or is it always going to be this

pliant mango
#

dasxc

#

cdaqwAS

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @vivid granite until <t:1707995342: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 @true turret until <t:1707996419: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:1707999198: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 @naive nebula until <t:1708001374:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

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

magic current
#

hello guys i really need your help since any fix on the internet i found is outdated. So i made this simple app and i'd like to make it possible for other people to download it and run it from their computers. I've made it an .exe file with pyinstaller but any time i bring it to desktop windows antivirus activates, deletes the file and proudly announces it to me. There must be another way to do this and if you know it please help me, also i am not sure which chat i should have posted this in so sorry. Thanks

radiant mirage
#

Pyinstaller is marked as a virus by most antiviruses

magic current
#

so i should try nuitka?

#

thanks

digital rose
#

Are there are good python gui libraries that don't have the licensing weirdness of Qt?

#

I mean, I don't plan on making xommerxial software woth it anyway I guess. Just feels weird

magic current
#

tkinter

#

@digital rose

digital rose
#

I'll give it a chance based on your word

#

Most tkinter interfaces I've seen look like windows 95 tbh but maybe I'm wrong

magic current
#

there is modern option

#

turns out you can download themes or something

#

styles

#

but it is very possible to build nice looking interfaces with tkinter

digital rose
#

Kay, I'll give it a shot

digital rose
#

I intend to make a fightcade-clone, I'm not sure that'd be possible in Tkinter unfortunately. I don't mind sucking it up and using Qt. Is something like this even possible in Qt

inland wedge
# digital rose Are there are good python gui libraries that don't have the licensing weirdness ...

gtk is gpl which allows sale but you must provide source code, it also looks nice: https://youtu.be/O1Na7HBSIAI?feature=shared&t=159
it has windows and macos support but the main target is linux
it is used by gimp and inkscape although they use old versions

Collector is a GTK4/Python app that let us to easily move multiple files from multiple location in a single window. it's heavily inspired by macOS Dropover; on video is Collector v 1.0.0

Collector on Flathub
https://flathub.org/apps/it.mijorus.collector

Collector (GTK/Python)
https://github.com/mijorus/collector

Drop it (GTK/C)
https://git...

β–Ά Play video
swift storm
#

question regarding an application that i am making

#

if i have a app booter and i want to add a software updater to this, how hard is this to achieve? If i have a version api and download server (which im developing rn), can i just overwrite certain .py files and thats it?

#

its just about the general concept of an updater

#

the question is more about the part of overwriting files rather than the download client + server, ive already researched that

misty canopy
#

that's a good question; I'd like to hear a good answer to it too :p
my first thought is "just overwriting python files is a bad idea; what if you need to remove some old files, too?". perhaps replace the directory with the new version, instead.

swift storm
#

though replacing the whole directory may involve a way higher download size

#

but yea, what if you need to add completely new folders? What if you need to remove assets etc

#

what if you need to move files & data to another folder

#

im sure it wouldnt be too hard to create. I am mostly wondering what the best practices are

#

If something like this (open sourced) doesnt exist for python applications yet ill consider open sourcing my own system that ill create for it

misty canopy
#

looking at how one of the tools I know autoupdates does it, it seems the answer is innosetup - all of its releases are packaged with it, and when needed it downloads the latest release's installer from github and launches it.

brisk drum
proven basinBOT
#

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

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

somber hemlock
inland wedge
#

i havent done it but would look at gimp or inkscape, i believe it involves msys and static libs

#

maybe with winget it could be more like the experience had with apt, dnf or guix

inland wedge
#

a shame because they made the renderer backends and everything

delicate radish
#

I have this omg.jpg file in a folder called images

app_folder
       |-images
       |    |- omg.jpg
       |
       |- main.py

and this is my simple code:


from tkinter import *

window = Tk()

window.geometry("600x600")
window.title("Skibidi Clicker πŸ‘Œ")

icon = PhotoImage(file="images/omg.png")

window.mainloop()

when i run it, i get an error:

couldn't open "images/omg.png": no such file or directory

what am i doing wrong?

digital rose
#

Did you try ./images/omg.png

rugged vortex
#

hmm does it even make a difference?

#

its better to give full file path anyway, like C:\Users\username etc

misty canopy
#

that's a bad idea too - now your project breaks if you ever move it or upload it to github or whatever.

inland wedge
#

ok you can do it relative to the current file using __file__, or better for restructuring is to have some function that gets the projects path in some file at a constant location, and then paths are found relative to that

#

pathlib is good too

#

eg some file at constant location:

def getProjectPath():
  return pathlib.Path( __file__).parent

or even setting some global as it will likely remain constant during execution
then elsewhere:

icon= PhotoImage(
  file= getProjectPath()/ "images/omg.png",
)
#

pathlib is object oriented path handling and works with any function that accepts a pathlike, if not it can be cast to a string

#

pep8 can sugmanuts

proven basinBOT
#

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

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

digital rose
#

Anything like Blazor in Python? Or anything that would allow you to build apps in a html-esque language? Idk

#

Been looking into pywebview but that requires Javascript I believe

inland wedge
#

perhaps the web assembly stuff could be of use ik there is some crossover with python

#

i think with web assembly one is still pushing content to the html backend layout thingy

#

ig gl area stuff exists

#

https://pyodide.org/en/stable/ this is cpython compiled to a wasm target, not some physical architechture like x86
so it can be run in the wasm browser ( virtual machine i believe) like that implemented in firefox

#

i mean there is stuff like relm too which is said to be declarative, relm specifically is rust tho
also the immediate mode stuff where the ui is completely generated each time step instead of incrementally but these are slower than incremental, especially with python probs

#

also both gtk and qt have markup languages

#

( builder xml or blueprint) or ( qml) respectively

#

but then you miss out on the dynamic construction of ui that a general programing lang gives you

digital rose
inland wedge
#

well you could use qml

#

best of both worlds

digital rose
#

I'd rather just use python itself. Seems expressive enough

proven basinBOT
#

A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.

earnest dagger
#

close ig from styling perspective

young sedge
# digital rose Anything like Blazor in Python? Or anything that would allow you to build apps i...

https://reflex.dev/

import reflex as rx


class State(rx.State):
    count: int = 0

    def increment(self):
        self.count += 1

    def decrement(self):
        self.count -= 1


def index():
    return rx.hstack(
        rx.button(
            "Decrement",
            color_scheme="ruby",
            on_click=State.decrement,
        ),
        rx.heading(State.count, font_size="2em"),
        rx.button(
            "Increment",
            color_scheme="grass",
            on_click=State.increment,
        ),
        spacing="4",
    )


app = rx.App()
app.add_page(index)

saw offered reflex

#

haven't tried personally

#

Personally driving towards the field of using templ + applying htmx. looks like really strong backend friendly combo.
templ gives me nice html/css templating with type safety and programming language usage.
htmx replaces me need to use javascript, it is rather rich in what it offers. Give a check for its overview here

digital rose
#

Interesting, thanks for the note

rancid hamlet
#

what is the best gui module for python

sleek hollow
rancid hamlet
#

ok

sleek hollow
rancid hamlet
#

Like calculator modern one and snake game after it

sleek hollow
rancid hamlet
#

Like started 2 minutes ago

sleek hollow
#

Oh

rancid hamlet
#

I mean 2 months ago πŸ™‚

sleek hollow
#

Ahh, haha

#

I'd recommend tkinter as a starting point. It's not the best gui, but it's fairly beginner friendly

#

.rp tkinter

buoyant cometBOT
#

Here are the top 5 results:

Python GUI Programming With Tkinter
Build a Tic-Tac-Toe Game With Python and Tkinter
Bypassing the GIL for Parallel Processing in Python
Python sleep(): How to Add Time Delays to Your Code
Arduino With Python: How to Get Started
rancid hamlet
#

Ok

full willow
#

Hello Everyone, I am a fairly new developer and I am looking for some guidance into picking a proper library / framework to use to build the app User interface

I am looking to build a modern user interface for a simple app for a medical xray device. This app reads the height and distance of the xray machine from the patient, using U-art protocol from sensors and displays it on the screen. It also sends motor signals to move the machine up and down, left and right using GPIO.
This app runs on a raspberry pi 4B

I am having a hard time determining which library to use to build the user interface. This user interface is simple but it does have a background image with Distance and height shown as text in a transparent card.

It also has a settings drop down for a configuration and calibration options which the user can interact with and set

What do you guys recommend? Any help would be greatly appreciated!

meager valley
#

whats the goal of having a venv honestly?

#

i thought by creating venv i could run the code in any pc i wanted.

inland wedge
royal cape
digital rose
#

What do y'all think about this gui

raw moth
#

cool

#

dont make function in a function

inland wedge
#

Functions in functions are cute

raw moth
#

ok

wheat galleon
#

made infinite craft with the help of local LLM and pyside6 for GUI

versed vessel
#

I'm using babel to translate my interface to various languages. I was wondering if I should make a english.po file since all strings are in English so there's no need to create that file because it'll fallback to the english str in the app code

proven basinBOT
#

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

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

lucid cedar
#

in flet how do i change the size of a FilledButton? i have tried wrapping the content in a container and changing its width but that didnt work

proven basinBOT
#

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

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

wicked helm
#
class MyApp(App):
    def hex_view(self,filename: str | Path) -> FloatLayout:
        a = Path(filename).stat().st_size
        
        root = FloatLayout()
        
        left_hand_side_offsets = FloatLayout()
        
        leading_zeros = len(str(a))
        
        top = 1
        for i in range(0,a+1,16):
            if i > MAX_ROWS_LOADED:
                break
            left_hand_side_offsets.add_widget(Button(text=f'{i:X}'.rjust(leading_zeros,'0'),color=TOP_OFFSET,size_hint=(.3,.03),pos_hint={'top': top}))
            top -= .03
        root.add_widget(left_hand_side_offsets)
        return root
        
    def build(self):
        return self.hex_view('Win10_22H2_EnglishInternational_x64.iso')
#

in kivy i want to make it so that i can scroll pass the left hand side offsets

#

but it gets cut off near bottom

#

im probaly gonna have to implement it myself arent i

#

is there anyway i can detect if a widget is off screen or nah

tribal path
#

Would be with a Scroll or Recycle View

wicked helm
#
    def hex_view(self,filename: str | Path) -> FloatLayout:
        a = Path(filename).stat().st_size
        
        root = FloatLayout()
        
        left_hand_side_offsets = FloatLayout(size_hint=(1,.5),pos_hint={'top':1})
        
        leading_zeros = len(str(a))
        
        OFFSET_LEFT_HEIGHT = .03
        
        top = 1
        for i in range(0,a+1,16):
            if i == 0:
                left_hand_side_offsets.add_widget(Button(text='Offset (h)',color=TOP_OFFSET,size_hint=(.3,OFFSET_LEFT_HEIGHT),pos_hint={'top': top}))
                top -= OFFSET_LEFT_HEIGHT
                continue
            if i > MAX_ROWS_LOADED:
                break
            left_hand_side_offsets.add_widget(Button(text=f'{i-16:X}'.rjust(leading_zeros,'0'),color=TOP_OFFSET,size_hint=(.3,OFFSET_LEFT_HEIGHT),pos_hint={'top': top}))
            
            print(left_hand_side_offsets.children[0].pos)
            
            top -= OFFSET_LEFT_HEIGHT
        root.add_widget(left_hand_side_offsets)
        return root
#

look its squished

#

i just want it to but cut off into a void or something

wicked helm
tribal path
#

There is Stencil to cut out, and can oversize the Layout.
If you have a runnable example - can see what the minimal changes would be with what you have

wicked helm
#
class HexView(FloatLayout):
    def __init__(self,filename: str | Path,**kwargs):
        self.filename = filename
        super().__init__(**kwargs)
        
    def on_size(self,*_):
        a = Path(self.filename).stat().st_size
        leading_zeros = len(str(a))
        try:
            self.remove_widget(self.left_hand_side_offsets)
        except AttributeError:
            pass
        self.left_hand_side_offsets = BoxLayout(orientation='vertical')
        
        max_amnt = int((self.size[1] // 58.18181818181818)*16)

        for i in range(0,max_amnt+1,16):
            if i == 0:
                self.left_hand_side_offsets.add_widget(Button(text='Offset (h)',color=TOP_OFFSET,size_hint_x=.3))
                continue
            self.left_hand_side_offsets.add_widget(Button(text=f'{i-16:X}'.rjust(leading_zeros,'0'),color=TOP_OFFSET,size_hint_x=.3))
            
        self.add_widget(self.left_hand_side_offsets)
        print(self.size)
#

how would i make the offsets left fixed size

#

i want it to stay the same size when i make it wider but

#

it becomes wider

tired rover
#

does anyone know how to make widget genratation in kivy faster? cause i need to make around 250 widgets at once but its too slow

wicked helm
#

dont make it soo often basically

somber hemlock
#

There must be something else going on

mighty frigate
#

using qml, how to make an item invisible but keeps its size and placement ?

mighty frigate
#

I've managed to do it by putting said item into another item with a size. That way, the layout can still figure out the placement wheiter or not its content is visible or not.

flint marlin
#

what do you call on this thing in notepad font window where
if you fill up the entry, it auto searches in the option list down below
and if you click something in the option, it fills up the entry

sleek hollow
#

Two separate events

inland wedge
#

Yh maybe with some lock to stop the click fill refiltering the results

#

Depending on how the toolkit works

deft belfry
#

does anyone know how can i register key presses using tkinter?

sleek hollow
deft belfry
#

ok ill try

royal cape
royal cape
# deft belfry does anyone know how can i register key presses using tkinter?

also its kind of mentioned in the resources, but in case you're not clear about it, tkinter will only send keyboard events to widgets that have "keyboard focus" so you'll need to be careful with what you call .bind() on:
https://tcl.tk/man/tcl8.6/TkCmd/focus.htm

At any given time, one window on each display is designated as the focus window; any key press or key release events for the display are sent to that window.
https://tkdocs.com/tutorial/concepts.html#events
You can also set up an event binding on a toplevel window. When a matching event occurs anywhere in that window, the binding will be triggered.
from what i can tell, some widgets like Text and Button automatically receive focus once you click on them, but other widgets like Label can't be focused on unless you manually trigger focus with the .focus_set() method

here's a demo if you want to play around with it: https://paste.pythondiscord.com/BUCA

velvet nebula
#

Hi i am creating Build of my project
problem ===> size of the build is too much........

query === > i am using pyinstaller library to build , I am using only camera functionality of openCv and the size of the build is 56 MB
is there any practice to reduce down this size or can we extract the particular functionality of the opencv and use only this small functionality in our code so that the space it covers get reduced

Script===>pyinstaller --onefile aiii.py

Code
`import cv2
import numpy as np

class ai:

cap = cv2.VideoCapture(0)


def __init__(self,val):
    self.assign=val      

def calling(self):
    while True:
        _, frame = ai.cap.read()
        print("heheheheheheh",_)
        print(frame)
        hsv_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)    

        if self.assign=='red':    
            low_red = np.array([161,155,84])
            high_red = np.array([179, 255, 255])  ##in this array we are defining hsv values
            red_mask = cv2.inRange(hsv_frame, low_red, high_red)
            red = cv2.bitwise_and(frame, frame, mask=red_mask)
            cv2.imshow("Frame", frame)
            cv2.imshow("Red", red)
      if cv2.waitKey(33) == 27:
            # for i in range(6):
            #     val=input('yes/no: ')
            #     fn()
            break

            exit(0)

#main
print('what colour would you like to test')
print('1. Red /n Blue /n Green /n Yellow /n Orange /n pink /n brown ')
def fn():
value=(input())
# ref=ai(value)
ref= ai(value)
# for i in range(6):
ref.calling()
# permission=input('yes/no: ')
# if permission.lower()=='no':
# break
fn() `

proven basinBOT
#

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

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

magic zinc
#

Hey community! I'm new to programming as well as Python... I'm really looking for a coding mentor, I have some ideas that I want to get started on but I really don't know what I'm doing that's why I joined this discord. I need help in building a user interface for an autonomous system not sure how to even approach it... any help would be dear

proven basinBOT
#

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

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

round hatch
#

any one want help in tk/ctk can msg me

proven basinBOT
#

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

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

proven basinBOT
#

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

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

proven basinBOT
#

failmail :ok_hand: applied timeout to @teal sundial until <t:1709394487: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 @elfin lark until <t:1709417706: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 @fossil root until <t:1709419093:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

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

somber hemlock
#

The thing is, the 56mb contains the opencv binaries which you can't just strip off of

proven basinBOT
#

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

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

hexed girder
#

hi Why python is little used in the graphics part

somber hemlock
#

Python web frameworks are just honestly bad

proven basinBOT
#

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

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

inland wedge
#

id say that pythons small use in graphics is due to it being a bottleneck in the cpu part of graphics rendering processes

#

in that case, python is a really good example of a operating system and hardware agnostic system

#

i guess software distribution is handled by sending ( compiled wasm binaries?) in wasms case on the web, or just javascript

#

there are also some excellent software managers out there though, such as gnu guix which allows you to inspect the source code of all software on your system, down to the handwritten binaries which bootstrap the process

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @neat hound until <t:1709524687: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 @autumn niche until <t:1709550205:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

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

wicked helm
#

in kivy what do i do so that i can display special unicode characters like \u263A
it just displays as that missing box with a X in it

stray compass
#

If that character isn't available in the current font, it'll default to the box with an X in it.