Python @ Work
We're finally starting to use some of my Python projects at work. We're going to use Jalopy for sharing information on customers. We're also going to use a customer relations database that I did a lot of work on last year - but never got put into action. A potential problem is that our server has Python 2.2, and I'm not sure that the database backend I'm using (kirbybase) will work with it.
I think I'd rather get everything to work with Python 2.2 first though - I think a lot of people might be in similar situations.
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2005-03-18 16:52:40 | |
ConfigObj
I've just been refactoring downman to keep the configuration stuff in a separate config file. To keep things simple I'd like it to raise an error if the config file is missing, or doesn't have some of the necessary keywords present. This was quite easy to do in ConfigObj (although I wonder if it should be easier - the error system certainly needs overhauling). Here's the code chunk anyway. I just used an options dictionary to tell ConfigObj how to behave. :
configspec = ['keyword1', 'keyword2',
'keyword3', 'keyword4']
options = { 'fileerror' : True, 'configspec_only' : True,
'configspec' : configspec, 'exceptions' : True }
try:
config = ConfigObj(filename, options)
except Exception:
... print an error message
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2005-03-15 11:28:54 | |
For buying techie books, science fiction, computer hardware or the latest gadgets: visit The Voidspace Amazon Store. If you're looking for a new techie job, try the Voidspace Tech Job Board. This is part of the Hidden Network of technology and programming jobs.

IronPython in Action


