RE: strange dict issue

2009-01-12 Thread Heston James - Cold Beans
Gary, Ben, Thanks for your replies, that makes perfect sense. This is a dict generated by the ZSI web service library and looks different to what I expect. :-( I'll work on your suggestions, thanks again for your help. Heston -- http://mail.python.org/mailman/listinfo/python-list

strange dict issue

2009-01-12 Thread Heston James - Cold Beans
Ok, this feels like a horribly noobish question to ask guys but I can't figure this one out. I have code which looks like this: print this_config[1] this_adapter_config["name"] = this_config[1]["NAME"] Now, the print statement gives me

Simple ElementTree Help

2008-10-30 Thread Heston James - Cold Beans
Hello Guys, I have a small element tree task here whereby I need to crack open an XML file, modify the text for one element and then resave it back again. I'm currently trying to do this like follows: # Parse the XML file. application_settings = etree.parse('/configuration/application.xml'

Log Exception with Backtrace

2008-10-17 Thread Heston James - Cold Beans
Afternoon Guys, I'm currently logging exceptions within my applications like so: try: #do something except Exception, error: # Log the exception. self.logger.error("Exception Occurred: (%s)" % str(error)) This is quite fine, however, sometimes I get very vague error

ZSI: Classless complexType didn't get dictionary

2008-10-16 Thread Heston James - Cold Beans
Guys, I'm in need of some help. I've got an array of objects I'm trying to send to a remote server using ZSI. I've defined my class and type codes as described in the documentation, and I pass the module containing the class/typecode definition into the 'typesmodule' parameter of the ServicePro

ElementTree Help With DTD

2008-09-30 Thread Heston James - Cold Beans
Afternoon All, I have used elementtree for a little while now parsing simple XML documents and found it pretty intuitive. Today is the first time I've used the library to create an XML file though. I have a simple script which looks like this: # Save the configuration to