4 ms·
Feels like the only benefit is not having to write os.system(). Though maybe including shell scripts (like build environment setup stuff from other software) fo
by Neywiny 2y ago
Feels like the only benefit is not having to write os.system(). Though maybe including shell scripts (like build environment setup stuff from other software) for more complicated commands? I may give this a try for a bit to find out
- shlomo_z 2y agoos.system doesn't actually change your environment: >>> os.getcwd() 'C:\\Users\\Admin\\Downloads' >>> os.system("cd Video") 0 >>> os.getcwd() 'C:\\Users\\Admin\\Downloads' >>>
- timonoko 2y agoThis the perfection, why would you want anything more? import os def sh(x): return os.popen(x).read().split("\n")