-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use json #10
Comments
I just thought of another problem with that bit of code: |
Or you could use a |
In the back of my mind, I knew I had to improve this one feature, but I hadn't thought about it so thoroughly. Thanks for your tips. It's a great idea to use Json, and a great idea to differenciate profiles. |
mw.pm.profileFolder didn't work (called too early?) so I put it in the add-on dir. |
Probably. If you want to do the setup per-profile (which imo would be the Right Thing but with a low priority), you could try something like |
This one is not an error, but the suggestion of an enhancement.
Instead of writing values into a python file, i would use (simple)json. It's really simple.
You basically say
object = json.load(open(json_file_path, 'r'))
to get to the values andjson.dump(object, open(json_file_path, 'w'))
to save them.An example i used is storing "bad" hash values.
My idea would also be to start without a file and use that to indicate no dictionary selected, like the
dict_name='None'
you used and use atry: ... json.load(...)
to check.The text was updated successfully, but these errors were encountered: