task 10
This commit is contained in:
@@ -74,3 +74,16 @@ def b64_enc(str):
|
|||||||
res = res + b64_enc_map(bits[i])
|
res = res + b64_enc_map(bits[i])
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import argparse
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument('FILE', help="The input positional parameter.")
|
||||||
|
parser.add_argument('-b', '--bool', action='store_true', help="An optional boolean flag (Default: False).")
|
||||||
|
parser.add_argument('-f', '--float', default=0.0, type=float, help="An optional parameter of type float (Default: 0.0).")
|
||||||
|
parser.add_argument('-i', '--int', default=0, type=int, help="An optional parameter of type int (Default: 0).")
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
print("input: {FILE}\n--bool {bool}\n--float {float}\n--int {int}".format(**args.__dict__))
|
||||||
|
|
||||||
|
exit(42)
|
||||||
|
|||||||
Reference in New Issue
Block a user