will result in an assert rather than 'exception' being printed.
If there was an assert then you would have gotten an exception. What you are probably seeing is a log message. Try checking the return value instead. It should return the position in the string where parsing stopped, or -1 if there was an error.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!