4 ms·
Why break tasks up into 10 line files when you could break them into 10 line Python/Similar functions? Same advantages as above, a more powerful cross platform
by ultra_nick 6y ago
Why break tasks up into 10 line files when you could break them into 10 line Python/Similar functions?
Same advantages as above, a more powerful cross platform language, cross-task references can be linted
def run(params):
"Run a built binary."
subprocess.run("./" + params.path)
.
.
.
if __name__ == __main__:
"Take CLI options and run selected function."""
# Parse CLI arguments
# Call functions with options
- masukomi 6y agobecause it's not the unix way and the unix way has a LOT of value. because not all the tools you use in your system can import your python/similar file. Your deploy pipeline could involve 10 languages running under multiple os's / versions or to put it another way... because the whole world doesn't run in your favorite programming language.