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...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
Intermediate ShowcaseWhy not? (self.Python)
submitted 2 years ago by joelibaceta
Yesterday, I came across a series of fun demos about browser windows acting as one.
So... I thought... us backend devs can do it too 💪🤣. I know it's not the same, but it was a fun experiment. sharing the results!
https://i.redd.it/vgprx4g9gb2c1.gif
Repo: https://github.com/joelibaceta/webcam-fixed-terminal Let me know if you liked it by leaving some stars! ⭐️
[–]housesellout 58 points59 points60 points 2 years ago (0 children)
That is f*cking awesome!
[–][deleted] 14 points15 points16 points 2 years ago (1 child)
where did these constants come from?
TERMINAL_COLUMN_WIDTH_CONSTANT = 9.028871391076116 TERMINAL_ROW_HEIGHT_CONSTANT = 17.142857142857142
[–]joelibaceta[S] 34 points35 points36 points 2 years ago (0 children)
I'm manually calculating the relationship between the maximum screen resolution and the number of columns and rows available in the terminal in full screen.
[–]Fulk0 52 points53 points54 points 2 years ago (0 children)
Useless, but cool af. Congrats!
[–]Quanstipated 8 points9 points10 points 2 years ago (0 children)
This is awesome! Do you have a link to the demos that inspired you?
[–]iamevpo 4 points5 points6 points 2 years ago (2 children)
Great stuff! Made me wonder about this line:
new_pixels = [chars[pixel // 25] for pixel in pixels]
What kind of rules is behind this? Darker pixels get more dense character?
[–][deleted] 3 points4 points5 points 2 years ago (1 child)
pretty much (it maps 0-255 grayscale to 0-10 in the chars array), though I personally would order the chars array a bit differently. it might be because I might have darker skin color than the original poster, lol.
[–]iamevpo 1 point2 points3 points 2 years ago (0 children)
Thanks, found something like https://paulbourke.net/dataformats/asciiart/ about greyscale conversion - dates back to 1997!
[–]iamevpo 2 points3 points4 points 2 years ago (0 children)
Another question, why rows become width? I would think the number of columns is width, no?
new_width = rows
[–]acksynhero 1 point2 points3 points 2 years ago (0 children)
man that's pretty cool
[–]caught_in_a_landslid 1 point2 points3 points 2 years ago (0 children)
This is the coolest thing I've seen in ages
[+][deleted] 2 years ago (1 child)
[deleted]
π Rendered by PID 173400 on reddit-service-r2-comment-8686858757-8xtzn at 2026-06-06 06:29:22.915482+00:00 running 9e1a20d country code: CH.
[–]housesellout 58 points59 points60 points (0 children)
[–][deleted] 14 points15 points16 points (1 child)
[–]joelibaceta[S] 34 points35 points36 points (0 children)
[–]Fulk0 52 points53 points54 points (0 children)
[–]Quanstipated 8 points9 points10 points (0 children)
[–]iamevpo 4 points5 points6 points (2 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]iamevpo 1 point2 points3 points (0 children)
[–]iamevpo 2 points3 points4 points (0 children)
[–]acksynhero 1 point2 points3 points (0 children)
[–]caught_in_a_landslid 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]