As with last time, people didn't understand what you need. There are super-simple solutions available but you're adamant they're not good enough, but don't explain why.
You did give an example this time (which is a distinct improvement) but then you started saying things like...
I don't want to run a script that executes two commands...
#Why not?
Why not?
It's that sort of stuff that confuses people. It makes the problem seem artificial if there's no reason. People often don't like wasting their time; they'd rather help somebody with an actual problem.
So in the future, try not to be too particular. If you have a problem, explain what it is and how you think you'd like to fix it. If you're going to be particular (eg, not using open()
in Python), you'll have to provide a reason.