#user-interfaces

1 messages · Page 20 of 1

glossy burrow
#

yea I have zero intention on asking chatgpt to make something for me but I may consider seeing if it can answer questions perhaps. Its gotten so annoying im considering/planning on just changing to pyqt6. Not very far in my project on the UI side so I wouldnt have to rewrite 'too' much

austere trout
#

I’m using ttkbootstrap

#

as well as tkinter

glossy burrow
#

not familiar with what ttkbootstrap is specifically

austere trout
glossy burrow
#

hmm

austere trout
#

uses bootstrap like themes

#

yk what bootstrap is right

glossy burrow
#

ah that bootstrap, yes I do

austere trout
#

yeah the web design thing

#

ttkbootstrap is basically just a nicer skin for tkinter

#

ask chatgpt

#

he knows a lot abt it

glossy burrow
#

Hmm thats interesting I will check it out. because the dated feel of tkinter was another reason I was consiering changing. I picked it for it being more simple but I didnt expect to have these kinds of issues with it

austere trout
#

tkinter is generally the easiest ui tool imo

glossy burrow
#

I mean it is indeed simple, the biggest gripe is their docs are really not learning friendly and the tutorial/getting started stuff is very very basic

austere trout
#

knows

#

hes pro

#

only reason I managed

glossy burrow
#

sure ive just got beef with needing to do that for a library when there are other options. But either way time to make dinner and such now. take care, hope your pc is up and running again soon

austere trout
#

before I decided to send my ssd spiraling

full pebble
#

hey guys, is it allowed to as for GUI ideas here?

austere trout
#

took my an hour to fix my pc

#

you have to be seriously mentally deficient if you fuck up this

#

I am NOT taking any chances

digital rose
#

guys can i share you my ui design

#

based on it i would love to get feedback and suggestions

austere jacinth
#

does someone have a premium plan of chatgpt? if yes, can you dm me? then i will send a file and a prompt

glossy burrow
glossy burrow
# full pebble hey guys, is it allowed to as for GUI ideas here?

As long as you read and follow the rules its fine. It is best if you have something you started already and are looking for feedback. But also try to provide more details like what your project is, what you've done, etc
edit and also the best place to start is to find examples of UIs that you like to use for applications or systems that are similar to what yours is or will be like. And then make notes to yourself of what it is about those UI that you like to use, what is good, what would you change, etc. It can get you started quite well.

Unless you are asking about which gui library to use in which case just ask the questions, etc (along with like how familiary you are with python for example)

austere trout
#

finally finished the storage section

#

theres always improvement

#

but I’m done with it

glossy burrow
#

hmm ok ttkinterbootstrap does look pretty cool. need to read into it more to see what changes ill need to make

candid fern
#
image_label = Label(image=sign_in_image)
        image_label.pack()
#

the image wont load

royal cape
#

tkinter has a weird quirk with images, if you define them inside a local scope (e.g. a function) and that scope ends, the image gets garbage collected and silently disappears from your UI:
https://docs.python.org/3/library/tkinter.html#images

The image object can then be used wherever an image option is supported by some widget (e.g. labels, buttons, menus). In these cases, Tk will not keep a reference to the image. When the last Python reference to the image object is deleted, the image data is deleted as well, and Tk will display an empty box wherever the image was used.

#

to avoid that, you should store your image anywhere outside of your function, like in a global variable: ```py
my_image = PhotoImage(...)

def add_label():
label = Label(..., image=my_image)
label.grid()```

candid fern
#

it is in the def

digital rose
#

Guys here I am facing a issue

#

There are some images that I have kept under a folder and for file path i gave folder/image.png like this and when i am running my program in vs code then all images are visible but when I run directly it's not showing images thought i i a super folder under which my source code and image folder is kept

candid fern
austere trout
#

holy hell

#

finally finished the storage and network section

#

in my toolkit

austere trout
#

this is my first proper python application

digital rose
#

Any developer who is familiar with pyside6 as I am facing a issue on a open source project

mighty rock
# digital rose There are some images that I have kept under a folder and for file path i gave f...

Specify absolute paths or resolve your relative paths into absolute paths and use those in order for your program to access its required resources in any context.
Programs run in contextualized environments in which working directories are configured and from which relative paths are resolved.
When running your program from your project's working environment in Visual Studio Code, the working directory is probably set as the workspace folder. When it's from anywhere other than that, it's going to be either the calling program's working directory or a default directory.

mighty rock
#

What does that mean?

somber hemlock
digital rose
#

Lol

#

It was a joke

digital rose
vestal frigate
#

Where would I go for a CLI based coding project what channel would I talk in

glossy burrow
glossy burrow
candid fern
#

How can I add matplotlib to my root?

vestal frigate
candid fern
#

How can I use key binds

neon ibex
#

I created a list with a bunch of entries in tkinter. For each entry I want to add an indvidual text_variable, I dont want to use the same textvariable for each one since every entry will take different values. How do i do this?

#

this is snippet of code

#
self.revisions = StringVar()
...
def func(): # Trace function here 
  self.revisions.get()
        if self.revisions.get() != "":
            if int(self.revisions.get()) > 0:
                for i in range(int(self.revisions.get())):
                    self.add_labels.append(Label(self.master, text = f"Addendum Num for Rev {alphabet[i]}"))
                    self.add_entries.append(Entry(self.master, textvariable= notsure))
                    self.add_labels[i].grid(row = i+5, column = 0, padx=5, pady=5)
                    self.add_entries[i].grid(row = i+5, column = 1, padx=5, pady = 5)
...
#

the text variable will reference a StringVar() class, but I need to create multiple instances of string var classes

#

actually i think I just figured it out

#

see when you ask a question soemtimes it just forces you to think more

#

you create a list and in each iteration you append a StringVar() object to it

#

and then you use textvariable as the i'th index in the list you created

#

so a list of stringvar objects

#

i think it works

#

yeah it does

#

verrry guud

#

thanks guys

glossy burrow
# candid fern How can I use key binds

you mean like shortcuts? depends a lot on context and library you are using, etc.
Like for tkinter https://www.geeksforgeeks.org/how-to-activate-tkinter-menu-and-toolbar-with-keyboard-shortcut-or-binding/

glossy burrow
# neon ibex and then you use textvariable as the i'th index in the list you created

heh yea this is similar to what I ended up doing and then you can also just create the stringvar later. Though I also discovered that I didnt actually need the string var myself as I can just use set() or get() to change or retrieve the values of each box and parse them using a list of objects I create whenever an instance is created

neon ibex
#

yes

glossy burrow
candid fern
#

Like CLR+ c = copie
I = inspect

