Um exemplo mĂnimo de como usar #Python para ler dados de uma planilha #Excel com a biblioteca #openpyxl e como modificar um arquivo #Word com a biblioteca #docx
https://gist.github.com/villares/560e231da78cd1b8f5701c5a6897348f
Another hacky #Python script using the #HackMD API⊠this one is to change the write permissions⊠you might want to adapt it or check out the other API helper methods:
@movq@www.uninformativ.de Iâd love to have a Python script pushing my local CSV, too. But thatâs never gonna fly, not in a thousand years. I canât imagine that ever becoming reasonably stable without having to fix everything after the reverse-engineered API changes again.
@lyse@lyse.isobeef.org I do my timetracking in a little Python script, locally. Every now and then, I push the data to our actual service. Problem solved â but itâs a completely unpopular approach, they all want to use the web site. I donât get it. Then, of course, when itâs down, shit hits the fan. (Luckily, our timetracking software is neither developed nor run by us anymore. Itâs a silly cloud service, but the upside is that Iâm not responsible anymore. đ€·)
Some of our oldschool devs tried to roll out local timetracking once, about 15 years ago. I donât remember anymore why they failed âŠ
This is developed inhouse, Iâm just so glad that weâre not a software engineering company. Oh wait. How embarrassing.
Oh to be anonymous on the internet. That must be nice. đ
Cheers @danzin@danzin, was it you who added a PR to core #Python about pprint?
(listening to #corepy #podcast)
Update: Thank you so much for improving Python @danzin@danzin !
core.py: PyCon US 2025 Recap
Starting from: 01:32:45 https://podcasters.spotify.com/pod/show/corepy/episodes/PyCon-US-2025-Recap-e347dc3
https://anchor.fm/s/eb6edc3c/podcast/play/104100675/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2025-5-13%2Fb281ac3a-b0ec-49b9-b31d-7a90031e910d.mp3#t=5565
HistĂłrias do #Python & #FLOSS no Brasil
Entrevista com o @gwidion@gwidion
https://www.youtube.com/live/ia8aOZsDYOM
cc @apyb@apyb
Stories from Python History - #TalkPythonToMe Ep. 513
Iâm hoping @geofft@geofft can fix this 2022 issue on #uv built #Python binaries that breaks #tkinter, wishing him best of luck!
https://github.com/astral-sh/python-build-standalone/issues/129#issuecomment-3016695658
Updating my âhow install and use #py5â pages, check them out if you want to â⊠draw and experiment some #CreativeCoding with #Python âŠâ
EN: https://abav.lugaralgum.com/como-instalar-py5/index-EN.html
ES: https://abav.lugaralgum.com/como-instalar-py5/index-ES.html
Thumbnail novo para a minha pågina sobre compreensão de listas⊠#Python
https://abav.lugaralgum.com/material-aulas/Processing-Python-py5/comprehension.html
(preciso dar uma melhoradinha na pĂĄgina, por umas imagens, arrumar links quebrados)
#python Alguém tem o contato do Juan Lopes? @gwidion@gwidion ?
Acho que ele ia gostar de ver isso aqui:
@prologic@twtxt.net interesting that ruby is so low on the list, i find it the easiest to learn! hell i struggle with python more than ruby and iâve been told that python is like ruby but better lol. maybe itâs just my weird brain!
One of the nicest things about Go is the language itself, comparing Go to other popular languages in terms of the complexity to learn to be proficient in:
- Go:
25
keywords (Stack Overflow); CSP-style concurrency (goroutines & channels)
- Python 2:
30
keywords (TutorialsPoint); GIL-bound threads & multiprocessing (Wikipedia)
- Python 3:
35
keywords (Initial Commit); GIL-bound threads,asyncio
& multiprocessing (Wikipedia, DEV Community)
- Java:
50
keywords (Stack Overflow); threads +java.util.concurrent
(Wikipedia)
- C++:
82
keywords (Stack Overflow);std::thread
, atomics & futures (en.cppreference.com)
- JavaScript:
38
keywords (Stack Overflow); single-threaded event loop &async/await
, Web Workers (Wikipedia)
- Ruby:
42
keywords (Stack Overflow); GIL-bound threads (MRI), fibers & processes (Wikipedia)
@bender@twtxt.net Hereâs a short-list:
- Simple, minimal syntaxâmaster the core in hours, not months.
- CSP-style concurrency (goroutines & channels)âsafe, scalable parallelism.
- Blazing-fast compiler & single-binary deploysâzero runtime dependencies.
- Rich stdlib & built-in tooling (gofmt, go test, modules).
- No heavy frameworks or hidden magicâunlike Java/C++/Python overhead.
tar
and find
were written by the devil to make sysadmins even more miserable
@kat@yarn.girlonthemoon.xyz @prologic@twtxt.net Given that all these programs are super old (tar
is from the late 1970ies), while trying to retain backwards-compatibilty, Iâm not surprised that the UI isnât too great. đ€
find
has quite a few pitfalls, that is very true. At work, we donât even use it anymore in more complex scenarios but write Python scripts instead. find
can be fast and efficient, but fewer and fewer people lack the knowledge to use it ⊠The same goes for Shell scripting in general, actually.
Thanks, @movq@www.uninformativ.de! That seems to be much easier. Itâs already implemented in the Python docs as examples of recvmsg(âŠ)
and sendmsg(âŠ)
:
- https://docs.python.org/3/library/socket.html#socket.socket.recvmsg
- https://docs.python.org/3/library/socket.html#socket.socket.sendmsg
I looked at them sooo many times in order to figure out why my SCM_CREDENTIALS
sending code didnât work. :-D
Nobody want to be a shitty programmer. The question is: Do you do anything not to not be one?
Reading blogs or social media and watching YouTube videos is fun. After them, your code may be a little better, of course. But you need a lot. You need to study! Read good books and study the code of other programmers, for example. Maybe work with a new language, architectures and paradigms. You need break the routine.
If you know Object-oriented programming, you learn functional programming.
If you know Model-View-Controller, you learn Model-View-ViewModel.
If you donât know anything about architectures, you learn Clean Architecture, Hexagonal Architecture, etc.
If you know Python, you learn Ruby or Go.
If you know Clojure or Lisp⊠you donât need to learn anything else. You are already a good programmer. Just kidding. You can learn Elixir or Scala.
Be a good programmer my friend.
Weâre all old farts. When we started, there werenât a lot of options. But today? Iâd be completely overwhelmed, I think.
Hence, Iâd recommend to start programming with a console program. As for the language, not sure. But Python is probably a good choice
Thatâs what I usually do (when we have young people at work who never really programmed before), but it doesnât really âhitâ them. Theyâve seen so much, crazy graphics, web pages, itâs all fancy. Just some text output is utterly boring these days. âčïž And thatâs my problem: I have no idea how I could possibly spark some interest in things like pointers or something âlow-levelâ like that. And I truly believe that you need to understand things like pointers in order to program, in general.
Wrote some serious Python for the first time in like 10 years đ± I feel so dirty đ€Ł
@movq@www.uninformativ.de I started with Delphi in school, the book (that we never ever used even once and I also never looked at) taught Pascal. The UI part felt easy at first but prevented me from understanding fundamental stuff like procedures or functions or even begin
and end
blocks for if
s or loops. For example I always thought that I needed to have a button somewhere, even if hidden. That gave me a handler procedure where I could put code and somehow call it. Two or three years later, a new mate from the parallel class finally told me that this wasnât necessary and how to do thing better.
You know all too well that back in the day there was not a whole lot of information out there. And the bits that did exist were well hidden. At least from me. Eventually discovering planet-quellcodes.de (I donât remember if that was the original forum or if that got split off from some other board) via my best schoolmate was like finding the Amber Room. Yeah, reading the ITG book would have been a very good idea for sure. :-)
In hindsight, a console program without the UI overhead might have been better. At least for the very start. Much less things to worry about or get lost.
Hence, Iâd recommend to start programming with a console program. As for the language, not sure. But Python is probably a good choice, it doesnât require a lot of surrounding boilerplate like, say Java or Go. It also does exceptionally well in the principle of least surprise.
revisitando um projeto de hĂĄ 2 anos
erro no build
python do meu OS Ă© agora uma versĂŁo mais recente
incompatĂvel com uma das bibliotecas
keeptryingkeepfailing.mp3
a esperança vã de meter um issue no tracker do projeto
må disposição por acabar o dia com prob não resolvido
horas depois Ă noite, ping
o developer respondeu ao issue
e fez grande commit pra resolver o problema
fuck yeah software livre :szterminal:
Exciting new for Python 3.14!
t-string
, not to be confused with f-string
, to avoid malicious code and make life easier for web developers.
https://davepeck.org/2025/04/11/pythons-new-t-strings/
#python
si4er3q
. See https://twtxt.dev/exts/twt-hash.html, a timezone offset of +00:00
or -00:00
must be replaced by Z
.
Scratch that, no bug in jenny. Thereâs actually a test case for this. Python normalizes -00:00
to +00:00
, so the negative case never happens.
Thank you @python_valencia@twtxt.python-valencia.es for letting me show you the secrets of a decentralised plain text social network like twtxt.
I hope you enjoyed the talk! â€ïžđ
#python #twtxt
I want to present the twtxt feed from Python Valencia: https://twtxt.python-valencia.es/
Technical curiosity: It is generated using n8n, using the official rss.
#welcome
tt
reimplementation that I already followed with the old Python tt
. Previously, I just had a few feeds for testing purposes in my new config. While transfering, I "dropped" heaps of feeds that appeared to be inactive.
Thanks, @movq@www.uninformativ.de!
My backing SQLite database with indices is 8.7 MiB in size right now.
The twtxt
cache is 7.6 MiB, it uses Pythonâs pickle
module. And next to it there is a 16.0 MiB second database with all the read statuses for the old tt
. Wow, super inefficient, it shouldnât contain anything else, itâs a giant, pickled {"$hash": {"read": True/False}, âŠ}
. What the heck, why is it so big?! O_o
I now subscribed to most feeds in my Go tt
reimplementation that I already followed with the old Python tt
. Previously, I just had a few feeds for testing purposes in my new config. While transfering, I âdroppedâ heaps of feeds that appeared to be inactive.
This might motivate me to actually âfinishâ the new client, so that it could become my daily driver. No need to use the old software stack any longer. Letâs see how bad this goes.
@movq@www.uninformativ.de Yeah, most of the graphical applications are actually KDE programs:
- KMail â e-mail client
- Okular â PDF viewer
- Gwenview â image viewer
- Dolphin â file browser
- KWallet â password manager (I want to check out
pass
one day. The most annoying thing is that when I copy a password, it says that the password has been modified and asks me whether I want to save the changes. I never do, because the password is still the same. I donât get it.)
- KPatience â card game
- Kdenlive â video editor
- Kleopatra â certificate manager
Qt:
- VLC â video player
- Psi â Jabber client (I happily used Kopete in the past, but that is not supported anymore or so. I donât remember.)
- sqlitebrowser â SQLite browser
Gtk:
- Firefox â web browser
- Quod Libet â music player (I should look for a better alternative. Canât remember why I had to move away from Amarok, was it dead? There was a fork Clementine or so, but I had to drop that for some unknown reason, too.)
- Audacity â audio editor
- GIMP â image editor
These are the things that are open right now or that I could think of. Most other stuff I actually do in the terminal.
In the pastâą, I used the Python KDE4 bindings. That was really nice. I could pass most stuff directly in the constructor and didnât have to call gazillions of setters improving the experience significantly. If I ever wanted to do GUI programming again, Iâd definitely go that route. There are also great Qt bindings for Python if one wanted to avoid the KDE stuff on top. The vast majority I do for myself, though, is either CLI or maybe TUI. A few web shit things, but no GUIs anymore. :-)
I have finished 1-9 on Python. If anyone is interested, I could share the code, or in Reddit many people have shared theirs.
In a couple of days Iâll be giving a talk about #twtxt https://www.meetup.com/es-ES/python-valencia-meetup/events/306769708/
@andros@twtxt.andros.dev If something fits in a CSV file, it typically doesnât require a database. I agree with that. Depending on the application, more complicated queries might benefit from a database, though. I donât know awk very well, but I could imagine that grep, sed and cut reach their CSV processing limits rather quickly when you have to deal with escaped (multiline) fields.
I only very rarely have to deal with CSV files or databases in my day to day life. Maybe, these classic Unix tools offer some tricks Iâm not aware of. When I have some more complicated CSV input, I generally reach for Python.
Ontem voltei a pegar no Django depois de 10 anos para um side-project. Ă como se fosse um regresso a um lugar onde um dia se foi feliz.
Tem a sua personalidade e tal, mas continuo a adorar os seus pormenores e as suas escolhas sobre como deve funcionar uma framework web.
TambĂ©m fiquei muito agradado de ver que muito pouco mudou desde hĂĄ uma dĂ©cada no que toca Ă forma fundamental como o Django faz as coisas. Talvez isso nĂŁo seja apreciado pela juventude habituada a ciclos de upgrade rĂĄpidos e drĂĄsticos, mas pra mim foi um grande alĂvio ver que nĂŁo tenho de me atualizar muito para montar um pequeno projeto.
HĂĄ gente djangueira por aĂ?
looks good now!
description = đ Full-Stack developer (Mainly Python) â Writer[...]
Iâm developing a tutorial for the Django Girls. Does anyone here have experience with #Django ? #python
The project is a POC (Proof of Concept) that went into production and the company has customers who are using it. The developers had been working for several years, without testing, structure, isolation and so on. The company hired me to transform the project into a real product. There are in my hands 422 python files to transform that they beg me a refactore, architecture and testing. Every developerâs bad dream.
My first step is to read and understand the tree because there are apps inside other apps call each other. I am very determined to work on a new repository.
For many years I have found Flask to be too basic a tool for modern development. But since I create APIs using Flask with Pydantic to validate the input data, some middlewares for parsing and Blueprint to separate the code into modules⊠I must admit that I am super comfortable, fast and easy to test.
#flask #python #pydantic
What is clean architecture? Thatâs a good question.
You think of a pattern for ordering code with good decisions isolating technologies (you can change the web framework or database without break the business logic), easy to test (you only test interfaces and use cases), sharing code between frameworks (entities and use cases), scalability, modulations and standardizing names. Clean architecture is not perfect, it has a learning curve and some abstraction in each technology. You can even find rejection with yours colleagues.
I have a good article on this topic.
https://programadorwebvalencia.com/implementando-arquitectura-limpia-en-python/
#python
Yes, itâs a mini python cgi script which implements IndieAuth
@prologic@twtxt.net mediacms! itâs janky yeah but it does the job ultimately (even if sometimes videos donât encode and i gotta do some weird python venv shit to force the encode lolâŠ)
I want to share the video of my last talk: Creating an Instagram in Django for an Iberian lynx https://www.youtube.com/watch?v=dW69cYIULh8 (Spanish) #django #python
python cgi script which handles micropub and writes content to twtxt file. I was want micropub+microsub for twtverse but seems i burned (due choice wrong stack?): https://privatebin.net/?0b598b91ac186855#BfRKjLUQz5KUFJNekJBb5V2qvtEe8xQN8nenYbkez2XR
Honestly⊠not much. Have abandon two projects (both private) on Golang and one related to cryptography. My mostly languages are Python and Javascript (also can PHP). After writing code on Go i spend same time on fixing dumb errors
Things can get very interesting when we add the iter.Pull function in the mix. It works like pythons yield from.
This day one advantage of code was pretty neat looking.
https://twitter.com/gereleth/status/1730495736070938786?s=09
Code here: https://github.com/gereleth/aoc_python/blob/main/src/year2023/day01vis.py
have to admit that switching to python & numpy for data analysis from klong relieves me from a huge pain in the assâklong is just slow for that.
@lyse@lyse.isobeef.org Iâm a big fan of using PyCharm and IntelliJ on large Python and Java codebases respectively. In my personal life, I mostly use Emacs (because I donât hack much Java outside of work), but I do wonder what GoLand is like.
@movq@www.uninformativ.de I would not mind keeping a diff, if you tell me where to make the changes! I know nothing of Python, and I have spent already a couple of hours trying to make sense. I know it is there, in front of me, if only I knew Python. đ©
@lyse@lyse.isobeef.org (#hut4mnq) I am so sorry for you. I left my Java job for Go. Though through ârestructuringâ its become a Python job.
@sdk@codevoid.de Thatâs an interesting thought. I Know most are text files but at one time there was someone that used a python CGI Script. That person would have had to make a script for the follows.
@mdom@domgoergen.com I am playing with the txtnish client, all the systems I have available are running an old version of Python