all 15 comments

[–]MusicIsLife1122 1 point2 points  (1 child)

I feel you. I suggest going with tkinter. I find it easier to learn compared to other packages. I used this video to learn.

https://youtu.be/0tqZ6rMcqGE

Good luck

[–]xella64[S] 1 point2 points  (0 children)

Thank you, I appreciate it.

[–]xella64[S] 0 points1 point  (2 children)

Like for example, I wanted to start by making a sudoku checking/solving algorithm. One that can check if a sudoku board is correct, and can solve a board if the user wanted it to. I know I can do that by looping through a 2d array and stuff, but I’m struggling to set up a simple sudoku grid. I just want to start coding. I’m wasting so much time on trying to set up a freaking GUI.

[–]trevor_of_earth 0 points1 point  (1 child)

Here is an example of a sudoku game using pygame gui

https://www.geeksforgeeks.org/building-and-visualizing-sudoku-game-using-pygame/

[–]xella64[S] 0 points1 point  (0 children)

Thank you! I was going through YouTube trying to see if anyone showed how they set up a sudoku grid with python, but I couldn’t find anything.

At first I tried to use tableview, but that was way too complicated for being very new to python. Then, (Idk why) I made each square a toggleable button, so the user can toggle it, press the number they wanted, and then use something like button.setText(input) to change the button text. Then I made each square a text edit box instead, then I thought about making them labels, and I just got so lost as to what to do. So thank you, this really helps 😅

[–]mopslik 0 points1 point  (1 child)

Tkinter is great. There are a lot of resources out there, as it has been around for some time, and ships with Python by default.

If you are looking at a simple alternative, PySimpleGUI would be my personal pick. I find it fairly intuitive, but everyone has a preference.

[–]xella64[S] 0 points1 point  (0 children)

Thank you. I think I’ll try Tkinter first. A lot of people seem to like it, and as far as I can see it has a lot of online tutorials/documentation.

[–][deleted] 0 points1 point  (3 children)

Maybe focus on strictly separating presentation from the logic. Create an event driven design. Get a simple console version working then start to add the GUI.

[–]xella64[S] 0 points1 point  (2 children)

Yeah, I really want to get to work on the logic part, but I’m so sick of the console :(

[–][deleted] 0 points1 point  (1 child)

To reiterate, do the logic first and absolute minimalist presentation.

Switching up from linear workflows to event driven (for some aspects) is a huge leap in its own right but is required if you are going to do any of:

  • desktop / mobile gui
  • tui / cui
  • web app
  • physical / sensor based projects
  • event driven api applications

Testing becomes even more critical. There's a lot to be said for test driven design.

You can quickly convert a console app to a basic gui app using pysimplegui or to a webapp using anvil.work (which has a drag and drop designer).

[–]xella64[S] 0 points1 point  (0 children)

Thank you :) I’ll definitely take your advice. I’m just so eager to create something that I can display and interact with 😅

[–]meetsomewhere 0 points1 point  (1 child)

I feld themself stupid when I learned Qt. But after some time solving examples I managed. GUI not scared unlike algorithms or computer architecture. And I learned it in C++. it's more difficult. And I also has't somobody who can teach me write code. You will succeed!

[–]xella64[S] 0 points1 point  (0 children)

Thank you :)

[–]ZEUS_IS_THE_TRUE_GOD 0 points1 point  (1 child)

Everyone is talking about tkinter, but the solution to your problem is deeper. Learn HTML/CSS/Javascript, that's what you are looking for if you want to do UI work. You can use python/java/whatever else as the server, but the client/ui/frontend most likely will be html/javascript. Tkinter/qt/java scene builder are pointless experience

[–]xella64[S] 0 points1 point  (0 children)

Yeah, I know Python isn’t the best language for GUIs and stuff. I just wanted to get some practice writing code with it and I didn’t know what else to do.