Created
April 5, 2020 11:14
-
-
Save Foair/0743ffbeb2eb48d10076533f0d1f0b45 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import sys | |
import os | |
def main(): | |
symbol = os.environ.get('ARG_SYMBOL') | |
if not symbol: | |
symbol = 'Δ' | |
argc = len(sys.argv) - 1 | |
args = [] | |
print('='* argc + symbol + str(argc)) | |
for i in range(1, len(sys.argv)): | |
args.append(sys.argv[i].replace('\n', '‣')) # ⬖ | |
# print((symbol + '\n').join(args) + symbol) | |
for arg in args: | |
print(arg + symbol + str(len(arg))) | |
def main2(): | |
print('Length of Params:', len(sys.argv) - 1) | |
for i in range(1, len(sys.argv)): | |
print(repr(sys.argv[i])) | |
if __name__ == '__main__': | |
# $env:ARG_SYMBOL = '##' | |
main() | |
#main2() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment