Parsing PHP in Python
By Kunal MehtaOriginally posted on mastodon.technology.
Today I found a legitimate use for https://github.com/danielquinn/python-php
Python's default ConfigParser requires each ini file to have a [section]. PHP doesn't, so to read a PHP-formatted INI file in Python requires some kind of custom parser (maybe it would be possible to extend ConfigParser?), where the python-php project came in handy. It even removed the quotes around string values like PHP would.
The author's reaction when someone filed a bug report (https://github.com/danielquinn/python-php/issues/1#issuecomment-237299687): "Wow, someone's actually using this?"