jmsv / l293d

Python module to drive DC motors from a Raspberry Pi using the L293D chip
http://l293d.rtfd.io
MIT License
18 stars 15 forks source link

Need to find a better config solution #9

Closed jmsv closed 8 years ago

jmsv commented 8 years ago

In this commit I used a python file named config.py as a solution to issue #3.

What I forgot at the time was that this config file is just installed with everything else, and compiles to a .pyc - In my case, to /usr/local/lib/python2.7/dist-packages/l293d/.

There needs to be a solution where, for example:

  1. Before running setup.py install, the user can edit the filepath of a config file that defaults to, for example, ~/l293d-config and contains stuff like verbose = true.
  2. When l293d is imported, the config is loaded
  3. The user can edit this file when they want
jmsv commented 8 years ago

Note: after reading this, it looks like a YAML config file would be a better solution.