glossy burrow
candid fern
#
App.bind("<control-Return>", copie_function)```
#

Like this

#

@glossy burrow

glossy burrow
candid fern
#

The bindings like CTL+ C
For coping
Or
windows + shift + s for screen shoting

brave current
#

Hello, I wan't build and app for a raspberry 3 using the 3 inch display, I want to show some text and icons, I know c# but and a little of python , using c# or python how can I do a graphical app? Using a library? , can you helpme with some tips? Thanks

glossy burrow
glossy burrow
worldly light
#

Is there any way for me to Style my python app using HTML and css?

mighty rock
#

I think there are still some frameworks that support something like that

mighty rock
#

Eel if it's still a thing and Qt frameworks

#

Maybe Kivy but I'm not sure

proven basinBOT
#

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

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

strange copper
#

Guys, I am not able to think a design for my mobile app, and due to it my I am not able to move ahead at the coding part.

I want some idea regarding the design how what I should make,

I am making a mobile app for hostel mess or PG where the students can inform about the presence in advanced, Like if they are going to come for lunch or not. Can anyone give idea what kind of Color pallete and design I should go for?

sand night
worn marten
#

Or is it coloour

#

Idrk

#

But just look up color pallete snd youll find it

strange copper
worn marten
#

Other than that, just build out the backend first

strange copper
#

I thought till that I make the basic structure and design part and all

sand night
strange copper
#

Any sugesstion what colors I should go for ?

strange copper
sand night
#

To be fair, the color palette is up to you. It's a matter of personal preference for every individual

pliant dagger
#

for games

#

i know it's chrome but i put the dark souls grid

candid fern
#

root.bind("<control=Return>",transfer_information)

dusty plover
#

are there any people here who know how to create a application for a bot becouse i am not able to create if it always crashes

glossy burrow
dusty plover
#

thanks

neat fog
#

(pyside6): My ScrollArea is sqeezing the Qlabel widgets together to fit them in the "space", instead of allowing me to scroll through them. (my scrollarea is "unscrollable"). Thoughts?

#

(the widget in quistion is the one under the days of the week labels.)

glossy burrow
# neat fog

what is the code for the hour/time widget? sounds like you need to set its size directly

neat fog
glossy burrow
#

no, actual code

neat fog
#

I cant, too long of a message, (need discord nitro)

#

The best i can do is screenshot

#

@glossy burrow

glossy burrow
#

!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.

neat fog
proven basinBOT
neat fog
glossy burrow
# neat fog ight, there you go

Still pretty new to QT myself but pretty sure you need to add a property for setVerticalPolicy for the calendar area to fixed the resize just controls what the user can do to the window. and not preent the window from expanding to fit all the widgets you add to it.

#

Well and possibly setHorizontalPolicy as well depending on how you want it to look

#

or QSizePolicy.Maximum depending on your goal

glossy burrow
halcyon agate
#

is there a tui library that i can make something that looks like this (old, ncurses style stuff) but without the pain of using curses

#

im thinking of using textual but im afraid it might just look like a mobile app with the huge buttons

halcyon agate
#

Did someone ping me

slender oak
#

No

candid fern
#
#database frame buttons
            btnnotes = Button(Button_frame,
                              text="notes",
                              bg = "green",
                              fg= "white",
                              font=standerd_font,
                        width=23,                          height=12,                          padx=2,                     
pady=6)

#database frame buttons
            btnnotes.grid(row=0,
                          column=0)
glossy burrow
candid fern
#

Well discord didn't want to paste it correctly and I was editing it

glossy burrow
#

oh boy, QT main window class getting large. Though I do like this library waaay better than tkinter

royal gull
# glossy burrow oh boy, QT main window class getting large. Though I do like this library waaay...

This is the reason I tend to make components or utility functions for things. For example, here's one for a label. This helps at least with reducing boilerplate.

def create_label(text: str, *, bold: bool = False, ...) -> QLabel:
  label = QLabel(text)
  font = label.font()
  font.setWeight(...) # some enum value for bold
  label.setFont(font)
  return label

I 've also recently started to emphasize separating UI and logic since it makes things more maintainable.

class WindowUI:
  def setup_ui(self, window) -> None:
    ... # do ui things

class Window(QMainWindow):
  def __init__(self) -> None:
    super().__init__()

    self.ui = WindowUI()
    self.ui.setup_ui(self)
    
    # then actual logic would go here
glossy burrow
# royal gull This is the reason I tend to make components or utility functions for things. Fo...

Yea that certainly makes sense on the separation. Very new to PyQt6, and while I love it the bloat on the components grows quickly and still learning the best places to break things up as well. I have a sizeable class for the pandas table view so thats handled but the main window with the menus, toollbar, etc is going to get large so Ill need to break that off too I think. probably even a separate file I think

sleek hollow
#

@restive frigate I saw your question about pyqt methods. Which method are you referring to specifically?

#

many methods with specific names are called during certain interactions with the UI, such as mousePressEvent. If you were to change the method name, it would no longer work. It's a very specific name tied to that event

restive frigate
sleek hollow
glossy burrow
glossy burrow
royal gull
glossy burrow
#

or right type hint not cast

#

I suppose that also makes it easier to double check or read your own code too.

glossy burrow
#

Well I moved the tab builder out which cut the number of lines there by like 60% so thats a start
well it only half works so I guess more work to be done, heh

safe hull
celest python
#

Any thoughts on this ui i’ve got right now?

glossy burrow
royal gull
#

Seems like a wireshark type thing, looks great

glossy burrow
#

Agreed, Interface as layed out well and sizing is very readable

celest python
#

it’s gonna be an all in one networking app that can do everything really

celest python
#

Construct packets from scratch and automate sending, firewall rules like netlimiter, and an area where you can modify packets in your capture before they get sent back out

#

just like anything network related I can think of

#

i’ll add

celest python
#

the previous version of the ui was pretty awful I just remade it yesterday

glossy burrow
#

cool! and I feel ya on the ui issues, just started redoing my UI cause I hated it though my app is far from very usable still, heh. Looks good though, do you plan to add like REST support for other firewall products as well or things like that?

celest python
#

i’m very new to networking so i’m not too sure what that is haha

#

i’ll have to look into it

glossy burrow
celest python
#

I use pyQT6 for mine

#

gotta say I really like it

#

very customizable

#

very easy

#

if you don’t mind sharing what type of app you making?

glossy burrow
#

budget/expense tracking app. cause I disliked all other offerings especially commercial ones and I found this was the perfect excuse to truly learn python

glossy burrow
# celest python I use pyQT6 for mine

actually something I am having trouble with is dynamically updating the table view when I am trying to change the source data. I am finding the documentation a bit confusing in that regard as I am using the QAbstractTableModel which seems a bit less straighftorward about it.

lofty pond
# safe hull https://github.com/IronxBARK/image_converter.git i have made this image convert...

For keybindings it will be binding it to the root IIRC (not sure if Canvas may have some oddities).
Example:

root.bind("<Escape>", escape_me)
root.bind("<Enter>", enter_sequence)

A complete list of the keybindings can be found here:
https://www.tcl-lang.org/man/tcl8.7/TkCmd/keysyms.html

As for the grid layout/or dynamic resizing you would have to write that manually as because you are using canvas the items are static, but take a look at this:
https://stackoverflow.com/a/22837522

Lastly the picture preview would be taking the image and converting the bytes into a Pillow image and put that to a ImageTk.PhotoImage to display onto the canvas

glossy burrow
winged raven
#

How do I make a python script loop

glossy burrow
#

simplest way is to just put while true: at the top, then put all your code under that indented out and it will run until you cancel it. but there are many other methods as well

candid fern
#

Is it possible to make the window round?

candid fern
#

im having troble with this program im using myseq and its ben giving me problems problems are attached

pliant fractal
#

WIP project using customtkinter

mighty rock
#

Cool

candid fern
#

res = tk.call(*(args + options))
^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: Invalid column index nop

neat fog
#

How to insert an image into a Qbutton? i tried using a image path though despite doing it to the best of my knowledge, the image path was incorrect or smth.

sleek hollow
neat fog
#

self.settings.setIcon(icon)

sleek hollow
#

Don't use qpixmap too

#

Give the path to the qicon

neat fog
#

ok

#

Do i just put the image path in there? thats what i saw on internet

sleek hollow
#

Yes

neat fog
#

Got an error, This is the path i used: "C:\Users\john_\OneDrive\Desktop\Settings.png". wrong format?

sleek hollow
#

You need to use a raw string if you're going to use \ in your path

#

Put an r at the start of the string

neat fog
#

just like "rC:\Users\john_\OneDrive\Desktop\Settings.png"?

sleek hollow
#

Before the "

neat fog
#

or r"C:\Users\john_\OneDrive\Desktop\Settings.png"

#

texts crossed

#

gotcha

sleek hollow
#

Yeah like that

#

Should really make a proper folder for this so you're not just pulling files from your desktop

neat fog
#

yeah i will

#

is there an easy way to make my Qbutten fit to the image?

sleek hollow
#

Unfortunately no

#

You can get the image size, and then set a fixed size to the button based on that

#

You also need to match it with setIconSize on the button

neat fog
#

okay Thanks for all the help

#

preciate it

candid fern
#

How can I make a filter so I can look for a specific file?

candid fern
#

My user interface python so I can look for a txt files if it's a text editor that I'm making

candid fern
glossy burrow
# candid fern TKinter

in the file dialogue object just add filetypes = (("Text files", "*.txt") as a parameter

#

i.e.

filedialog.askopenfilename(title="Select Text File", filetypes = (("Text files", "*.txt")))
candid fern
glossy burrow
candid fern
#

Before you see the error I clean that up

glossy burrow
#

I don't honestly see in that file anything about opening a file?

#

nor is the error referencing a line from that file

candid fern
glossy burrow
# candid fern https://paste.pythondiscord.com/EFMA

yes so the line 61, if that is the one you are asking about. You can either add extensions to it. like
filetypes = ((,"*fasta, *.txt, *.doc")) etc
or if you want it as different type filters:
filetypes = ((,"*fasta"), ("text","*.txt))

candid fern
#

I didn't know if I needed to have the definition for faster just like how there's text for a txt file

glossy burrow
candid fern
#

Chachi BT had to write and format that part most of it is written by me some people have made edits/ suggestions
But the main one was having the sign in button do I put the definition within the definition to make it concurrent though or do I can I place it somewhere else inside the class and use it as the command for using the button for genetics also how can I make it so that it's not small

glossy burrow
# candid fern Chachi BT had to write and format that part most of it is written by me some peo...

not sure about what small issue you are talking about but if you are needing a separate file import dialogue than the one you currently have then a separate function would be ideal. Or if you plan to have many different file open options with different filetypes creating a class for the filedialog box might be better if you are comfortable with that level of code. otherwise you can just keep it simple. If it is not the same file as your fasta file then it should not be in the same place

glossy burrow
#

Hmm I am having a weird issue with a tableview in pyqt6. with the following code it basically imports a CSV and populates the table with it. which works just fine however the editTriggers doesnt seem to function and I am not sure why

                self.main_tabs.setCurrentWidget(self.data_tab_widget)
                expenses = handlers.import_file_dialogue(import_filename[0])
                print("Data import complete")
                try:
                    self.data_table_model.update_table_from_dataframe(expenses)
                    self.data_table_view.resizeColumnsToContents()
                    self.data_table_view.setEditTriggers(
                        QTableView.EditTrigger.DoubleClicked
                        | QTableView.EditTrigger.AnyKeyPressed
                    )  # this doesnt work here either
                    print(self.data_table_view.editTriggers())
                except Exception as e:
                    print(e)

And the property is getting set correctly afaik because the print statement does return

Data import complete
EditTrigger.AnyKeyPressed|DoubleClicked

And yet nothing I do lets me edit the cells. Even trying with a blank single row dataset before import I cant edit them.
The other two functions in there do indeed work, both the call to the function to update the dataframe as does the resizecolumns method. and the set triggers clearly sets them but they still are not editable

royal gull
glossy burrow
royal gull
glossy burrow
candid fern
glossy burrow
candid fern
#

Do I have to import TK into the module so that can open the desktop or can I just add that code run it and then when it comes to the main program with TK in it because it wouldn't present a loop where it might disable the program or hurt its effective

candid fern
glossy burrow
glossy burrow
candid fern
#

I have it's working perfectly

#

Except it's giving me a problem on the comand

#
def genetic_button():
    filedialog.askopenfilename(title="genetic file reqest",
                               filetypes=("genetic files", "*fasta"))```
#

@glossy burrow

glossy burrow
candid fern
#

_tkinter.TclError: bad file type "*fasta", should be "typeName {extension ?extensions ...?} ?{macType ?macTypes ...?}?"

#

fasta is a dna type file

glossy burrow
#

so if you are doing like "yourpets.dna" then the filter should be ("genetic files","*.dna")

candid fern
#

its from bio python

glossy burrow
#

well it doesnt technically matter the source, all that matters is you are saving the file with a specific file extension that you can then use in your open file dialog type filter to find it again. even if you do a custom one

candid fern
#

print(record.format("fasta"))

glossy burrow
#

and see what happens. though you probably still need to do the period since its using the builtin OS dialog box which is looking at file extensions specifically

candid fern
#

s = master.tk.call(self.command, *master._options(self.options))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: bad file type "*fasta", should be "typeName {extension ?extensions ...?} ?{macType ?macTypes ...?}?"

glossy burrow
#

yup, you need to add the period then like I was saying. *fasta is not a filetype, *.fasta is

candid fern
#

tkinter.TclError: bad file type "*fasta", should be "typeName {extension ?extensions ...?} ?{macType ?macTypes ...?}?"



def genetic_button():
    filedialog.askopenfilename(title="genetic file reqest",
                               filetypes=(("genetic files", "*.fasta")))
#

is this explaning okey

glossy burrow
#

You forgot the * it's "*.fasta"

candid fern
#
def genetic_button():
    filedialog.askopenfilename(title="genetic file reqest",
                               filetypes=(("genetic files", "*.fasta")))
candid fern
glossy burrow
#

or as a list works too

    file_path = filedialog.askopenfilename(
        initialdir="/",  # You can set a different initial directory, e.g., os.getcwd()
        title="Select a File",
        filetypes=([("genetic files", "*.fasta")]))
candid fern
#

What is the directory for documents?

glossy burrow
candid fern
#

How can I get the user name?

glossy burrow
candid fern
#

I'm sorry I'm just trying to make it so if I download this onto a different computer I don't have to manually go into the code and change it every single freaking time

glossy burrow
#

I understand. Quick Google says it is os.getlogin() returns the username which should work but can't verify that. But usually you will also want to do the os.path.join to put it all together.
Like
user_documents= os.path.join("C:", "Users", os.getlogin(), "Documents") and then you use user_documents in the initialdir=user_documents. You will need to do much more if you want it to work in Linux or older versions of Windows but that should work for anything like Win7 or newer for sure.

