Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C# to Python help
#4
you should encrypt first, then save as json
This code not tested, but should work or only need minor modification.
at top:
import json
after line 14:

        self.save_settings(filename)

def save_settings(self, filename):
    with filename.open('w') as f:
        json.dump(self.settings, f)

# for reading back in:
def load_file(self, filename):
    with filename.open('r') as f:
        self.settings = json.load(f)
Reply


Messages In This Thread
C# to Python help - by SniperPro - Apr-13-2018, 11:51 AM
RE: C# to Python help - by Larz60+ - Apr-13-2018, 01:44 PM
RE: C# to Python help - by SniperPro - Apr-17-2018, 10:44 AM
RE: C# to Python help - by Larz60+ - Apr-17-2018, 11:45 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020