Shell Interaction in Python: Difference between revisions
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
for c in commands: | for c in commands: | ||
print("{:20}{:7}".format(commands[c], "OK" if which(c) else "missing")) | print("{:20}{:7}".format(commands[c], "OK" if which(c) else "missing")) | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 03:24, 19 January 2022
Internal
Organizatorium
from shutil import which
commands={
"aws": "awscli",
"aws-login": "aws-login",
"aws-eks-configure": "aws-eks-configure"
}
for c in commands:
print("{:20}{:7}".format(commands[c], "OK" if which(c) else "missing"))