Re: [Tutor] Should config file parser be in module's __init__.py

2008-03-19 Thread Kent Johnson
Shrutarshi Basu wrote: > Ok, I'm starting to understand how things work. Just one last > question: suppose my package has a config.py (which contains a config > dict) which another module in the package imports by "import config". > If the user of my package has a config.py in the directory from wh

Re: [Tutor] Should config file parser be in module's __init__.py

2008-03-19 Thread Shrutarshi Basu
Ok, I'm starting to understand how things work. Just one last question: suppose my package has a config.py (which contains a config dict) which another module in the package imports by "import config". If the user of my package has a config.py in the directory from where they run their program (whi

Re: [Tutor] Should config file parser be in module's __init__.py

2008-03-19 Thread Kent Johnson
Shrutarshi Basu wrote: > Thanks for that, i think that creating a configuration submodule and > importing it into the modules that need it will be the most elegant > solution for me. I was wondering whether the following solution would > work / be good practice? > 1. have the parser system in __ini

Re: [Tutor] Should config file parser be in module's __init__.py

2008-03-18 Thread Kent Johnson
Shrutarshi Basu wrote: > I'm working on a module consisting of a number of scripts that handle > communications over a serial connection. I would like someway for the > user to be able to specify which serial port to be used based on a > config file in the same directory as the user's program. Shou

[Tutor] Should config file parser be in module's __init__.py

2008-03-17 Thread Shrutarshi Basu
I'm working on a module consisting of a number of scripts that handle communications over a serial connection. I would like someway for the user to be able to specify which serial port to be used based on a config file in the same directory as the user's program. Should I place the parsing system i