#

And also of course you need import os in your program too

mighty rock
# candid fern What is the directory for documents?

You may as well just do this if you are targeting the Windows documents folder: initialdir=r"%userprofile%\Documents"
It's a Windows environment variable so it's automatically resolved by Windows. This requires no additional imports and no function calls, just that the environment variable is set, which may not always be the case as it's technically a volatile environment variable

glossy burrow
#

Yea if you only care about windows this is the much smoother way to do it

candid fern
#

tkinter.TclError: bad file type "*.fasta", should be "typeName {extension ?extensions ...?} ?{macType ?macTypes ...?}?"

#

def genetic_button():
    filedialog.askopenfilename(initialdir="%userpofile%\Documents",
                               title="genetic file reqest",
                               filetypes=(("genetic files", "*.fasta")))
#
 s = master.tk.call(self.command, *master._options(self.options))
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: bad file type "*.fasta", should be "typeName {extension ?extensions ...?} ?{macType ?macTypes ...?}?"
candid fern
#

@glossy burrow

glossy burrow
candid fern
#

ive ben tinkering and it is giving me a headache i put in Documents for the initdr and it dosent it gose to One drive sorry if im being a vampire but 6 months ive ben workin on this

glossy burrow
#

sounds like windows shenanigans

candid fern
#

yes

glossy burrow
#

%userprofile%\Documents opens My Documents on my computer and not OneDrive so unfortunately it sounds like something related to your computer

candid fern
glossy burrow
#

or you could try it like initialdir=C:\Users\%username%\Documents first, if that works you should be fine

candid fern
#

%u is blue

#

and.....nope os i guess

glossy burrow
#

the os one should certainly work and would allow you to also adapt for other OS platforms if you wanted to

candid fern
#
def genetic_button():
    user_documents = os.path.join("C:", "Users", os.getlogin(), "Documents")

    file_path = filedialog.askopenfilename(
        initialdir=user_documents,
        title="Genetic file request",
        filetypes=[("Genetic files", "*.fasta")]
    )

    return file_path```
#

still dose not work

glossy burrow
candid fern
#

One drive I tell you I'm losing my mind

glossy burrow
#

If you just goto start>run and type in C:\Users\yourusername\Documents and hit run does it open onedrive?

#

because I am quite sure this is not a code issue at this point but an issue unique to your computer or similar.
Because if I do C:\Users\my_user\Documents it opens my local documents, and if I do C:\Users\my_user\OneDrive\Documents it opens one drive.

#

@candid fern

candid fern
glossy burrow
# candid fern i dont know how do stop one drive

Well if you dont use it just sign out of it. But really what happens when you do the start>run test, because its not like onedrive deletes your local documents or anything
edit even on my company computer, which has very aggressive onedrive settings I can directly access both folders via commandline and python without issue

candid fern
glossy burrow
# candid fern got the One drive off and its going to gallery now

Honestly it sounds like something is very wrong with your windows profile or there is some other detail being left out here. Because that is literally not how file paths work. What version of windows are you on because C:\Users\User\Documents != C:\Users\User\Pictures or whatever other folder you are managing to open.

candid fern
#

Microsoft Windows 11 Home

glossy burrow
candid fern
#

?

candid fern
glossy burrow
#

or even the address bar of a windows explorer window works too

candid fern
#

So I put start and then run and then the file name

glossy burrow
#

no the command itself C:\Users%username%\Documents nothing to do with python for this or the progrtam

candid fern
# glossy burrow no the command itself C:\Users\%username%\Documents nothing to do with python ...

C:\Users%username%\Documents
C:\Users%username%\Documents : The term 'C:\Users%username%\Documents' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1

  • C:\Users%username%\Documents
  •   + CategoryInfo          : ObjectNotFound: (C:\Users%username%\Documents:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
#

I can't believe I got an error again

glossy burrow
#

I can since that was the terrminal, just use the run prompt in the start menu

glossy burrow
#

you left out one of the backslashes

candid fern
#

I'm doing everything and yeah it's not even bringing this up is it bad that I want to just quit when I'm coding and move on

glossy burrow
glossy burrow
# candid fern

also just hit enter and ignore the search thing but yea if that doesnt even open anything then there is certainly something wrong with your computer and it has nothing to do with python

royal gull
#

!pip platformdirs -- this might be handy for things like this

proven basinBOT
#

A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`.

Released on <t:1746658062:D>.

candid fern
glossy burrow
royal gull
#

If they're using OneDrive, then yeah, their user documents folder would be within that.

glossy burrow
glossy burrow
modest apex
#

Is there anyway I can use a circle using rich or any other library in Python, I basically just want it inside my Panel on rich to display stats.

glossy burrow
glossy burrow
modest apex
#

I really just want a chart of some sort so I can display stats in the rich layout, I will would like to test any of them really to see how they fit together with the rest of my layout/dashboard.

#

But I think pie chart is what im looking for.

#

Nvm I meant pie chart all along but my english isn't the best, never knew it's called a pie chart, in my language a direct translation would be circle chart or circle diagram.

glossy burrow
# modest apex Nvm I meant pie chart all along but my english isn't the best, never knew it's c...

no problem on the language, there are just many different graphical charts that one needs to be sure. I know that Qt has pie charts as I am literally just starting to create one myself for my application but I can't offer much beyond that currently as I dont have personal experience with it. chart.js is a very common web library for charts, but obviously that is for web and probably not worth trying to embed that into a python gui app

modest apex
#

Yeah, either way I don't want a GUI as I currently want a TUI, but I'm definitely considering to just port it to the web.

#

Honestly is way better and way more flexible and then I can use some very nice frontend libraries like shadcn, daisyUI, MUI, etc.

glossy burrow
#

Yeah I plan to make a web version of my app eventually as well both for functionality as well as appearence. There are just so many libraries and components available to make web UIs look really nice and are not that complex. Even just HTMX+Bootstrap can take things above and beyond.

neat fog
#

I want my image and my Qbutton to be the same size i know the pixel size of the images but Qbuttens and other pyside widgets use .size which is not pixel size, thoughts?

sleek hollow
#

Do you still want the button styling?

neat fog
neat fog
#

Aka evenly take up the space in the button

hearty jay
#

Is there anyone who are experienced with vb.net? I need help on making a functional calendar. All I have made so far is this

mighty rock
#

Could've maybe helped if it involved Python

#

Are you having trouble resizing or something?

hearty jay
hearty jay
glossy burrow
sleek hollow
proven ermine
#

Hi everyone! I'm building a desktop Python app (targeting both macOS and Windows) using PySide6 for the GUI, and using SQLite3 and JSON files to store data that gets updated during runtime.

I plan to bundle the app using PyInstaller, and I’m having some confusion about how best to handle user data that needs to be written at runtime.

Right now, on macOS, after building the .app (using one-file mode), I found that if I manually move my data folder into:

MyApp.app/Contents/Frameworks/folder_with_data
...then the app is able to write to those files during runtime, and it works.

I’d appreciate it if anyone could guide me on whether there are any standard practices for handling user data in Python app development, if there are any open-source projects that demonstrate this well, and if anyone could help me figure out how to handle it correctly in my app.

#

Hope this is the right topical chat for this

dire barn
#

It is not alright, see our rules on advertising.

glossy burrow
proven ermine
#

also, do you know of any open-source projects using a Python GUI with a backend-like structure? would love to see how they implement file storage and how it works after being compiled.

glossy burrow
proven ermine
candid fern
#

Has anyone ever made their own gps?

grizzled monolith
#

Hello. Anyone has an example of flat design with TkInter ?

#

Or maybe using webview ? Any hints ?

glossy burrow
glossy burrow
#

Yea ttkbootsrap is pretty cool though I already reached frustration level with tkinter and moved to qt myself, 🙂

glossy burrow
vestal carbon
#

I'm developing a full-featured visual UI engine built on PyQt6. It allows users to design application interfaces visually, with support for advanced layout control, smart snapping, resizable split panels, layer-based widget management, and dynamic property editing. The system generates clean PyQt6 code behind the scenes, enabling developers to export functional prototypes or full app screens directly. It’s designed to streamline UI creation without sacrificing flexibility or structure. Besides what I have explained, what are other key features you would have loved was available?

dense charm
candid fern
#

Does anyone know how to make a file search engine

mighty rock
vestal carbon
# mighty rock Does it have testing and hot-reloading? I vaguely remember QtEditor only lays ev...

Yes it does. It's far from a finished product. I have a small, but working skeleton for a blueprint system (similar to Unreal Engine) connecting nodes to add logic. I am not trying to compete with QT Designer. I got a lot of flac when I made a post on Reddit. "This looks like QT Designer". This is a side-project I decided to not throw in the bin. My vision is to make a UI Sandbox/Engine where you very simply drag stuff around, resize, change properties and have the ability to add logic without needing code, (but can code to)

mighty rock
#

Could add the ability to change window title and icon maybe

vestal carbon
#

This is a quick example. I have placeholder code for adding icons. You can change window title. I want blueprints to work before I proceed much further. I want to make blueprints robust while keeping it easy to use. You can add more visual styling inside properties for each widget.

cyan island
#

Hey guys.
Just wanted to know, if you guys have some tricks for applications using tkinter, to use overrideredirect in Linux, and still be able to receive keyboard inputs normally?
And is transparency achievable in tkinter?

(This is for a UI Shell kinda hobby project that I am doing. )
(Please ping me for responses, that way I can notice it)

candid fern
mighty rock
# cyan island Hey guys. Just wanted to know, if you guys have some tricks for applications usi...

Shouldn't overredirect basically toggle intuitive window management? What keyboard input aren't you receiving "normally"? What are you doing not "normally" so you do?
If I remember correctly, tkinter transparency is set for individual top-level windows, but is limited to be inherited for every widget in them so it's like all or none of the window parts. You can set it by window["-alpha"] = 0.5 for half transparency. Beyond a certain threshold, too transparent values may render the window uninteractable.

cyan island
zealous robin
#

where can i learn some tkinter? i wanna do interfaces

wooden needle
modest dove
tiny creek
#

anyone want to help me. i been stuck for days now

mighty rock
#

I'm assuming the problem is that no ants show up in the canvas. Show the code that's responsible for drawing them on the canvas.

old tinsel
#

CarbonKivy - Carbon Design Kivy

CarbonKivy is an open-source Python library that integrates IBM’s open-source Carbon Design System to the Kivy framework. It empowers developers to create modern, accessible, and visually consistent applications across platforms—desktop, Android, and iOS—using Python.

Documentation

Read the full blog here

Medium

Are you a Python developer looking to build stunning, professional, and cross-platform apps with ease? Meet CarbonKivy—the bridge between…

warped whale
digital rose
#

For anyone interested I think this classes as a 'user interface'. It uses the AI model of your choice Gemini Pro, Claude, ChatGPT, Grok and even local models in LM Studio to not only write Python code, but to execute it.. It will actually install Python for you too.. Not only does it install Python at your request, write and execute the code, but it also sends any Python output back to the model as a prompt creating an intelligent feed back loop allowing the model to learn and self correct it's mistakes without human interaction. When executing Python if there are any missing dependencies it will respond to the error generated and install what is necessary. These probably sound like BIG claims so heres a demo video.
https://www.youtube.com/watch?v=muuiWoub5Sg
I'm excited to share this, it is a totally free tool I developed to help rapid development in Python .
Any feedback appreciated

🖥️ Download today at: https://powershellgpt.com/?ref=https://www.youtube.com/watch?v=muuiWoub5Sg

PowershellGPT: Your Voice-Controlled AI Windows Assistant

PowershellGPT is a revolutionary Windows application that bridges conversational AI with system automation, allowing you to control your PC through natural language voice commands in o...

▶ Play video
cyan island
bleak nymph
vale dawn
#

Hello, can you help me with pywin32? I created this python script with chatgpt but after several attempts I can't resolve the error at launch. The error: PS C:\Users####> & C:/Users/####/AppData/Local/Programs/Python/Python312/python.exe "c:/Users/####/Desktop/Nouveau dossier/test_interface.py"
Traceback (most recent call last):
File "c:\Users####\Desktop\Nouveau dossier\test_interface.py", line 1154, in <module>
app = LanceurApp()
^^^^^^^^^^^^
File "c:\Users####\Desktop\Nouveau dossier\test_interface.py", line 856, in init
self.changer_categorie("Applis")
File "c:\Users####\Desktop\Nouveau dossier\test_interface.py", line 1073, in changer_categorie
self.afficher_raccourcis()
File "c:\Users####\Desktop\Nouveau dossier\test_interface.py", line 983, in afficher_raccourcis
icone_img = get_icon_system_windows(info.get("chemin", ""))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users####\Desktop\Nouveau dossier\test_interface.py", line 756, in get_icon_system_windows
if not is_windows() or not win32con:
^^^^^^^^
UnboundLocalError: cannot access local variable 'win32con' where it is not associated with a value https://pastebin.com/dKyipuHd

dapper osprey
#

you dont need to reimport modules inside functions, you can just import them once at the beginning of the file

#

this reimport is causing the error

vale dawn
vale dawn
#

ping me when you answer me

hoary canopy
old tinsel
urban pine
#

Hi people! Hopefully not a dumb question but I'm trying to write a very basic program that displays GUI/text (as shown in this mock-up photo I made). I'm a little overwhelmed trying to find a library that allows transparency and can be overlayed over other windows / the taskbar even when out of focus. Does anyone have any suggestions or opinions on the best library suited for this?

mighty rock
#

Tkinter can but probably with rectangular corners

obtuse acorn
#

(They are in-window not pop-up windows)

steep hatch
#

I am looking for a real time GUI Framework for the project about i development which would most preferred to learn

#

It should be used development sectors as well real time

#

Any suggestions let me know please 🙏

mighty rock
mighty rock
steep hatch
#

I am looking for best chart module that would sync with PySide 6

obtuse acorn
#

Ssshhh I know animations are bad design but the user is supposed to edit the dashboard with WTFScript anyway

little wedge
#

Is using TKinter as frowned upon as my buddy suggests? haha

royal gull
obtuse acorn
#

Theming tk/ttk is hard

#

Qt or a web-based gui is probably best for learning in the long run

steep hatch
#

Where i can learn Pyside6

sleek hollow
steep hatch
young sparrow
hoary walrus
#

.

hardy quartz
#

Hi, can Tkinter make GUI for Android ? :v

dusty flare
#

Why?

  • Tkinter depends on the Tcl/Tk GUI toolkit, which isn’t supported on Android.

  • Android has its own UI frameworks based on Java/Kotlin and the Android SDK.

#

but you can do Python GUIs on Android with other tools!

#

with Kivy | Beeware | Chaquopy

#

@hardy quartz

glossy burrow
# obtuse acorn Theming tk/ttk is hard

There is tkbootstrap which is kinda of nice for theming it better but in the end I gave up on tkinter completely for PyQt6 myself and like it better overall (better docs too)

obtuse acorn
night silo
dense charm
mighty rock
#

Cool

hardy quartz
visual flume
#

Is CustomTkinter safe to use?😅

mighty rock
#

Why the doubt

visual flume
#

Because it's an external lib and I'm a tad new to python 🙂
Just wanna make sure

mighty rock
#

It has a great reputation

strong hinge
#

Yes

buoyant cosmos
#

oh look at that theres a ui channel

#

any pyside6 users on?

#

I need help

neat fog
#

how to make code in pyside6 create an additional new Qlabel each time i click a Qpushbutton (and assign dictated properties and location etc)

young rivet
mighty rock
#

Looks nice

#

So widgets inherit this theme? Very well done

young rivet
# mighty rock So widgets inherit this theme? Very well done

whether you inherit this theme or not depends on you. I just made it with dark version because it's easy on the eyes. But you can choose any color theme you like (just change the references and it's very easy). And for using, you can just put the tkcustomwindow.py to one file and then import in your main.py and use the CWindow. It's not anymore limited to just hold icon, title and window buttons. You can put there the main tabs of your program e.g. File, Edit, View etc. same as other softwares like VS Code do. Or maybe center the App Title. In short, whatever you like. It's easily customizable via root._title_bar, root._title, root._icon.

slender elk
#

What do you recommend for starting automation in Python?

glass kite
#

Any recommendations for UI in python? Currently using customtkinter and love how quick everything is, but wish I could make things look a little better.

glad trout
#

You could use pyqt5 i used it web engine for my browser project

cyan island
#

Could I share a project of mine here, done with tkinter? Or is this not the place?

plucky rivet
#

working on an image viewer, using pyqt6

still mica
#

does any one know where i can find some CSS Website Layout

hearty cargo
#

m currently making a study planner using tkinter for a project, and im including all the basic features that a study planner should have (like to-do list, goal tracker, streak trackers for subjects, and weekly analyses)

the project guidelines say that my project would be better if i included some unique element, that stands out from other projects.

i would really appreciate if anyone had ideas for some cool or interesting features i could add to the planner, thanks

cyan island
static lantern
plucky rivet
#

it has color themes with dark/light variants!

cyan island
dawn notch
steady abyss
#

hi guys i am new to this server, i am pretty fluent in python and hope to you know get some poeple and build projects and solve problems together

spare coral
#

@hallow rune the best way to make android apps in python is not kivy, not qt, or these python apk builders

#

There is a project called Flet

#

This flet is python binding with flutter

#

It is relatively new but it promises the capabilities of flutter that is on par with react native (it looks better by default)

#

There are rarely videos about it but it is good to try out

#

Flutter is very good at mobile UI

spare coral
#

Something off mind

#

Good night

hallow rune
#

cool ? but why you mentioning me dawg 💀

spare coral
#

You are a friendly one

#

That's why

inner yarrow
#

Material palette Generator gives you material palette based on original material palette generation algorithm.

It's available in Github and PyPI

It's going to be a great tool for those who want to make their own UI theme based on any GUI toolkit such as tkinter, kivy, pygame, pyqt5 or anything else.

GitHub

Generate Material 2 color palettes in Python. From a base hex color, you can generate primary, complementary, analogous and triadic palettes and preview them. - blacksteel3/material-palette-generator

split oyster
#

friends i have a question

#

i have been developing something like a basic game engine in python but i just found out that i cant use tkinter for the gui.wat can i do

glossy burrow
split oyster
#

because tkinter and pygame use different threads or in my understanding i cant have both things in the same window

sleek hollow
split oyster
#

Brother I don't know how

sleek hollow
#

There's never been a better time to learn then

tiny warren
#

Does anyone know any python cli tools? Like interactive cli tools opens an interactive session? I know they exist just drawing a blank.

lapis hull
# tiny warren Does anyone know any python cli tools? Like interactive cli tools opens an inter...

For building CLI UIs? I think I've seen praise for rich/textual

GitHub

Rich is a Python library for rich text and beautiful formatting in the terminal. - Textualize/rich

tacit owl
finite pendant
#

how to make ui in a simple way

cyan island
finite pendant
tawdry dust
#

Does anyone have any experience with Mesa?

dawn notch
#

What's that

warm drift
raw otter
#

Hello everyone, I am developing a little app with Tkinter, but I have some issues. Basically, at some point in my code I need to do some actions in a loop. The problem is that the moment when I enter the loop my UI freezes. Is there a way I could make the loop in my code work without freezing the Tkinter app?

sleek hollow
raw otter
#

The only thing that the ui must be able to do is to quit the loop.

#

The actions have no impact at all on the ui

sleek hollow
#

Can you be more specific?

raw otter
#

The actions in the loop include: writing data to json file, running some commands using subprocess, playing audio using pygame, and sending notifications.

sleek hollow
#

The answer will be threading then

#

UIs (tkinter included) run on a main event loop and anything that interrupts that loop (such as a long running task) will block the loop from being able to process anything else in the UI until it finishes

#

you can send that task to another thread though which won't block the UI while it runs

raw otter
#

That's what I had in mind. Thanks a lot!

half helm
#

hi. how do i make a pyqt QStandardItemModel with custom drag and drop behavior? i honestly dont know how to start off from subclassing it. i just want the item's children to NOT become a parent when i try to organize them via drag and drop

stark canyon
#

Subclassing QStandardItemModel for Custom Drag-and-Drop

  1. Subclass QStandardItemModel
  2. Enable Drag and Drop
#
  1. Override dropMimeData to Control Drop Logic
#
  1. Optional: Customize Mime Handling
sleek hollow
sleek hollow
# half helm yes

It wouldn't be about subclassing the model then. You need to overwrite the dropEvent of the view class (by subclassing that)

silver furnace
sharp plover
#

Hey everyone 👋 Has anyone already used customtkinter ? I'm trying to add a simple button, but it doesn't appear. I can click on the button and thats all. It does what it's supposed to do when clicked

#
    btn_read = ctk.CTkButton(
        app,
        text="Read JSON",
        command=btn_read_json,
        width=140,
        height=28,
        fg_color="blue",
        text_color="white"
    )
    btn_read.pack(side="top", fill="x", padx=20, pady=20)````
#

Here is how i added it

hybrid solar
#

hello

inner granite
#

is it ok to have a cart wrapped in a singleton?

torpid pewter
#

Guys hi.
Shall i learn all python lessons? I use TKinter.
and I'm beginner.

uneven bear
#

