More server hiccupsSame issue as my last post, so this time it took less time to track it down...
I entered in my mail server details, replacing 'None' with the relevant info. Since the line wrapped again, with a hard CR being installed by my editor, I moved the comments from the end of each line to their own line. My server then wouldn't start.
After a short hunt, I discovered that each mail variable entered needed a comma at the end of each line, otherwise the server wouldn't start.
—Well "of course", I hear you saying, "every Python coder knows that the config details are actually python code, in a large dictionary, so you need a comma between each key". Great, except are you explicitly only targetting Python coders as your user base? Anyone else might be stumped for hours on that little detail. Say, if I want to edit code to get my blog to work, I can stick with wordpress, and I don't like reading PHP!
My own predilection is to always separate user-configurable information from code. I believe users should never have to edit code in order to get their apps to work. I'm a big believer of putting config data in .ini files if the user will have to edit them by hand, or in pickles if the user can use a GUI. Since Snakelets is a web app, wouldn't it be cool if the server started right out of box, and then the user could edit all personal data using the browser?
I might not yet be quite at the level of knowledge of this toolkit to attempt that on my own, but if it were a good idea I'd be glad to help. I might learn something from looking at the filemgr code.
A first step would be to get all the config info into a single ini file. serv.py would then read the ini file and parse it to get its config info. The user can edit this file by hand. Later, if that works out, it can potentially be made a separate web app. I could take a shot at that first step - I've been using a great little module for reading and writing ini files. The module's called dict4ini.
• Wrote midtoad at 00:47 (edited 1×, last on 31 Oct 2005) | read 6× | Add comment