Advertisement
steve-shambles-2109

Untitled

Nov 9th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. import shutil
  2. import webbrowser
  3.  
  4. first_file = 'test.txt'
  5. second_file = 'test2.txt'
  6. merged_file = 'merged.txt'
  7.  
  8. with open(merged_file, 'wb') as wfd:
  9.     for f in [first_file, second_file]:
  10.         with open(f, 'rb') as fd:
  11.             shutil.copyfileobj(fd, wfd, 1024*1024*10)
  12.  
  13. webbrowser.open(merged_file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement