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.

21 lines
391B

  1. #!/usr/bin/env python3
  2. import sys
  3. def main(argv):
  4. if len(argv) <= 1:
  5. print("Usage: python3 {} <file to fix>".format(argv[0]))
  6. exit()
  7. with open(argv[1], "r") as f:
  8. data = f.read()
  9. data = data.replace("\t", " ")
  10. with open(argv[1], "w") as f:
  11. f.write(data)
  12. print("done")
  13. return 0
  14. if __name__=='__main__':
  15. exit(main(sys.argv))