Advertisement
Guest User

Untitled

a guest
Jan 21st, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. for folderName, subFolders, filenames in os.walk('C:\\Users\\Dawid Hrynkiewicz\\PycharmProjects\\untitled'):
  2. for filename in filenames:
  3. x = 1
  4. while x !=10:
  5. url = 'SZABLON_ZAGNIEZDZONE_00'
  6. zrodlo = open(url + str(x) + '/includes/pagination.twig', encoding='utf-8').readlines()
  7. cel = open(url + str(x) + '/includes/pagination.twig', 'w', encoding='utf-8')
  8. for s in zrodlo:
  9. cel.write(s.replace("(1, numberOfRecords//recordsShown + 1) %",
  10. "(1, (numberofRecords/recordsShown)|round(0,\'ceil\'))%"))
  11. cel.close()
  12. x += 1
  13. y = 10
  14. while y != 24:
  15. url = 'SZABLON_ZAGNIEZDZONE_0'
  16. zrodlo = open(url + str(y) + '/includes/pagination.twig', encoding='utf-8').readlines()
  17. cel = open(url + str(y) + '/includes/pagination.twig', 'w', encoding='utf-8')
  18. for s in zrodlo:
  19. cel.write(s.replace("(1, numberOfRecords//recordsShown + 1) %",
  20. "(1, (numberofRecords/recordsShown)|round(0,\'ceil\'))%"))
  21. cel.close()
  22. y += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement