forked from ovh/pci-test
feat: Added exercise 1 and 2
This commit is contained in:
parent
9af118a396
commit
6ef29fd620
9
ex1/a.py
Normal file
9
ex1/a.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
def print_args():
|
||||||
|
return " ".join(sys.argv[1:])
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
print(print_args())
|
13
ex1/b.py
Normal file
13
ex1/b.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import argparse
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument("-t", "--target", choices=["titi", "toto", "tata"])
|
||||||
|
args = parser.parse_args()
|
||||||
|
return args.target
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
print(main())
|
10
ex1/c.py
Normal file
10
ex1/c.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
from a import print_args
|
||||||
|
from art import text2art
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
return text2art(print_args())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
print(main())
|
3
ex2/Dockerfile
Normal file
3
ex2/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
FROM scratch
|
||||||
|
COPY app /
|
||||||
|
CMD ["/app"]
|
Loading…
Reference in New Issue
Block a user