Is there a Python way to scrap a PHP language pack? (variables and phrases)

I have a few of php files that are part of a language pack I use. Each php file has a header of comments and some ifs and then starts the section with the language phrases, like this:

$lang = array_merge($lang, array(
    'ADD_ATTACHMENT'            => 'Upload attachment',
    'ADD_ATTACHMENT_EXPLAIN'    => 'If you wish to attach one or more files enter the details below.',
    'ADD_FILE'                  => 'Add the file',

A few variables are in the form of an array:

'CHARS_POST_CONTAINS'       => array(
    1   => 'Your message contains %1$d character.',
    2   => 'Your message contains %1$d characters.',
),
'CHARS_SIG_CONTAINS'        => array(
    1   => 'Your signature contains %1$d character.',
    2   => 'Your signature contains %1$d characters.',
),

I would like to extract both variables and phrases (seperated by TAB or somethin) and place them neatly in a text file (so that I can later transfer them to a word or excel file).

So that I get something like this:

ADD_ATTACHMENT  Upload attachment
ADD_ATTACHMENT_EXPLAIN  If you wish to attach one or more files enter the details below.
ADD_FILE    Add the file
ADD_POLL    Poll creation

Is there a Python way to do it?


Source: stackoverflow-php