copy-text.py 339 B

12345678910111213
  1. #!/usr/bin/env python3
  2. # Copyright 2009-2017 BHG http://bw.org/
  3. def main():
  4. infile = open('lines.txt', 'rt')
  5. outfile = open('lines-copy.txt', 'wt')
  6. for line in infile:
  7. print(line.rstrip(), file=outfile)
  8. print('.', end='', flush=True)
  9. outfile.close()
  10. print('\ndone.')
  11. if __name__ == '__main__': main()