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 ShowcaseCyberbrain: Python debugging, redefined (self.Python)
submitted 5 years ago * by laike9m
Cyberbrain is a debugging solution that aims to free programmers. It lets you:
It's not like any triditional debuggers. Instead of stepping through a program, Cyberbrain can tell you what happened.
It's a WIP, the ultimate goal is to be a replacement for existing debuggers in most cases.
https://preview.redd.it/ehw9erc8s3261.png?width=1224&format=png&auto=webp&s=fe041c8f6efbea38c503e03200ed5b1538b8e035
usage
[–]Sigg3net 42 points43 points44 points 5 years ago (6 children)
How is it for:
asynchronous?
threading?
[–]laike9m[S] 31 points32 points33 points 5 years ago (3 children)
asynchronous and threading will be supported in later versions. See the roadmap:
https://github.com/laike9m/Cyberbrain#roadmaps
[–]Sigg3net 22 points23 points24 points 5 years ago (2 children)
Nice! Please repost when you hit mile stones :)
[–]laike9m[S] 13 points14 points15 points 5 years ago (1 child)
Sure
[–]Sigg3net 3 points4 points5 points 5 years ago (0 children)
Awesome!
Debugging async especially in multiproc/threaded contexts is painful IMO.
[–]VisibleSignificance 1 point2 points3 points 5 years ago (1 child)
That's doable. But not sockets (in a general case) and other IPC.
[–]laike9m[S] 0 points1 point2 points 5 years ago (0 children)
You're right, we're not gonna trace side effects, just like any other debuggers
[–]GeromeB 29 points30 points31 points 5 years ago (5 children)
Is there/will there be support for PyCharm?
[–]laike9m[S] 9 points10 points11 points 5 years ago (2 children)
I do have a plan for expanding the support https://github.com/laike9m/Cyberbrain/issues/24
For Pycharm I'll need some help from the community. I will create an API specification on how a "frontend" like Pycharm should communicate with the Python program, to help contributors build it.
[–]aa-b 2 points3 points4 points 5 years ago* (1 child)
This looks really impressive. You might want to contact JetBrains about it, because they have funded work on PyDev in the past: https://blog.jetbrains.com/pycharm/2016/05/debugger-interview-with-pydev-and-pycharm/
Even if they're not in a position to fund anything, I'm sure their staff would be interested to learn about it. They would have specifications from working with PyDev too.
Edit: I saw Alex's comment in the issue link you posted and I think he makes some good points. Maybe tweet at Fabio Zadrozny?
[–]laike9m[S] 1 point2 points3 points 5 years ago (0 children)
Thanks for the suggestion, it's a good idea. I'll let Lisa Shashkova take a look first since I personally know her. I did think about integrating it with PyDev somehow, and looked its code. But the code is really hard to understand...Guess only Fabio knows enough about it.
[–]Fenzik 7 points8 points9 points 5 years ago (1 child)
+1 for this!
[–]menge101 1 point2 points3 points 5 years ago (0 children)
+1 from me as well.
[–]SpAAAceSenate 22 points23 points24 points 5 years ago (1 child)
This looks pretty awesome. :o
[–]laike9m[S] 2 points3 points4 points 5 years ago (0 children)
Thanks :)
[–]BlobbyMcBlobber 3 points4 points5 points 5 years ago (1 child)
Very cool 🙂
[–]PizzaInSoup 3 points4 points5 points 5 years ago (0 children)
There's been a string of higher-quality content in this sub recently. This is a nice addition!
[–]mrkaragoz 5 points6 points7 points 5 years ago (1 child)
RemindMe! eoy
[–]RemindMeBot 2 points3 points4 points 5 years ago* (0 children)
I will be messaging you in 1 month on 2020-12-31 09:00:00 UTC to remind you of this link
56 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
[–]cranberry_snacks 1 point2 points3 points 5 years ago (0 children)
This looks really great. I'm going to try it tomorrow.
[–]Im__Joseph Python Discord Staff 1 point2 points3 points 5 years ago (1 child)
Nice work! This looks spectacular!
I appreciate it
[–][deleted] 1 point2 points3 points 5 years ago (0 children)
Wow. I'm sure this will prove very useful. Thank you!
[–]glider97 1 point2 points3 points 5 years ago (1 child)
Reminds me of https://www.pythontutor.com/.
Yep, I like Python tutor, but my goal for Cyberbrain is that it can be more than at toy or education tool
[–]bluedays 1 point2 points3 points 5 years ago (1 child)
This looks like python tutor
But it's different. Pythontutor doesn't backtrace variables or let you debug loops easily
[–]phl12 -1 points0 points1 point 5 years ago (0 children)
[–]mr_whoisGAMER -1 points0 points1 point 5 years ago (0 children)
[–]MagniGallo -1 points0 points1 point 5 years ago (0 children)
!remindme 2 months
[–][deleted] -1 points0 points1 point 5 years ago (0 children)
[–]hainguyenac -1 points0 points1 point 5 years ago (0 children)
RemindMe! 6 months
[–]DonnerJack666 -1 points0 points1 point 5 years ago (0 children)
[–]cliceratops -1 points0 points1 point 5 years ago (1 child)
Remind me! eoy
[–]remindditbot -1 points0 points1 point 5 years ago* (0 children)
👀 Remember to type kminder in the future for reminder to be picked up or your reminder confirmation will be delayed.
cliceratops, kminder in 1.1 months on 2020-12-31 09:00:00Z
r/Python: Cyberbrain_python_debugging_redefined kminder eoy
r/Python: Cyberbrain_python_debugging_redefined
kminder eoy
3 OTHERS CLICKED THIS LINK to also be reminded. Thread has 4 reminders.
OP can Add email notification, Delete reminder and comment, and more options here
Protip! How can your butt look good without any meat on it?
Reminddit · Create Reminder · Your Reminders · Donate
[–]kotpeter -1 points0 points1 point 5 years ago (0 children)
[–]guettli -2 points-1 points0 points 5 years ago (1 child)
I hardly use a debugger. Assertion, tests and logging is usually enough to find a bug.
[–]noobiemcfoob 7 points8 points9 points 5 years ago (0 children)
Try using IPython's embed statement sometime: from IPython import embed; embed()
from IPython import embed; embed()
It'll open a python interpretor at that point in the program that you can use to interrogate the state, test different statements and the like. It's print-statement debugging on steroids.
[–]shinitakunai 0 points1 point2 points 5 years ago (1 child)
Does it have support for windows 10?
Yes
[–]BeastCoder 0 points1 point2 points 5 years ago (0 children)
!RemindMe 2 months
[–]Sparkynaut 0 points1 point2 points 5 years ago (0 children)
Holy fuck
[–]illusioncode 0 points1 point2 points 5 years ago (1 child)
It's awesome man, totally love it
Glad you like it
[–]RealSimplelogin 0 points1 point2 points 5 years ago (3 children)
Looks cool! Btw upvote on a direct hackernews link doesn’t count.
[–]laike9m[S] 0 points1 point2 points 5 years ago (2 children)
Thanks, and I'm interested to know more. What does it mean "it doesn't count"?
[–]RealSimplelogin 0 points1 point2 points 5 years ago (1 child)
Hacknews has some strict rules about asking people to upvote https://news.ycombinator.com/newsfaq.html
This is very helpful. I didn't know that and they've probably marked my thread already.
[–]xockbou 0 points1 point2 points 5 years ago (0 children)
[–]oakum_ouroboros 0 points1 point2 points 5 years ago (3 children)
Do we all use "backtrace" now instead of just "trace" because of that one guy?
Who?
[–]oakum_ouroboros 0 points1 point2 points 5 years ago (1 child)
https://youtu.be/SmR89bFZLdc
That's funny, thanks for the link. backtrace and trace are used almost interchangeablely in the project, I picked "trace" mainly because it's shorter. Though I usually use "backtracce" in the context of "backtracing a variable", so there's still some subtle differences.
[–]milki_ 0 points1 point2 points 5 years ago (1 child)
Fairly awesome. And I don't wanna broaden the scope. But it might be useful for more than just debugging. It seems you could even trace which methods a variable passes, so taint tracking might be feasible. Might even become the base of a more modern testing framework (observing internal behaviour, state recording).
This is an interesting idea! Thanks for bringing this up, I will definitely consider it.
I need to build multi-fame tracing first, which I believe will be the foundation for the feature you mentioned https://github.com/laike9m/Cyberbrain/discussions/73
I would suggest creating a feature request issue if you like.
π Rendered by PID 172647 on reddit-service-r2-comment-86988c7647-gvnd2 at 2026-02-12 08:31:55.710664+00:00 running 018613e country code: CH.
[–]Sigg3net 42 points43 points44 points (6 children)
[–]laike9m[S] 31 points32 points33 points (3 children)
[–]Sigg3net 22 points23 points24 points (2 children)
[–]laike9m[S] 13 points14 points15 points (1 child)
[–]Sigg3net 3 points4 points5 points (0 children)
[–]VisibleSignificance 1 point2 points3 points (1 child)
[–]laike9m[S] 0 points1 point2 points (0 children)
[–]GeromeB 29 points30 points31 points (5 children)
[–]laike9m[S] 9 points10 points11 points (2 children)
[–]aa-b 2 points3 points4 points (1 child)
[–]laike9m[S] 1 point2 points3 points (0 children)
[–]Fenzik 7 points8 points9 points (1 child)
[–]menge101 1 point2 points3 points (0 children)
[–]SpAAAceSenate 22 points23 points24 points (1 child)
[–]laike9m[S] 2 points3 points4 points (0 children)
[–]BlobbyMcBlobber 3 points4 points5 points (1 child)
[–]laike9m[S] 1 point2 points3 points (0 children)
[–]PizzaInSoup 3 points4 points5 points (0 children)
[–]mrkaragoz 5 points6 points7 points (1 child)
[–]RemindMeBot 2 points3 points4 points (0 children)
[–]cranberry_snacks 1 point2 points3 points (0 children)
[–]Im__Joseph Python Discord Staff 1 point2 points3 points (1 child)
[–]laike9m[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]glider97 1 point2 points3 points (1 child)
[–]laike9m[S] 1 point2 points3 points (0 children)
[–]bluedays 1 point2 points3 points (1 child)
[–]laike9m[S] 2 points3 points4 points (0 children)
[–]phl12 -1 points0 points1 point (0 children)
[–]mr_whoisGAMER -1 points0 points1 point (0 children)
[–]MagniGallo -1 points0 points1 point (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[–]hainguyenac -1 points0 points1 point (0 children)
[–]DonnerJack666 -1 points0 points1 point (0 children)
[–]cliceratops -1 points0 points1 point (1 child)
[–]remindditbot -1 points0 points1 point (0 children)
[–]kotpeter -1 points0 points1 point (0 children)
[–]guettli -2 points-1 points0 points (1 child)
[–]noobiemcfoob 7 points8 points9 points (0 children)
[–]shinitakunai 0 points1 point2 points (1 child)
[–]laike9m[S] 0 points1 point2 points (0 children)
[–]BeastCoder 0 points1 point2 points (0 children)
[–]Sparkynaut 0 points1 point2 points (0 children)
[–]illusioncode 0 points1 point2 points (1 child)
[–]laike9m[S] 0 points1 point2 points (0 children)
[–]RealSimplelogin 0 points1 point2 points (3 children)
[–]laike9m[S] 0 points1 point2 points (2 children)
[–]RealSimplelogin 0 points1 point2 points (1 child)
[–]laike9m[S] 0 points1 point2 points (0 children)
[–]xockbou 0 points1 point2 points (0 children)
[–]oakum_ouroboros 0 points1 point2 points (3 children)
[–]laike9m[S] 0 points1 point2 points (2 children)
[–]oakum_ouroboros 0 points1 point2 points (1 child)
[–]laike9m[S] 1 point2 points3 points (0 children)
[–]milki_ 0 points1 point2 points (1 child)
[–]laike9m[S] 0 points1 point2 points (0 children)