Re: handling ExpatError exception raised from ElementTree.XML() method

2005-10-31 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > > It's not clear how a grep of the site-packages directory revealed the > most likely location of the ExpatError class is xml.parsers.expat. Here's what I did: grep -e ExpatError -r /usr/lib/python2.4/site-packages/ What is interesting is that most of the "hits" belong

Re: handling ExpatError exception raised from ElementTree.XML() method

2005-10-27 Thread mirandacascade
Mr. Boddie's suggestions work as indicated...many thanks. It's not clear how a grep of the site-packages directory revealed the most likely location of the ExpatError class is xml.parsers.expat. Using XP's search utility, I searched for any files within the c:\python24\ folder structure that had

Re: handling ExpatError exception raised from ElementTree.XML() method

2005-10-27 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > > NameError: name 'ExpatError' is not defined > > I'm guessing that I need to define/describe the ExpatError exception > class and then refer to that defined exception class after the keyword > 'except' and before the ':', but I cannot figure out how to do that. You just

handling ExpatError exception raised from ElementTree.XML() method

2005-10-26 Thread mirandacascade
Verion of Python: 2.4 O/S: Windows XP ElementTree resides in the c:\python24\lib\site-packages\elementtree\ folder When a string that does not contain well-formed XML is passed as an argument to the XML() method in ElementTree.py, an ExpatError exception is raised. I can trap the exception with a