nxt-python icon indicating copy to clipboard operation
nxt-python copied to clipboard

[Feature Request] Better config file

Open GoogleCodeExporter opened this issue 10 years ago • 1 comments

The current config file is hard to understand. strict=0, usb=False, it's 
inconsistent. I had to dig through the source to figure out why my brick wasn't 
being recognized and ended up reimplementing it with the json module instead.




Why do you think it's important?
It's frustrating when things don't work. Also, it'll get rid of your eval call, 
which really isn't Pythonic at all.

Any ideas on how to implement it?
I used the json module. Renaming the existing keys would be a good approach as 
well.

Please provide any additional information below.
I've attached my config file. I might attach the modified locator.py when I 
finish cleaning it up.

Original issue reported on code.google.com by i.nnikishi on 9 Jul 2013 at 4:59

Attachments:

GoogleCodeExporter avatar Oct 10 '15 16:10 GoogleCodeExporter

If you want, @Eelviny, I have some code that I always use the parse config files that look like the following:

stuf: True morestuf: False startDate: 15432252 someNumber: 213 someWords: hello

Bottersnike avatar Aug 17 '16 13:08 Bottersnike