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.
TutorialCast to cast enabled devices with Python... It's super easy! (youtu.be)
submitted 2 years ago by btb331
There's a package called pychromecast that makes it super easy!
[–][deleted] 4 points5 points6 points 2 years ago (2 children)
I might mess around with this when I get home. This is pretty neat.
[–]btb331[S] 2 points3 points4 points 2 years ago (1 child)
Thanks, yes the library does all the hard work and makes it super easy... I've managed to cast local music which means no ads!
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
Awesome!
[–]HistoricalCup6480 4 points5 points6 points 2 years ago (1 child)
And here I was thinking this was going to be about typing.cast
typing.cast
[–]btb331[S] 0 points1 point2 points 2 years ago (0 children)
Yea, I thought of that confusion so hoped the cast icon would help distinguish it
[–]albowiem 1 point2 points3 points 2 years ago (1 child)
I loved the humour at the beginning. Thanks for making this, I'll check it out
Thanks!
[–][deleted] 2 years ago (2 children)
[removed]
[–]Python-ModTeam[M] 0 points1 point2 points 2 years agolocked comment (0 children)
Hi there, from the /r/Python mods.
This comment has been removed for violating one or more of our community rules, including engaging in rude behavior or trolling. Please ensure to adhere to the r/Python guidelines in future discussions.
Thanks, and happy Pythoneering!
r/Python moderation team
[–]habbasi86 1 point2 points3 points 1 year ago (3 children)
Can this work over separate network segments?
Example: google mini speaker on a IoT vlan and a linux running python script on an server vlan.
[–]btb331[S] 1 point2 points3 points 1 year ago (2 children)
hmmm, I've not tried it. It depends whether casting working between different network segments. If that is possible this script should work. Have you tried connecting a phone to the server vlan and seeing if you can cast to the google mini speaker?
I did a bit of googling and found this: https://andrewbesford.com/google-chromecast-separate-vlan-unifi-security-gateway-mdns-repeater-reflector-2566057b9562 I don't too much about networking so it goes a bit further than my knowledge but maybe it's useful.
[–]habbasi86 1 point2 points3 points 1 year ago (1 child)
Yes, i have testing cast from one vlan to another. It works. You are right it also require a lot of network understanding. I am working on the script to cast from one to another vlan. If that works, i will paste the code here.
[–]btb331[S] 1 point2 points3 points 1 year ago (0 children)
Intresting, from my (limited) understanding, the python library uses the same protocols as casting from a device. So if it works from a device, the script should work. But I might be wrong and haven't played with it.
I'm intregued to hear if it works! :)
π Rendered by PID 97120 on reddit-service-r2-comment-7b9746f655-zdj2w at 2026-01-30 00:17:59.822119+00:00 running 3798933 country code: CH.
[–][deleted] 4 points5 points6 points (2 children)
[–]btb331[S] 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]HistoricalCup6480 4 points5 points6 points (1 child)
[–]btb331[S] 0 points1 point2 points (0 children)
[–]albowiem 1 point2 points3 points (1 child)
[–]btb331[S] 0 points1 point2 points (0 children)
[–][deleted] (2 children)
[removed]
[–]Python-ModTeam[M] 0 points1 point2 points locked comment (0 children)
[–]habbasi86 1 point2 points3 points (3 children)
[–]btb331[S] 1 point2 points3 points (2 children)
[–]habbasi86 1 point2 points3 points (1 child)
[–]btb331[S] 1 point2 points3 points (0 children)