Aha! So there is a Tkinter channel.
I'm mid development on a library I started building back in 2019 to make Tkinter... A bit less 1991. (the actual year Tk first shipped) By which I mean -- To make it modern, skinnable, support widget-level sibling transparency, and performant.

Today's a big day for me. I just cracked Scroll handling. And I mean, I destroyed it. 120fps, smooth as butter with over a hundred widgets assigned to the scroll area. I'm chuffed at this one!

Here's a screenshot of the testbed I'm developing on.

#

My graphics are all oversized right now, figuring to build for 4k and then scale down. I've made just enough little glyphs for the sake of testing and proving what works. But transparency has been online for a while now. And you can drag that circle in the top center around the screen to prove the transparency is real. 😉

#

Proud enough of it today to join a new server, just looking for any human being who might be able to appreciate that Tkinter doesn't do this. But I've made it do this! lol

torpid pewter
boreal pier
rotund flax
# torpid pewter Is this by phone or Pc? It's horrible :v

Not an appropriate response to someone posting a project, having constructive criticism of things is fine but for someone to join the server and be presented with that it's not really appropriate or in line with behaviour we expect under our Code of Conduct.

uneven bear
# boreal pier Try looking into DearPyGUI, it does all of this pretty well too, you might like ...

Well, the goal of this project is accomplish all this using Python's Tkinter -- and ZERO dependencies. No PIL or NumPy even. That's the fun challenge of it, really!

A quick look at DearPyGUI and it seems to run on a GUI system for C++. Which would make it a LOT more powerful, and easier to accomplish all this stuff, no doubt. But I want to get there with just Tk, and no libraries beyond my own entirely-Python code needed.

And after this victory with the scroll system, I think I've proven it can be done. Tk can provide a modern UI experience.

sleek hollow
uneven bear
# sleek hollow tkinter really struggles with cross platform which is a good reason to use a mor...

I'm personally not that concerned with cross compatibility. But Tk was made as a cross platform system. So, if you stay within the boundaries of what it set out, you can actually squeeze a lot out of it. That's the miracle of what I'm doing, really. The potential has been under the hood. But it's not been well used, implemented, or documented.

Most people think that Tk simple can't do the things that I've got it doing now; or can do it, but at too slow a framerate; or without the features of a more modern toolkit.

I'm no defender of Tk or Tkinter, either. If anything, I'm proving what was always here, that the maintiners - in 30-some years - never exposed in a way that was usable to the average dev.

I mean... Imagine this: Python, without anything other than Python itself (in terms of C libraries) containing a fast and capable Window manager interface that can look like whatever you want. No being stuck to even the OS' choices.

#

That's the dream. And I've been working on it long enough, no one's talking me out of it -- thanks. It speaks to the state of Tkinter that in an official Python forum of like 30,000 people, in the the #user-interfaces channel, no one thinks its worth using. 🤣

#

That's what I hope to fix.

sleek hollow
uneven bear
#

Ah! Qt... I've been less than impressed with it where I see it. It certainly gets the job done. And honestly, I don't intend to meet what Qt can pull off with my library any time soon. That said -- every app that I find out runs on Qt is one I have personal quams with.

OBS for instance, provides a system for docking and configuring your workspace the way you want it. A powerful feature. Except that it all has to exist in relation to a static, non-configurable space that will either define a complete row or a complete column. And this one Achilles heal makes that whole system a tug of war and a mess to get the results you want. They've got a button hidden in there to switch which axis should be considered the primary one, to try and help, and if you toggle it on, it DESTROYS the layout you've already built. Real mess.

The other one is SMPlayer. And it's the best, most configurable media player I've found for Windows. (Less consistent on Linux, honestly.) I love it. But I have the same kind of friction and gripes with it. Is it configurable? Incredibly! Is it intuitive to configure? Not really. Does it fulfill the promise and provide the expected results when you change a setting? Coin-flip.

Qt is certinaly an improvement on the old cross-platform model... But I feel it's still a heavily opinionated system that prefers its own internal logic over trying to meet reasonable user expectations.

sleek hollow
spare badger
#

I love you. Sammy.

Gggggggggg

torpid pewter
#

@rotund flax 🙏🏻

uneven bear
#

Here's a little sample of where I am in the development of my Tkinter-extending library.

uneven bear
#

Made some nice progress on today's stream. New, simpler, system for creating animation cycles and conforming input parameters to the framerate and deltas requested. Now you get back the exact delta of pixels you requested, absolutely, and only the duration of the animation skews to match the nearest frame margin.

Also patched out a bug in a really satisfying way... The fix managed to deprecate two separate calls to a method that performed 5 slow winfo() polls, replacing it with just this:

return True if rx+rh > x >= rx and ry+rh > y >= ry else False

That deprecated function was for gathering local mouse coordinates, and I was able to get the same coords from the event packet instead.

Good day.

#

Which I now see, reading it back here, doesn't really need the if/else. lol
...Well, its a lot easier to code on stream by being verbose and explicit.

uneven bear
#

Guess this is just my channel then. 😉

Today, I refined what we did on stream, implementing Bresenham's formula for linear rasterization. It results in a reliably even distribution of any remainder after finding the root delta -- or base-level rate of change. Looks like this:

        steps = round(delay_ms / self.parent.smooth_rate)   # 9
        base = delta_px // steps    # 23
        excess = delta_px % steps   # 1
        animation = []

        # Bresenham's distributed linear rasterization method.
        error = 0
        for i in range(steps):
            error += excess
            if error >= steps:
                error -= steps
                animation.append(base+1)
            else: animation.append(base)

        return tuple(animation)  # [23, 23, 23, 23, 23, 23, 23, 23, 24]

Then I implemented 'instant scrolling.' Which is just an alternate configuration for a scroll bar, where when you click on the trough, you go directly to the equivalent location in the content.

placid patio
#

Anyone here also learning JavaScript and wants to practice together?

uneven bear
#

As of yesterday, MouseWheel scrolling is online and I'm millimeters from feature-complete scroll handling. This was the big job, too. It's all downhill from here. You simply can't understand how troublesome scrollable areas are until you've had to create them from scratch. This is the second time I've invented this particular wheel. And its certainly been a smoother ride, and has resulted in cleaner code and way better performance -- the second time around.

But its still tricky stuff, made all the more difficult to juggle due to the delay in propagation between Tk and the OS. At any point, you can ask winfo() about an object's geometry and be handed a copy of yesterday's newspaper. Old, unrefreshed data. So you either have to coordinate the timings of everything like an orchestra... avoiding superfluous updates/idletasks like the plague... Or better: just maintain your own internally managed geometry. 😉

#

Wait! Actually this is the 3rd time around!
Once for the first incarnation of this library, and twice for the v2.
There's nothing like doing it over and over to refine the end result, I guess!

candid fern
#
#application window
import tkinter as tk
from tkinter import ttk


#file_system
import os

#data
import mysql.connector

from c import *

class Pet_Registration_aplication:

    def __init__ (self,root):
        self.root = root

        self.root.geometry(main_geometry)



root = tk.Tk()
application = Pet_Registration_aplication(root)

