Running Shell Commands as Functions - sh python library - Advent of Code 2021

preview_player
Показать описание
We're nearing the end, and this is a cute little library I found on my travels which some people might find useful. I think it's especially nice for those people starting out with Python because, to be quite frank, the subprocess library is not the most fun thing to play with, and this makes peoples lives simpler.

Sh wraps around command-line functions nicely and gives this super slick interface so that you can call them from code. Not all commands make sense to call in this way, but sometimes it's easier than doing the equivalent in OS calls.
Рекомендации по теме
visit shbcf.ru