25 lines
No EOL
465 B
Nix
25 lines
No EOL
465 B
Nix
{ writers, python3Packages }:
|
|
writers.writePython3Bin "test-script" { libraries = []; } ''
|
|
import sys
|
|
import os
|
|
|
|
|
|
def my_function():
|
|
arg = sys.argv[1]
|
|
number = int(arg)
|
|
if (number == 1):
|
|
os.makedirs('13')
|
|
if (number == 2):
|
|
raise Exception("error")
|
|
if (number == 3):
|
|
print(200)
|
|
print(200)
|
|
print(200)
|
|
print(200)
|
|
print(200)
|
|
print(200)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
my_function()
|
|
'' |