Tagarchief: ParserFactory

Python ParserFactory

Yesterday I had an idea about how to manage parsers in dynamic way. My idea was like this

  • A managing class can access the parsers folder and check which parsers (files) are available
  • A parser describes which file formats (and which versions of it) it can parse
The result should be that parser classes are implementing a parser interface and a ParserFactory can get info from the available parsers. As I have been working with Java, PHP, Haskell and some other languages, but rather new at Python this is an interesting problem to get to know Python a little better.
Getagged , ,