Add Nim and Python fetches + Update benchmarks

This commit is contained in:
xTrayambak 2023-09-14 12:21:39 +05:30
commit 97b3018cf6
5 changed files with 117 additions and 7 deletions

20
py/tinierfetch-py.py Normal file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env python3
import sys, os
if len(sys.argv) > 1:
COLOR = sys.argv[1] == "color"
else:
COLOR = True
def main():
for env in ["USER", "SHELL", "TERM", "LANG"]:
if COLOR:
sys.stdout.write("\033[0;" + "m" + env + ":\033[0m" + os.environ.get(env) + "\n")
else:
sys.stdout.write(env + ": " + os.environ.get(env))
sys.stdout.write("\x1B[35mcolors: \x1B[0m\x1B[41m \x1B[42m \x1B[43m \x1B[44m \x1B[45m \x1B[0m" + "\n")
if __name__ == '__main__':
main()