root.mainloop()```
uneven bear
#

Did I say it was more complicated than you think?

#

Cuz it is!

#

This is the last big hurdle to clear. The scrollbars must appear, disappear, and resize auto-magically -- depending on the configuration you've chosen. I'm trying to support forced off, forced on, and automatic... where the bar appears only if the content extends beyond the viewable area.

It's a lot of criss-crossing algebra, mixed in with those nasty timing issues I was talking about before. It's very difficult to keep a single source of geometry-truth functioning in Tk. And unless you have the exact latest size of the scrollPlate versus the exact latest size of the scrollFrame... Well, it gets nasty like this.

#

I'm leaving the cleanup for tomorrow.

austere trout
#

can some of you ui devs tell me what im doing wrong here

#

it looks so bad

uneven bear
forest cloud
#

hello there. Any downsides of pyWebView I should be aware of? Started tinkering with it this morning and I really like it. HTML/CSS plus Python? hard to beat.

daring yew
#

I'm glad you asked because i was literally looking for something like it. I wanted to make a simple data exploring website (such as reading from a source folder of paragraphs, etc) where all the pages are procedurally generated but done on the fly rather than pre-generating them

analog panther
#

Whats it about

fierce cipher
#

It's an automated self money making business machine

analog panther
#

Okplus1 plus1 plus1

uneven bear
#

Realized today that Tk suffers from 'magic numbers' when it comes to its event scheduling system. The .after() method gets aggressively throttled by the OS (presumably) such that scheduling an event to happen 17ms from now frequently happens more like 30ms from now. The system just doesn't wake up when the alarm goes off. It hits snooze.

Some drift like this is fair and to be expected. But the kicker comes when you lock in on one of those 'magic numbers' I mentioned. On Windows, asking for an event 17ms later is pretty much a coin toss. But if, instead, you ask it to wake up 15ms from now -- it's virtually guaranteed.

A change of just 2ms locks into the butter zone between Tk and the OS, and what used to be a stuttering, random, uneven event cycle... becomes buttery smooth and predictable. Wild stuff.

lethal idol
#

!rule 6 | We don't allow self-promotion
Your message has been removed

proven basinBOT
#

6. Do not post unapproved advertising.

uneven bear
#

I don't know what that was about, but I think I'm done with this server. Someting like 30,000 connected, and its dead as a cemetery in here. Moderation is... let's say, aggressive, about a set of policies that are... let's say, corporate, in nature.

And where I came seeking like-minded people who had an interest in Python UI, and could appreciate - and might be interested in - the moves I'm putting on Tkinter -- I've found no such individuals here. The few responses I received have been recommendations to just NOT engage with Python's own built-in GUI system.

So, to my mind, this server achieves nothing of merit. The tone policing and censorship is cranked up to eleven, such that no one seems to feel free speaking about anything, really. And the 30.000 or so in attendance have no particular appreciation for, or interest in, the language itself.

Seems like a nice place for kids to get someone else to do their homework, when AI can't do it for them. Beyond that... I don't get it. So bye.

forest cloud
#

I'm having serious issues getting pywebview to build under linux (at least when WSL-ing).

forest cloud
#

omfg, I got it to work. Only had to install the entirety of kde-plasma in my wsl debian

stiff mist
#

how does this look?

pycharm or vs code was too heavy. using 2-5gb ram for it alone.

so I made a python emulator for myself. which only has features which I need.
No extra features to cause any lag or overcrowd it with too many features

its fully working and perfect. and i can run any code on it.

#

the good thing is that. this runs on less than 50mb ram

#

and very smooth. with few AI features also

#

i faced a problem. when i was coding. I usually changed scripts or edited. it which resulted in me losing the code. or having a script with errors. which are hard to solve

so this emulator. saves your script every 5 minutes. in a folder for the scripts in which you are working. and saves it every time you run the code.

coral swan
#

Besides the white line running horizontally above the tabs, it looks like something I would present students with to learn how to code in their first semester. Personally not a fan of tabs in my editors, but that's preference.

stiff mist
stiff mist
#

in which i can add as many script, image, video files. or any other file if it is needed in my program.

#

and it sometimes even bypass the antivirus software also.

daring coral
stiff mist
#

I made a new UI design. which is better than previous version
just scripting the functions now. like terminal. find, replace and the extra things i have added.
terminal would be hard to add though. watching yt tutorials for it.

and adding 20-30 basic commands like zoom in and out. ctrl +
added 5-6 commands for now. I am still adding more into the program
by morning. i think i would probably add half of these changes.

daring coral
#

I like it more this way. And awesome new features! I would only recommend adding image icons, even placeholder ones, rather than emoticons for the buttons 😄

stiff mist
#

my new program only uses 50-60mb ram

daring coral
#

that is much better. I do wonder how it will handle larger files! have you tried opening a LONG text file of any kind?

stiff mist
daring coral
#

does it maintain any syntax highlighting yet?

#

sorry -- looked above, answered already!

#

that's really cool, nice work though

stiff mist
#

yup.
it shows all syntax erros with red swigly line.
so it saves a lot of time.
to run the program and tons of syntax error messages.

it also has auto suggest feature to tell from python library(it was easy to add)

stiff mist
daring coral
#

very nice!

stiff mist
#

any suggestions of features to add in this program?

daring coral
#

i personally like plugins a lot, so maybe a way to extend the program itself with a custom API

stiff mist
#

the best feature about this program is. which is not in any python editor is version history
to create a duplicate copy of your program every 5 min. and every time you run the program
so if you mess up your script you can just use the version history one.

got idea for this from roblox studio. when i was building my own roblox game. funny enough which is also completed

daring coral
#

that would be awesome if you made it! but definitely challenging

stiff mist
#

too challenging I would say.
i dont think. i can even create in a month

stiff mist
daring coral
#

python, HTML/CSS + JS, a bit of HOI4 Script and I dabble in GML

stiff mist
#

i just do python and lua

daring coral
#

both solid

stiff mist
#

just like creating apps. with python
and like creating game with lua. in roblox

stiff mist
# daring coral both solid

i created a library mangement system. which is the most complex script i have ever done
its version 1 took 1.5 months of thinking and scripting for 2-5 hours daily

and its version 2 took like a week

it got good modern GUI
got system for admins and users(students, and others)
got datbaase
create database for everything
create a new book id for every book added. creates a qr code for every book
got very very advance sign in and sign out system
use matplolib to create graphs for the data

best features
can use excel. can transfer/export all the books, users, issue, return, history, all graphs etc data into excel
and can import these also. so you can import data of thousands of books or users data from excel into the system at once
and more features. which i cant even tell

cobalt sky
#

Should I use pyqt or pyside nowadays?

winged moth
stiff mist
cobalt sky
stiff mist
#

I myself use pyside6 and pyqt5

cobalt sky
#

small for now :d

#

also I'm gonna use small projects to learn it if I need it

stark wren
stiff mist
#

thats why, I made my own python emulator like pycharm and Vscode but my emulator only has the features which I need

stark wren
#

I got it sorted in another channel, but noted.

stiff mist
#

How does the UI look?

#

everything is resizable

viscid gorge
stiff mist
rugged tinsel
#

but i wan't to download it and make a video on it

stiff mist
#

I made a app to convert pythons files to exe. I will convert all the scripts into a exe file. And send it to you

#

I got more better and advance GUI apps other than this. I can show those to you also

stiff mist
boreal pier
stiff mist
# boreal pier Looks interesting, maybe some more syntax highlighting?

Yuh.
I am trying to add a feature. where there will be a "Fix" Button. when you press it. it will recheck all your scripts which you have selected. search them. find syntax errors and all logical issues. like mismatch code, wrong variables, connection if wrong. spelling mistake. or anything like that. it would understand the code. and it will fix the code in just a few seconds.

#

25 percent of it is already completed

#

my code can detect all syntax errors and logical issues. and tell what is wrong with it

#

but the rest of the super hard part is left though. which rewrite and fixes the code.

#

works.
atleast it detects it.

stiff mist
neat fog
#

How to make widgets look 3d (like a Qwidget)

#

something similair to this:

tiny forum
#

what's my best bet for Gui that needs extensive customization? e.g. animation and stuff? I wanted to try Kivy but it semed too complicated for my liking

dawn briar
boreal pier
#

Can confirm DPG is pretty awesome

#

Once you get the hang of it you can do just about whatever you need to do

still marsh
#

Can anyone tell me where i can learn tkinter

mighty rock
rugged pike
#

I wrote a simple python package completely from scratch because I was bored once, it included various things like its own argument parser, an error logger, and various silly ways to interact and input options into programs, it took me a while to create, a couple months.

My phone automatically deleted all the files for it in like 2 minutes. Moral of the story: always keep backups kids

#

oh wait

#

wrong channel btw

#

sorry

mighty rock
#

Moral of the story: use GitHub/GitLab

stiff mist
rugged pike
#

Brother assumed I had a pc

#

New idea transferring files from phone to pc in the stupidest useless and ultimately inefficient way possible

#

I will see you guys after I make this

#

Im bored and useless so dont tell me that tgis already exists because I dont care

stiff mist
#

that is awful scripting on phone

summer knoll
#

I think I figured it out with the schematic at top

abstract vapor
#

Anyone know any good sites or tutorials for learning tkinter? I need to learn it for GCSE and want to get ahead lol

dawn notch
#

Check this out !!!

stiff mist
forest cloud
#

Respectfully, mr/ms Gigachad, you are not answering the question.

Unfortunately I don't have any tutorials either, but my persistent advice to these question is that you'll learn more from thinking up an app and trying to build it than from following tutorials.

abstract vapor
forest cloud
#

We're here to help with any questions if you get stuck.

abstract vapor
abstract vapor
#

Does anyone know how to change the visibility of a window? (Using tkinter)

pseudo sorrel
pseudo sorrel
# abstract vapor Does anyone know how to change the visibility of a window? (Using tkinter)
#

Looks like these functions in particular might be what u want:
withdraw() (Hide the window)
deiconify() (Show the window)

abstract vapor
#

Thanks!

steady jacinth
#

in my python learning route, i wanted to make my own task manager that looks like a CRT styled gui, ignoring all that, i hope this is the right channel for this but i cant seem to get cpu temp to work (this works fine in linux) but in windows however very tricky.
if someone can point me to a python module THAT doesn't involve having the program run in admin privileges, or have a big brain method to access the multiple sub depths of wmi to get a temp average that live updates would be nice. currently mainly using psutil to grab all this info you see MumeiMembersNightmare

rugged tinsel
#

@stiff mist

#

can u show us the updates

stray cliff
#

looks cool

vast kestrel
gentle robin
#

xD

#

love it

steady jacinth
solemn nimbus
#

Hi I need help

pine arrow
#

was looking for some ideas on PDF books on Tkinter GUI layout

quick depot
#

hi 🙂 im new to python and just wanted to find a community to chill with as i continue to learn

onyx ether
quick depot
#

thanks! i guess i can start with a question

#

im using a basic UI refresh rate in an attempt to keep QtWidgets "updated" but im starting to think there is a better way

#

google says "Instead of constant, manual updates, there are several more efficient and scalable ways to stream data to a Python widget. These methods avoid freezing the application's user interface (UI) by separating data processing from UI updates and only sending new information when needed. "

#

im exploring ideas on my own but would love some feedback from you guys. thanks in advance!

vast kestrel
royal gull
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.

royal gull
quick depot
#

awesome thanks for the tip

wanton locust
#

is kivymd a good lib to build gui's with?

#

for ios and android.

dawn briar
#

ive seen a lotta people do with bulldozer and stuff and fail but you can still try tho

#

personally i would just use some sdk like flutter if i were to make apps for phones

wanton locust
#

oh ok thank you, i just chose kivy because the language was fairly easy

dawn briar
#

also for ios you gotta pay for some dev license to actually install and test your app on it (or something of that sort)

#

im pretty sure flutter has some virtual testing enviornment for ios and andriod where you can test it on your pc itself

wanton locust
#

flutter it is then, thank you ill do some research

dawn briar
#

👍🏿

#

you can still do kivy and make gui apps for pcs, i think it's pretty decent for that

edgy quiver
#

all the progress

wanton locust
#

wouldnt i need to use flet in order to use flutter, if i want to do the logic in python.

agile grove
#

Hello anyone here who are from India

stark saddle
#

Yes bro @agile grove

#

Good for you that you didn't encounter anyone of your own country @verbal needle here

sleek hollow
#

!ban 1275723291687911506 racism

proven basinBOT
#

:incoming_envelope: :ok_hand: applied ban to @verbal needle permanently.

candid fern
#

Does anyone know how to make an expanding window?

candid fern
#
['0x0', '1x1', '2x2', '3x3', '4x4', '5x5', '6x6', '7x7', '8x8', '9x9', '10x10','11x11']#there a lot more

Window = tkinter.Tk()
Window.config(background="black")

def bootup_animation():
    global index

    Width, Height = map(int, size_change[index].split("x"))

    Window.geometry(f"{Width}x{Height}")

    index += 1

    if index < len(size_change):
        Window.after(delay, bootup_animation)


def activation_anamation():
    global index

    Width, Height = map(int, size_change[index].split("x"))

    Window.geometry(f"{Width + 500}x{Height + 3}")

    index += 1

    if index < len(size_change):
        Window.after(delay, activation_anamation)



bootup_animation()

password = int(input("password:"))

if password == "1234":
    activation_anamation()

Window.mainloop()
onyx ether
# digital rose wrong

wdym wrong? If there is some error with someone's code, perhaps tell them where the error is?!

candid fern
#

Fixed it.

vast tinsel
#

WIP bluesky client and the ui design app i made to develop it

flat sorrel
#

hi, does anyone know how to debug a wayland ui library in python?

#

well, events and stuff like that, i'm maybe saying input automation

stiff mist
#

How it looks?

stiff mist
wooden vapor
#

Hi there.

Which toolkits have a WYSIWYG editor, like Qt Creator Studio?

manic widget
#

Has anyone made a discord UI?

wooden vapor
#

Doing so is in violation of the TOS of Discord, by the way.

manic widget
#

No it uses discord.py library. It uses discord buttons so I dont think it would be a problem. Is that an issue?

#

Its not changing discord.

#

It uses a nav bar and 5 buttons

manic widget
wooden vapor
#

I have too less knowledge about that, so maybe wait for somebody else.

#

You do know about Vencord?

#

It has a modding API, but I feel like thats eventually just in Typescript.

manic widget
#

Ahh. No i dont

vital elm
#

It does break the discord ToS though.

manic widget
#

Its modeled after a fallout Pip Boy

vital elm
#

That look extremely fancy and thus I am ridiculously invested as of now

#

Id that an image?

#

I swear if you say it's text I'm going to lose it like whaat

manic widget
#

Yeah. My bot sends 60 frame GIFs for each page. Because its a gif it counts as 1 message

#

So its an animated terminal interface

#

And it sends every 1.1 seconds in batches so it respects rate limits

vital elm
#

Would editing the image work better though?

manic widget
#

The image is animated

#

Its 60 frames

vital elm
#

How many FPS are you looking for

manic widget
#

I do 12 fps but neon has a biological phosphor effect and makes your eye interpolate

#

So it looks like 24 to 30

#

I run this off my phone

#

I figured out how to host a server in termux

#

Swear

#

5 day run is my record without crash

#

If I was on a computer id up the fps

vital elm
#

I made a bot that streams my screen at a steady 1fps by simply editing the image (taking a new image and replacing the old one), this is limited by a sleep function so I don't know it's full potential but I think you could make something rather fast with it

#

The only concer would be your internet

manic widget
vital elm
#

Oh that's fine then

#

Can I ask

#

What are you using to generate the image? (Neo colors and such)

manic widget
vital elm
#

I'll check it out :)

manic widget
stiff mist
#

How is the GUI?
I made this app.

manic widget
#

I dont like the title. A little robotic. Everything else is nice

stiff mist
#

ok
the main thing is the app really. which works perfectly
i can talk to mutliple ai models at once and compare them

manic widget
#

I think it looks nice. I would try it based on that UI

stiff mist
manic widget
#

Do you get to pick the colors? Or do you pick the colors?

stiff mist
#

No actually, there is just dark themw for now, but will add setting for light and dark mode , and advanced setting to change anything, Id you want to change font size, button color style border color anything, so it is customisable and those people who don't like my app for its look will start using my app.

stiff mist
stiff mist
manic widget
stiff mist
manic widget
tall iris
#

hello

manic widget
stiff mist
stiff mist
manic widget
#

Its just a thought about consistency. I think you did a good job 👌

quick swallow
#

What do you guys think about NiceGUI

tall iris
#

so what are you guys talking about

stiff mist
tall iris
#
from tkinter import *

window = Tk()

window.mainloop()```
#

