python

Back Open Paginator
04.03.2026 09:26
christianp (@christianp@mathstodon.xyz)

Is #Python's asyncio the worst async in the world, or is it just the documentation? I've never managed to successfully use it.

What I'm trying to do today is to run two tasks concurrently, one of which is a server from the `websockets` package, and the other just reads a file periodically. I'm not even trying to share data between them, I can't even just get them both running at the same time.

I'm fairly sure they need to run in separate threads. How do I do that?




Show Original Post


04.03.2026 09:17
dirkdierickx (@dirkdierickx@mastodon-belgium.be)

py2many is a transpiler of your #Python code to many other languages, such as #rust c++ #go etc.

github.com/py2many/py2many

#programming #development




Show Original Post


04.03.2026 08:45
Popolon (@Popolon@snac2.popolon.org)
#electronics #python #js #diagrams

Some exemples (json+output) here:

https://wavedrom.com/tutorial2.html




Show Original Post


04.03.2026 08:34
journalduhacker (@journalduhacker@framapiaf.org)

PDM + uv, duo de choc pour vos projets Python
metal3d.org/blog/2025/pdm-+-uv
#python




Show Original Post


04.03.2026 08:05
leofebey (@leofebey@aus.social)

Still slowly but surely working on my music library sync program, written in Python and Kivy. It's aimed to be like an old school iTunes replacement, but it can sync with any device, not just iPods.

#python #kivy





Show Original Post


04.03.2026 07:51
mopicmp (@mopicmp@mastodon.social)

Python Tip: slots for Memory

@dataclass(slots=True)
class Pixel:
x: int
y: int
color: str
# Uses 40% less memory than regular class

Adding slots=True to dataclasses prevents __dict__ creation. Saves ~40% memory per instance.

raccoonette.gumroad.com/l/Pyth




Show Original Post


04.03.2026 07:51
mopicmp (@mopicmp@mastodon.social)

Python Tip: subprocess.run()

import subprocess
result = subprocess.run(
['git', 'status', '--short'],
capture_output=True, text=True, check=True
)
print(result.stdout)

subprocess.run() is the modern way to call external commands. capture_output + text=True gives...

raccoonette.gumroad.com/l/Pyth




Show Original Post


04.03.2026 06:49
arda (@arda@mastodon.world)

📝 New blog post: Introducing FableCast. Fable tales as imagined by AI

FableCast is an AI-powered children's book engine that writes, illustrates, narrates, and translates picture books—fully automated, seven languages, zero human artists harmed.

blog.arda.tr/blog/2026-02-11-i

#dev #ai #python #gcp




Show Original Post


04.03.2026 06:12
247CodeGirl (@247CodeGirl@mastodon.social)

Season 1 Lesson 6 Part 6 - Your First Steps - Shorthand Padding with Zero - within f String in Python





Show Original Post


04.03.2026 05:17
mgorny (@mgorny@social.treehouse.systems)

Sometimes I wonder why I even bother. I mean, people are perfectly happy to let statistical models designed as bullshit generators do their coding. Why do I even bother running their test suites and inspecting the failures as a human, if these tests may well be complete bullshit?

#FreeSoftware #OpenSource #Gentoo #Python #AI #LLM #NoAI #NoLLM #VibeCoding




Show Original Post


04.03.2026 04:56
ahasty (@ahasty@techhub.social)

So I run Fedora desktop...I am looking to maybe have a local AI run that I can chat with about python...I don't care about a fancy GUI..I want it stuck in my terminal. I don't need it to edit my files I can do that. I don't want it on the web or calling home. I want a local interactive python manual.

Anyone have anything that can point me the right way?

#run_local_ai #python #privacy

I am still wary of the ethics of local AI ....if someone has content for that let me know #aiethics




Show Original Post


04.03.2026 04:11
brass75 (@brass75@twit.social)

Random #Python question (this is me trying to get more info for a talk I plan on offering to #PyOhio.)

Does anyone know why each call to `float('nan')` generates a different instance?




Show Original Post


1 ...386 387 388 389 390 391 392 393 394 395 396 ...1592
UP