Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for folderName, subFolders, filenames in os.walk('C:\\Users\\Dawid Hrynkiewicz\\PycharmProjects\\untitled'):
- for filename in filenames:
- x = 1
- while x !=10:
- url = 'SZABLON_ZAGNIEZDZONE_00'
- zrodlo = open(url + str(x) + '/includes/pagination.twig', encoding='utf-8').readlines()
- cel = open(url + str(x) + '/includes/pagination.twig', 'w', encoding='utf-8')
- for s in zrodlo:
- cel.write(s.replace("(1, numberOfRecords//recordsShown + 1) %",
- "(1, (numberofRecords/recordsShown)|round(0,\'ceil\'))%"))
- cel.close()
- x += 1
- y = 10
- while y != 24:
- url = 'SZABLON_ZAGNIEZDZONE_0'
- zrodlo = open(url + str(y) + '/includes/pagination.twig', encoding='utf-8').readlines()
- cel = open(url + str(y) + '/includes/pagination.twig', 'w', encoding='utf-8')
- for s in zrodlo:
- cel.write(s.replace("(1, numberOfRecords//recordsShown + 1) %",
- "(1, (numberofRecords/recordsShown)|round(0,\'ceil\'))%"))
- cel.close()
- y += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement