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.

17 lines
476 B

  1. import sys
  2. sys.path.append("..")
  3. import os
  4. from ssh_config_utils.config_file import ConfigFile
  5. base = "./sample_configs"
  6. write_base = "./write_test"
  7. for file in os.listdir(base):
  8. print(file)
  9. fullpath = os.path.join(base, file)
  10. with open(fullpath, encoding="utf-8") as read_file:
  11. config_file = ConfigFile.read_file(read_file)
  12. with open(os.path.join(write_base, file), "w", encoding="utf-8") as write_file:
  13. config_file.write_file(write_file)