Parsing error for ConfigParser

Andrew Z. ahz001 at
Thu Sep 23 19:22:33 CEST 2010

Is there a way to parse RealPlayer's realplayerrc in Python?  I need
to support Python 2.5 - 2.7

Example code

import urllib2
import ConfigParser
f = urllib2.urlopen('')
config = ConfigParser.RawConfigParser()

Traceback (most recent call last):
  File "", line 6, in <module>
  File "/usr/lib/python2.6/", line 305, in readfp
    self._read(fp, filename)
  File "/usr/lib/python2.6/", line 510, in _read
    raise e
ConfigParser.ParsingError: File contains parsing errors: <???>
        [line 31]: '%0aCopyright (c) 1995-2000 Macromedia, Inc. All
rights reserved.\r\n'
        [line 34]: '%0a\r\n'

More information about the Python-list mailing list