this creates a simple tkinter window

#

and

#

@stiff mist do you use tkinter or a more anvanced version of tkinter

stiff mist
stiff mist
#

with pyslide6 you can make any modern app, like gui

#

at the end its your choice learn tkiner or pyslide6

little wedge
obtuse elbow
#

Wallet app UI 🤏🏼

stiff mist
dire barn
#

!kick 436442558806228994 You've been told before not to share your survey here

proven basinBOT
#

:incoming_envelope: :ok_hand: applied kick to @strong parcel permanently.

stiff mist
#

How is the GUI?
finally after 30+ hours of scripting
made scroll bar work for html/css tables in python
which gives 0 lag.

#

For anyone who will say it all feels cramped, and hard to read
then there is expand view

#

How it looks?
I am thinking of adding light and dark mode,
currently just dark mode

normal root
tight ice
#

I have that problem with viewers all the time

normal root
stiff mist
#

Anyone can make it.

stiff mist
#

Or chunk based loading, for optimization. And features to edit the data

normal root
stiff mist
stiff mist
stiff mist
# normal root Have you made one and I don't know it?

I made a library management system with database, where you can store students or user data, add books remove them edit them.
add pdf, documents, images, pages, (auto generated qr code), to the database

it has feature of excel import and export data, so suppose you are in a school
then you can export all you students data directly to my program,

and if you have a data of what books you have in library in excel
then you can import it directly also

#

it is full of datbase,

normal root
#

Well it seems like a nice application but I don't think is like my own, for example have you tested it with huge datasets?
From the screenshots I see maybe 20 rows how about half a million?
If its capable then share it so other people can use it and I keep closed source mine or abandon it

stiff mist
#

his program uses a database to store information.

If you don't want to read all.
Summary- it can handle tens of thousands of tables, thousands of panels, tens of thousands of code blocks, messages, etc.
can work with hundreds of millions to billions of characters.
I tested it with about 2million lines of messages, it got aroudn 100k+fps

when i give a prompt, it get send to all the panels, and stored in database
then
ai gives response in words,
then i store the response and convert it to html, and add coloring, style etc
and then raw text to database, and store html inside cache
if it gives me a script to write, i put it inside a code blocks,  you can see in the able like that html code block, they also get stored in the database
if i need ai gives response, it somtimes convert it to tables, html tables.
ai gives response in raw data, english, it get converted to table
the text is stored into database, and the table is stored in the cache for faster loading
the optimization that i added, added a horizontal scroll bar to the table and code block, so text don't go out of frame, with html/css/javascript/python
it only loads what you are seeing, so my app will not load panels which you are not seeing
this is same for each panel also, it only loads what is on your screen
so my overall optimization is so good
it can handle thousands of panels at once, if  a person want he can add 1-1K+ panels at once
and in each panel, thousands of frames, thousands of code blocks, millions of text/html/css/python/normal, thousands of scroll bar and buttons
thousands of table
for each panel
i tested my app, it was able to open 1billion characters
and opened the app instantly
all the optimiszations added in a way, that to load this much data and things nomrally would require 10gb+ ram
my app does that in less than 150mb, or max 200mb or even less
i tested it with a test script it got 123000 fps

stiff mist
lunar urchin
#

Just thought I'd share, if you have any feedback I'd love to hear it :D

patent basin
#

Does anyone know of a better GUI module than tkinter? Especially for making the interface responsive and adaptative

normal root
#

ttkbootstrap seems to do the job and looks just enough

#

Have you checked my DataGridView

obtuse elbow
#

Framer website WIP. Fully responsive and optimized for all break points. Desktop, Tablet and Phone

stiff mist
#

you created a different gui for each device?
Or you just created one GUI and the app adjusted it for other

#

it is a website or a app?

obtuse elbow
#

Website not app

hollow lake
#

What packages do you guys use usually?

patent cave
#

