You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
492 B

{% calculate run = '/usr/bin/python', package = 'test-category/test-package',
merge = 'test-category/other-package' %}
import os
print('IN script_0')
print('current dir:', os.getcwd())
files_list = os.listdir('./')
if not files_list:
with open('./file_0', 'w') as new_file:
new_file.write('from script_0')
else:
new_file_path = './file_{}'.format(int(files_list[-1].lstrip('file_')) + 1)
with open(new_file_path, 'w') as new_file:
new_file.write('from script_0')