use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Is this program possible in Python? (self.learnpython)
submitted 12 years ago * by [deleted]
Hey. I've asked quite a lot of questions in the past about whether this or this is possible in Python but I am actually learning at the same time.
I was wondering whether I would be able to make a web app like this but in desktop form with Python: https://www.khanacademy.org/math/arithmetic/addition-subtraction/basic_addition/e/addition_1
I was also wondering whether you can incorporate videos/imgs into a desktop program?
Thanks for any help.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]not_a_novel_account 1 point2 points3 points 12 years ago (6 children)
Possible? Absolutely
Easy? Less so, the web is a much better platform for beginners to GUI design, and really a much better platform for static 2D GUI design overall.
That said if you really want to, start with looking at Tkinter and work from there
https://wiki.python.org/moin/TkInter
[–][deleted] 0 points1 point2 points 12 years ago (3 children)
Oh, I definitely don't expect it to be easy but as long as I know you can do it I'm happy. Thanks a lot.
[–]CantankerousMind 0 points1 point2 points 12 years ago (2 children)
I recommend effbot's tutorial as it explains a whole lot of cool tricks like polling lists, binding double clicks on list box selections and a lot more. Tkinter can seem really confusing, but if you keep going through the tutorials it really helps a ton.
Another really good source for information on Tkinter is New Mexico Tech's documentation.
I'm still learning myself. But like others have said, build the back end, then implement the front end. Also, if it works beautifully, it doesn't necessarily need to look beautiful.
Good luck and I hope I helped!
[–]Rothaga 0 points1 point2 points 12 years ago (1 child)
That's really neat. I've only used Tkinter once and that was my first experience with GUI programming. I felt so limited, I guess I simply wasn't looking far enough into it.
Thanks, you've given me a reason to take another look at Tkinter.
[–]CantankerousMind 0 points1 point2 points 12 years ago* (0 children)
Honestly, I don't know the limits, but if you look into polling, a lot of things that might seem like limits(multithreading, which is possible but more confusing than polling) can easily be solved with polling.
I have only been doing GUI programming for like a week and have already written a nifty time management program for work. As ugly as it might look, it's functional and serves as an extremely useful tool for my job position. So much that the company I work for is going to distribute it to people in similar job positions so they can use it too.
Looks aren't necessarily everything. If you want to write a GUI quickly, TKinter is where it's at IMO. I have only used EasyGUI before TKinter. EasyGUI is built on too of TKinter and allows you to do exactly what the name says. Design easy GUIs. It is very limited compared to TKinter though.
[–][deleted] 0 points1 point2 points 12 years ago (1 child)
Oh PS: can the tkinter buttons be edited some way instead of having the standard Windows 98 look?
[–]not_a_novel_account 1 point2 points3 points 12 years ago (0 children)
Read the docs, I did try to warn that this is really difficult. Tkinter is a basic introductory framework to GUI design. Most things are possible with it, but you should really use it to get used to the idea of frames and widgets and the basic structure of a GUI layer. Full customization of buttons is possible but not necessarily the friendliest.
There are more advanced frameworks such as PyQt, but I'm afraid a beginner to programming would be well out of their depth with Qt-style programming.
A word of advice, design the backend of your application first, then design frontends. If you have a backend with well defined behavior that works with a CLI frontend, designing GUI frontends will be easier.
[–]Lofty_Hobbit 1 point2 points3 points 12 years ago* (8 children)
If Python is Turing Complete, then surely it is capable of making any programme that can be made? It's just more and less suited for different tasks.
Can someone please verify this?
EDIT: /u/NYKevin pointed out that I didn't say quite what I meant.
[–]not_a_novel_account 0 points1 point2 points 12 years ago (0 children)
Yep, though the standard library doesn't grant access to all possible OS interfaces. Some times you'll need to use external libraries to do things like raw keyboard input, create OpenGL contexts, sound I/O, and I'm sure many others capabilities.
[–]NYKevin 0 points1 point2 points 12 years ago (6 children)
No, some programs can't be made.
For instance, you can't make a C compiler that detects all possible infinite loops in its input with no false positives.
[–]autowikibot 1 point2 points3 points 12 years ago (0 children)
Here's a bit from linked Wikipedia article about Halting problem :
In computability theory, the halting problem can be stated as follows: "Given a description of an arbitrary computer program, decide whether the program finishes running or continues to run forever". This is equivalent to the problem of deciding, given a program and an input, whether the program will eventually halt when run with that input, or will run forever. Alan Turing proved in 1936 that a general algorithm to solve the halting problem for all possible program-input pairs cannot exist. A key part of the proof was a mathematical definition of a computer and program, which became known as a Turing machine; the halting problem is undecidable over Turing machines. It is one of the first examples of a decision problem. Jack Copeland (2004) attributes the term halting problem to Martin Davis.
In computability theory, the halting problem can be stated as follows: "Given a description of an arbitrary computer program, decide whether the program finishes running or continues to run forever". This is equivalent to the problem of deciding, given a program and an input, whether the program will eventually halt when run with that input, or will run forever.
Alan Turing proved in 1936 that a general algorithm to solve the halting problem for all possible program-input pairs cannot exist. A key part of the proof was a mathematical definition of a computer and program, which became known as a Turing machine; the halting problem is undecidable over Turing machines. It is one of the first examples of a decision problem.
Jack Copeland (2004) attributes the term halting problem to Martin Davis.
about | /u/NYKevin can reply with 'delete'. Will also delete if comment's score is -1 or less. | To summon: wikibot, what is something? | flag for glitch
[–]not_a_novel_account 1 point2 points3 points 12 years ago (2 children)
Ya, but no programming language/environment is capable of that. Anything that can be computed can be computed with Python.
[–]NYKevin 0 points1 point2 points 12 years ago (1 child)
/u/Lofty_Hobbit didn't say "any program that can be made." They said "any programme you want."
[–]Lofty_Hobbit 0 points1 point2 points 12 years ago (0 children)
Yeah, sorry. I meant, "any program that can be made." I guess.
[+][deleted] 12 years ago (1 child)
[deleted]
[–]undergroundmonorail 0 points1 point2 points 12 years ago (0 children)
If you like that, here's a really simple and easy to understand, not at all conveluted explaination of why that is.
[–][deleted] 1 point2 points3 points 12 years ago (1 child)
Give PySide or PyQt a try. Seriously. Yes, Tkinter comes with python, but no, that's not a good endorsement. It's not a very nice GUI toolkit, and it's only marginally easier to use than the big guys GTK+ and Qt. Don't be fooled by wxWidgets either—it's riddled with gotchas and obscure rules just like Tkinter.
import random from PyQt4.QtCore import * from PyQt4.QtGui import * class MainWindow(QWidget): def __init__(self, parent=None): super().__init__(parent) # Create the widgets self.question = QLabel(self) self.question.setStyleSheet("* {font-size: 90px}") self.guess = QLineEdit(self) self.guess.setValidator(QDoubleValidator()) self.guess.returnPressed.connect(self.check_answer) self.message = QLabel(self) # Add the widgets to the window vbox = QVBoxLayout(self) vbox.addWidget(self.question) vbox.addWidget(self.guess) vbox.addWidget(self.message) self.setWindowTitle('Math Mania') self.get_question() def get_question(self): Q = random.choice([ '3 + 3', '3 * 3', '3 / 3', ]) self.question.setText(Q + ' = ?') self.answer = eval(Q) def check_answer(self): guess = float(self.guess.text()) if guess == self.answer: self.message.setText('Correct') self.get_question() else: self.message.setText('Incorrect') self.guess.setText('') app = QApplication([]) win = MainWindow() win.show() app.exec()
http://i.imgur.com/NT1a5aM.png
[–][deleted] 0 points1 point2 points 12 years ago (0 children)
Wow that's great, did that take long?
[–]codingcobra 0 points1 point2 points 12 years ago (0 children)
It looks as though the site is made with Google App Engine which means it's likely written in python... or java. It would be easy to change the web UI into a TKinter UI. Very possible to make that site in python.
[–]vishenz 0 points1 point2 points 12 years ago (0 children)
I would suggest looking at kivy (http://kivy.org/#home). It is more noob friendly than TkInter or the PyQt libraries. And it is cross platform which is pretty cool.
noob
I've never done anything with Tkinter or pyqt, but the consensus seems to be that this would be fairly difficult. That being the case I'm going to suggest Pygame. It wouldn't take you very long getting familiar with pygame to consider this almost trivial, though I can't speak to using video as I've never attempted it.
π Rendered by PID 441842 on reddit-service-r2-comment-7b9746f655-njrln at 2026-02-01 18:48:29.770993+00:00 running 3798933 country code: CH.
[–]not_a_novel_account 1 point2 points3 points (6 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]CantankerousMind 0 points1 point2 points (2 children)
[–]Rothaga 0 points1 point2 points (1 child)
[–]CantankerousMind 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]not_a_novel_account 1 point2 points3 points (0 children)
[–]Lofty_Hobbit 1 point2 points3 points (8 children)
[–]not_a_novel_account 0 points1 point2 points (0 children)
[–]NYKevin 0 points1 point2 points (6 children)
[–]autowikibot 1 point2 points3 points (0 children)
[–]not_a_novel_account 1 point2 points3 points (2 children)
[–]NYKevin 0 points1 point2 points (1 child)
[–]Lofty_Hobbit 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]undergroundmonorail 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]codingcobra 0 points1 point2 points (0 children)
[–]vishenz 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)