Been looking at adding a simple web frontend for a pretty complex iOS application I have. The backend is in FastAPI. I despise everything to do with JS and have been looking for a solution that would allow me to not touch JS. I heard about NiceGUI (https://nicegui.io/) on a podcast and it looks pretty nice. Does anyone have any comments about that? I don't need loads of animations or complicated visuals, it's mostly a CRUD thing related to managing some hobby supplies.

I only need a desktop web thing, the mobile needs are handled by by SwiftUI app.

cursive bay
patent cave
#

@cursive bay Is Flet better or does it just allow me to target more OS:es? I already have an old iOS app that's fine and Android isn't really interesting (no money to be had there).

patent cave
#

Ok. Anything in particular? I have not yet started my web version so I can still switch.

cursive bay
# patent cave Ok. Anything in particular? I have not yet started my web version so I can still...

you can check here for the docs:
flet.dev
And here for a few tutorials you may get any use case:
https://youtube.com/@oxygenlabs-rj12?si=Bs974BujKDswVMF3

patent cave
#

I've seen the docs and the first tutorial parts. I was mostly curious as to why you consider it to be better.

neat fog
azure trout
#

hi all , im having an issue where my ui is not displaying the text input fields in 2 tabs but it wors in the others, the code seems fine but im not sure where to fix

#

issue in question

cursive bay
candid fern
#
#==={import}===#
import tkinter as tk
from tkinter import ttk
from tkinter import messagebox

import random

import time
import datetime

from engien import *

import mysql.connector
#==============#

class Pet_registration:
    def __init__(self,root):
        
        self.root = root
        self.root.geometry(size)

        pet_registration_title = tk.Label(root,
                               text= Title_text,
                               font= Title_font,
                               relief= "ridge",
                               foreground= "#d43707",
                               border=25).pack(side= "top",fill= "x")
        #===================
        Data_frame = tk.Frame(self.root,
                              border=20,
                              relief="ridge").place(x= 0,
                                                    y= 130,
                                                    width= 1530,
                                                    height= 400)
        
        Data_frame_left = tk.LabelFrame(Data_frame,
                                        border=10,
                                        relief="ridge",padx= 10,
                                        font= Pet_registration,
                                        text=frame_text).place(x= 0,
                                                               y= 5,
                                                               width= 980,
                                                               height= 350)
        

        
        

root = tk.Tk()
oj = Pet_registration(root)
root.mainloop()
#

how do i fix this error?

candid fern
shadow mist
#

I.....

#

<@&831776746206265384> well it fits the channel at least but seems to also fit #cybersecurity :^)

#

!rule 2 and that one

proven basinBOT
lethal idol
#

!rule 5
Testing purposes or not, we don't allow discussing programs that are malicious or inappropriate.
Your message has been deleted.

proven basinBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

cursive bay
stiff mist
#

How does the GUI look now?

any suggestions to imporve this GUI?
like font, design, layout or any other change which i should add in this app?

later gonna add light theme also, so other than that any change needed?

mighty rock
#

For user experience, add the ability to hover over around the sides of the chat list and press to scroll intuitively.

stiff mist
# mighty rock For user experience, add the ability to hover over around the sides of the chat ...

there are already all hover features

when you hover over user message/prompt it shows, tokens, copy and time(both date and time if you hover over time). you can see it in the image also

it shows 3 dots in each chat, which you can click. With which you can rename, delete and export chat in 5 different formats.

every single button has hover feature, shows or change color or something.

@mighty rock any other suggestion for improving the GUI other than hover features?

mighty rock
#

A UI guide would be nice. It feels like I need to study this UI in order to use it because many buttons are on the screen at once. For aesthetics, you could add a backlight effect for the list on the left

stiff mist
#

any change i should do on code block design or scroll bar?

zinc kayak
#

Tkinter - widgets on a card getting clipped

Problem:
The bottom buttons are getting clipped, as seen in the picture.
What am I doing wrong?
If height of the card is 225 or 300, it works fine, if 250, they're clipping.

Idea:
All widgets on a card except DETAILS have static size.
DETAILS can either be empty, have a little text or a lot of text.
If there is a lot of text, I want to limit how much of it is shown so the card/frame containing all those widgets can have static height.
That is why I calculate remaining_height, to see how many pixels are left.
I then get the linespace of the font I am using for the DETAILS.
Lastly, I set DETAILS' height = remaining_height // linespace.

Code:
https://paste.pythondiscord.com/HV4A
No more code is related to these.

I am also open for better ideas / approaches.

Thanks in advance.

zinc kayak
#

Solution found:
Add the big text last (specifically after the buttons) and let it fill="both".

stiff blade
#

i found an advanced math solver app for mathematics as open-source. Also it s developed by full of Python and its libraries.
https://github.com/mathpathconsole/mathpath
on google play store:
https://play.google.com/store/apps/details?id=org.mathconsole_lite.mathconsole_lite&gl=TR&pli=1

GitHub

Mathpath: Math solver. Contribute to mathpathconsole/mathpath development by creating an account on GitHub.

MathPath is a pure and advanced mathematical solver and console.

patent basin
#

I'm trying to create an app in python (with maybe the idea for monetization down the way, not sure yet), and I was wondering what python module would be best for the user interface.

I've used TkInter and it's a nightmare, then I switched to Qt (Pyside6), which is less of a nightmare, but still there are too many things I don't really understand and the documentation for it is a bit weird.

I'm also considering using Django or other web inteface, but I'm not sure if it's gonna be more or less work down the line.

tall anvil
#

im trying to create an weather app with tkinter but i dont know were to start and wich api to use and be free can someone guide me through?

patent basin
#

Seems interesting, but I'm starting to enter the sunken cost fallacy... I've been at this for a lot of time, and now it annoys me to start anew 🤦

neat fog
#

How do i keep calendar events from being created on my calendar on top/under a widget? if the user clicks on a line over which there is already one of the user's events? code:

proven basinBOT
neat fog
#

Fixed it nvm

dawn notch
#

@patent basin use web mode under anvpy

patent basin
dawn notch
#

dm me

humble pike
#

Hi everyone I want to know a better package than tkinter for GUI

wet crater
#

Im new to python an im trying to learn how to use GTK 4 but im struggling with internet searches and docs

supple veldt
strange quartz
thorn rune
#

anyone want to help me finish this VS Code theme. in the end it will be clean AF.

#

Im trying to get it to look like (i have a background png simliar to theirs):

stiff mist
#

which design looks better?
trying to pick a good design for my app setting.

or any other suggestions?

stiff mist
#

it was a new design, but it looked the best from all others

eager laurel
stiff mist
#

its just pure python

eager laurel
#

Looks clean. I've been working with Flet for a few years, so was thinking this was one of the other frameworks out there?

forest briar
#

Visite it it demo of multi phone control that help to put our peer device id and control it over net and it responsive ui pleas view if good support

#

This app work like automiton to increas and work with multiple device at same time

hoary grove
#

Hello, I have a crazy business/project idea that will be including a website, but I am unsure how to start off by picturing or drawing the look of the UI to get a feel of how I'd want it to look like. Besides, I also have a few questions about UI/UX of Web Designing.

  1. What makes a user stay within the website for longer related to the UI/UX?
  2. How do you know that you are not over doing with the UI/UX?
  3. How would you know what color pallet fits best for your project?
  4. What are some "wow" factors that could be implemented into a UI/UX of a website?
sleek hollow
candid fern
#

If my program has a def that requires materials as soon as a button is hit do I pass that through the command

neat fog
#

In pyside6 id I have a bunch of widgets all called one thing because of creating them using a function, how do I do where you can click on a PREVIOUSLY created one have it do things, I can only figure out where you can like on the most recent one and have it do things

#

Thoughts? Suggestions? All help is appreciated

royal gull
#

<@&831776746206265384>

stiff mist
stiff mist
#

which looks better from these add model

mighty rock
bronze geyser
bronze geyser
stiff mist
stiff mist
bronze geyser
#

idk all seems really cool

stiff mist
neat fog
#

@mighty rock

mighty rock
#

You could do that, and then store the names and their corresponding widget objects in a dictionary, but can't you just use the widget objects themselves rather than involve widget names?

tired storm
#

Hello, I have an object detection model running on a raspberry pi. I want to create some kind of UI/GUI to allow friendly user interaction. I wanted some ideas, what kind of "app" would be suit me here, I want something simple but friendly. I don't really want a web app though, more of a desktop app.

Now, I want to create an app that I can use it on my laptop, connect to the raspberry pi wifi then be able to control the app. Is that possible?

Like assume we are building a desktop app. I have that app on my laptop, I connect my laptop with the raspberry pi using an ethernet cable. Now that app can run the application specifically for this pi.

#

(would really appreciate if someone can recommend me a framework/library to be used pls)

digital rose
#

sorry, what does the raspberry do?

#

is it connected to sensors?

sleek hollow
tired storm
digital rose
#

What does the robot do?

neat fog
tired storm
tired storm
#

Hello, I was just reading about the event loop and why it matters in field like CS. At first, I thought that the event loop was only related to javascript since when I first started learning it, I often came across the term "Event loop in JS". But now I wanted to try some GUIs in python to build desktop app and came across the term event loop in python self.

Did a bit of research and I came across a nice answer in this reddit post:

Event loop in CS

I wanted some other opinions about the event loop if there is something that hasn't been mentioned in this post and if someone can explain this part:

What does the user mean by "magic" here and about the compiler splitting the functions pls.

Reddit

Explore this post and more from the explainlikeimfive community

sleek hollow
mighty rock
# tired storm Hello, I was just reading about the event loop and why it matters in field like ...

Event loops check for events and run things when events are then received.
For asyncio, this means checking for pending tasks to resume and doing just that, though I'd imagine it's more complex than just this for asyncio internally because of things like event loop policies, different executors and contexts and things like handling task cancellation and process signals.
async/await doesn't have anything to do with asyncio in particular. You can see alternative packages like trio or anyio on PyPi with different APIs/implementations. It's just about cooperative multitasking, in other words, you explicitly mark points in your program where you think you're going to be idly waiting (that's done with await) and at that point the async framework is able to tend to other tasks that have been put on hold and need to continue their work.

More relevantly, GUI program event loops check for system and user events related to the application. Once an event is received, it is passed to the application for processing. This is how window events are handled like keyboard events, window resize and drawing events, etc.

In asyncio, event loops are started with things like asyncio.run. In tkinter, event loops are started with things like widget.mainloop

tired storm
#

yep I see, thanks !

neat fog
sleek hollow
neat fog
#

Here is the code for the issue that i was speaking about earlier, (unable to go back and resize a previously created "event" on the calendar, only able to resize the most previously created one).

proven basinBOT
neat fog
#

Btw, as previously encouraged/mentioned, i am watching some videos on Object Oriented Programming in python

cursive bay
#

Navigation and Routing in Flet YouTube tutorial out now ‼️
https://youtu.be/djJ8osH3F2o

In this video you'll learn how to Navigate between pages/Views in Flet Python

Features as usual✨:
🌟Clean Modern UI Frontend
😎Mobile approach
💻very Responsive UI
⚡AND entirely built in Flet with Python

🎯Subscribe for more tutorials and videos on Flet and App development with Python
👍Like, share and comment to support my cha...

▶ Play video
neat fog
#

<@&831776746206265384>

sleek hollow
junior temple
#

in the #networks channel i sent the old code of my server manager client and now i did't make a "new" function but this:

 class lobby:
      def __init__(self, ram, max_ram):
          self.ram = ram
          self.max_ram = max_ram
      def lobbyramentry(name, col, ro):
          name = tk.Entry(new)
          name.lobby_ram_entry.insert(0, f"{name.ram}")
          name.lobby_ram_entry.grid(row=ro, column=col)
      def lobbymaxramentry(name, col, ro):
          name = tk.Entry(new)
          name.lobby_max_ram_entry.insert(0, f"{name.max_ram}")
          name.lobby_max_ram entry.grid(row=ro, column=col)
             
lobby1 = lobby("1G", "2G")
lobby.lobbyramentry(lobby1, 1, 1)

crude fox
vapid mulch
#

I'm building a pyside6 layout for a music ai app project, what am I missing on this wireframe?

#

more contrasty colors and all layers:

stiff mist
vapid mulch
#

wdym

stiff mist
vapid mulch
#

wdym

dire violet
#

has anyone here used pyqt5 and pyqt5 designer?

#

would anyone be able to recommend one for a file processing application?

#

the files would be dataframes

#

and the user would be able to select individual files to perform cleaning operations

#

or select multiple files to perform collations/aggregations

#

im still fleshing the details out

#

but ive never done GUI development on python before and i wanted the easiest way to do it

royal gull
# dire violet has anyone here used pyqt5 and pyqt5 designer?

If you're going to do Qt, I'd recommend using PySide6. It's not too different from PyQt. You have to be cautious when using Qt Designer because it's only intended to generate UI code for you which you later load into your app using Qt or compile using Qt uic. One common mistake I see is people taking the Python file made by uic and just working within the file. That's not how you're supposed to use uic outputs, you are supposed to work on top of that in a separate class.

You can also just not use Designer and simply handwrite the UI yourself, preferably separating the UI logic from the business logic in the same way that Qt Designer intends to do that. To learn PySide6, I like to recommend https://pythonguis.com for a general overview.

dire violet
#

Mmm yeah I sorta had the feeling that designer wouldn’t work for stuff that needed to be generated at runtime

#

I’m trying to hack together a program for my dissertation so it looking professional isn’t the biggest deal

#

It’s more about the features and whether it works

#

I saw ppl saying QT had a higher learning curve

#

So I’m leaning towards tkitner since my functionality isn’t super advance

#

It’s just loading a bunch of csv files and letting users perform data processing operations on them

#

Swapping out values, merging csv togethers, etc

#

Won’t be interacting with a database or anything like that

digital rose
#

i do not think dealing with qt is harder than deaing with tkinter or any other gui library, they are all similar in nature and logic

dire violet
#

So would you recommend just learning qt since it’s better supported and more modern?

royal gull
#

Probably, though do note that it's fairly OOP heavy so yeah. GUI development is a great way of practicing OOP, but if you aren't familiar with it, then it might feel a bit overwhelming at the start.

sleek hollow
#

Inheritance started to click for me when I started learning pyside

remote sky
#

Attempting to push Streamlit beyond the standard Data Science look. 🧪

I’m working on a local RAG engine and wanted a specific anime aesthetic without switching to a frontend framework like React.

I relied heavily on st.markdown with custom CSS injection to override the default padding/fonts and built the **Receipt **component using Playwright (rendering HTML-to-Image in the background).

Question for UI folks: Does the UI style hurt readability here, or does the hierarchy still work?

I’ve been staring at it for weeks so I can't tell if it's Cool or just **Cluttered **anymore. Feedback appreciated!

austere trout
#

ui design done purely in code with pyside6

#

its fine ig

candid fern
#

Has anyone ever made a seed ordering website

tidal socket
#

I need helps boys and girls my UI isn't working. I need something to view images and possible videos and beyond on the main canvas. Im using textual but its just not working for my needs

#

im awful with UI as Ive never played around with it

#

why obviously other bugs to work out . I could use suggestions.

tidal socket
#

Ok, Im gonna go with this

#

thanks guys

wooden vapor
tidal socket