python abc parser wraper can read from both strings and files