Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
OS functions are wrappers of subprocess (at least in python3)
So there is nothing wrong using them.
But yes using subprocess directly is better. -
karelian3686yIt'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/ -
PacRat39566y@karelian
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 -
PacRat39566y@gitlog maybe deprecated was the wrong word, but it's for sure being replaced eventually
https://docs.python.org/2/library/...
Related Rants
Learning the subprocess module in python, because os is deprecated. its a shame because i had just learned os
rant
os
nano
termux
mobile
subprocess
module
system
python