Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
OS functions are wrappers of subprocess (at least in python3)
So there is nothing wrong using them.
But yes using subprocess directly is better.
gitlog66362yos deprecated?? When? Why?
karelian3902yIt's the other way around for me.
Whenever I feel the urge to shell out to achieve something in Python I stop and think twice. I've chosen Python over scummy shell scripts for a reason, right?
If there's really no way around it, at least do it through a semi-decent abstraction: https://amoffat.github.io/sh/
i'm looking to write up a graphical UI using python/GTK 3, to detect an art pen-tablet device, and use said UI to graphically (using subprocess to talk to X in the background) allow a user to customize the tablet region and generate a script that can be run either on startup, or when the tablet is plugged in (i know the xfce DE has settings that allow that).
basically i need subprocess to talk to X, python's mainly the frontend