this post was submitted on 18 Jun 2023
5 points (100.0% liked)

Python

6375 readers
24 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

πŸ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
πŸ’“ Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
top 3 comments
sorted by: hot top controversial new old
[–] Sigmatics@lemmy.ca 2 points 1 year ago

Thanks, this is helpful!

[–] jengland@toast.ooo 0 points 1 year ago (1 children)

I'm curious what features are hard to find in the debuggers for other languages?

[–] Buttons@programming.dev 1 points 1 year ago

Well, with py-spy I can attach to any Python process and see which line in the source code is using the most time. I can see this updated in real-time. All this is easily done without giving any thought to profiling while writing the code.

Surely the same cannot be said of C. For example, how would I see which line of ls is taking the most time? I'm guessing it will take more than the two lines it took to setup and use py-spy (brew install py-spy, py-spy top pid).